Help on disconnect and reconnect a PPPOE connection by Command Line
-
Hi, need your help, question as below:
I need manually disconnect and reconnect a PPPOE connection from time to time.
I know it could be done though GUI (status/interfaces), however, can I do it though command line?I tried "ifconfig interface down", it dosn't reconnect the PPPOE, it just simply block the communication.
When I use "ifconfig interface up", the PPPOE connection remains, it never disconnect and reconnect.So, any command I should use to achieve the disconnect/reconnect PPPOE?
Thanks !
-
2 min google search threw this up which might be useful.
https://forums.freebsd.org/threads/how-to-restart-a-single-network-interface-properly.22494/
https://www.freebsd.org/doc/handbook/config-network-setup.html -
Even faster !
Look carefully here https://forum.pfsense.org/index.php?board=44.0 (the forum where you posted your message)
You will find this https://forum.pfsense.org/index.php?topic=81793.0 -
You can reconnect PPPoE using this script:
#!/bin/sh # Command to reload wan interface /usr/local/sbin/pfSctl -c 'interface reload wan' >/dev/null 2>&1 || exit 1 # Command to log this event /usr/bin/logger -t ppp "PPPoE reset executed on WAN" exit 0
Replacing "wan" with "opt1" or other interface identifier as needed. Which Armin shared in this ticket.
-
Saw your post over on that other project's forum. PPPoE multi-WAN with the same gateway IP has worked in pfSense for quite some time, that only works in OPNsense because we fixed it years back (the only thing they've actually accomplished functionality-wise is breaking things that worked in the code they forked). I'm guessing you found some really old references that are no longer applicable. Maybe you have an unusual edge case, which if that's the case, please start a new thread describing what you're doing. Multiple PPPoE with the same gateway most definitely works though.
With pfSense, when you boot up, your rules are actually loaded correctly, unlike some other projects. And our reply-to actually functions, unlike some others (that bug should really be labeled as "multi-WAN is non-functional for all inbound traffic"). Multi-WAN IPsec works, unlike some others. I could go on. Suffice it to say, you're in for a world of hurt if you continue down that path. They've broken a lot of key multi-WAN things where you won't have those issues here.