Problem with PPP and default gateway switching
Description of how to replicate:
when these conditions are met: WAN is a PPPoE interface OPT1 is a PPP interface (3G stick) I reboot the system with WAN cable disconnected, but the 3G stick in place. I use the "allow default gateway switching" option. The system stabilizes with no default gateway in its routing table. ppp0 interface is up and have an IP address. If I disconnect and reconnect the 3G, nothing changes. If I reconnect the WAN cable, wait a little bit, and disconnect it, now default gateway will be on the PPP interface.
Make a couple changes to PPP default gateway handling to address issues with default gateway switching. Fixes #1837
Tested with default gateway switching on and off, by rebooting, manually disconnecting the PPP link, and manually disconnecting the NIC link, worked each time, though still possible some issues remain. Feedback appreciated.
#1 Updated by Jim Pingle over 3 years ago
- Assignee set to Jim Pingle
- Affected Version changed from 2.0 to 2.2.x
- Affected Architecture set to All
This also seems to be a problem with both WANs are PPPoE. The system logs that it's switching the gateway during the initial transition but it never actually happens.
Eventually something will trigger the system to refresh the gateway and it comes back, such as loading a page in the GUI that touches gateway groups.
To me for more testing/evaluation.
#4 Updated by Jim Pingle over 3 years ago
I believe I located the source of the trouble here. With "set iface route default" in the mpd config, it was removing the default route when the PPP link was lost even when it did not match what it put in place. I omitted that line and put a safety belt in ppp-linkdown to stop it from removing the gateway when it doesn't match.
I tested this with default gateway switching on and off, by rebooting, manually disconnecting the PPP link, and manually disconnecting the NIC link, worked each time, though still possible some issues remain. Feedback appreciated.
#5 Updated by Jim Pingle over 3 years ago
- Status changed from Feedback to Resolved
- Target version set to 2.3
Still solid no matter how I hammer it. Feedback from others testing various scenarios has shown no negative effects either. If a problem arises, this can be reopened.
Forum thread for discussion: https://forum.pfsense.org/index.php?topic=106840.0