[2.3.x] No default route on WAN PPPoE after link failure (with FIX, please test)
-
@cmb:
Sounds like that gateway isn't marked as default under System>Routing, what does that screen look like?
Gateway is marked as default: i tried to edit config and then save too, but with no luck. The only way i find to solve issue (without adding manually a static route every PPPoE restart) was modifying /etc/inc/interfaces.inc like this:
/* Omit this, we maintain the default route by other means, and it causes problems with * default gateway switching. See redmine #1837 */ if (($interface "wan" && $founddefaultgw false) || $setdefaultgw == true) { $setdefaultgw = true; $mpdconf .= <<<eod<br>set iface route default EOD;</eod<br>
I remove the REM in this piece of code, so it looks like same file in pfSense 2.2.6. In this way if i reboot pfSense, disconnect WAN cable, reset (bridget) modem, disconnect/reconnect WAN interface, default route is created and all PC in my LAN have internet access.
-
[…]
From memory this has been a problem for quite some time, I'll see if I can find the original bug report.Yes, there is redmine #1837 ticket about a similar issue, but the proposed solution by editing the file (/etc/inc/interfaces.inc) stop the creation of the default gateway if the PPPoE session is disconnected. For this reason i modified the code and now it look like that in version 2.2.6 (which worked perfectly).
Today i made some other test with my pfSense box (Atom 1037U CPU), an Alix, an HP DL380 end a portable DELL. My ISP is a 100/20 FTTC (Telecom Fibra). Same config: clean install, then restore from 2.2.6 config backup. Everybody have the same problems on PPPoE.
-
fyi - mine also has the default gateway set.
-
@cmb: do you think it would be possible to modify code so as to keep both version (2.2.6 and 2.3.x) in file /etc/inc/interfaces.inc? Code was modifyied in 2.3 for a issue (#1837) about multiwan gateway switching, but it seems to have problems with a single wan gateway config. In "single gateway mode" code would run set iface route default command, in "multi gateway mode" no.
-
I came back to pfsense having used another router while having this problem. Having started it up, I found that the PPP interface wouldn't come up. Looking under advanced config on the PPPoE link, no underlying interface was selected. Having set that the interface came up and routed correctly. I'll continue to monitor and see want happens when the underlaying DSL link fail cycles.
-
I came back to pfsense having used another router while having this problem. Having started it up, I found that the PPP interface wouldn't come up. Looking under advanced config on the PPPoE link, no underlying interface was selected. Having set that the interface came up and routed correctly. I'll continue to monitor and see want happens when the underlaying DSL link fail cycles.
Can you try the mod in /etc/inc/interfaces.inc i post?
-
It's working without the mod. I was about to try your mod, but now the interface is up and working as expected. I'll see what happens when I pull the modem link out later, and if that stops the routing working I'll apply the mod.
-
It's working without the mod. I was about to try your mod, but now the interface is up and working as expected. I'll see what happens when I pull the modem link out later, and if that stops the routing working I'll apply the mod.
What happened if you disconnect and riconnect WAN or PPPoE cable from modem?
-
I cycled the modem. When the link came back up, the I couldn't connect out to the Internet. Adding your fix and cycling the PPPoE link fixes the problem. Thanks!
-
I cycled the modem. When the link came back up, the I couldn't connect out to the Internet. Adding your fix and cycling the PPPoE link fixes the problem. Thanks!
Well, my fix is actually the same code present in 2.2.6, that works without problem. Thank you for test. :)
-
Is there a redmine on this?
-
Is there a redmine on this?
Yes: https://forum.pfsense.org/index.php?topic=113750.msg632702#msg632702
-
OK, for pfSense people to take this seriously you'll have to create it as a patch here:
https://github.com/pfsense/pfsenseJust register, choose your file, click the pencil icon to edit it, and it will create a fork for you. Then, submit a pull request for your fork. In the description, link to this topic and the redmine issue.
-
OK, for pfSense people to take this seriously you'll have to create it as a patch here:
https://github.com/pfsense/pfsenseJust register, choose your file, click the pencil icon to edit it, and it will create a fork for you. Then, submit a pull request for your fork. In the description, link to this topic and the redmine issue.
Hi Roby, i'm not a PHP developer, so i don't think it's a good idea modify code on my own. Anyway, in redmine #6495 i suggested a possibile change about code:
if ONE GW then
<the code="" i="" modify="">else (TWO or MORE GW)
endif
</the> `In this way it could work both configuration, one WAN gateway or two (or more).P.S. What do you mean for "…for pfSense people to take this seriously"?`
-
You said "my fix is actually the same code…" - I thougt you have a real fix for the problem...
As far as I noticed over the years, code snippets posted on the forum almost never reach to be in the actual product.
-
You said "my fix is actually the same code…" - I thougt you have a real fix for the problem...
As far as I noticed over the years, code snippets posted on the forum almost never reach to be in the actual product.
As you can read in my reply to jumpymonkey, my fix is simply the recovery of the code of 2.2.6, that not rem the line set iface route default. But as said in Redmine #1837, 2.2.6 code works well with one WAN gateway, but create problems with multi WAN gateway configuration. So i thought multi choice <if…else...endif>would be a good solution.</if…else...endif>
-
OK, the problem that this is all so confusing with your fix. Sorry.
I don't mean to to offend you with this, just trying to help. Which file, which line number should be replaced with what.
PHP is so easy… -
OK, the problem that this is all so confusing with your fix. Sorry.
I don't mean to to hurt you with this, just trying to help. Which file, which line number should be replaced with what.
PHP is so easy…Hi robi, really, there's absolutely no problem, why should be hurt? :) I'm not a PHP developer (i'm a network admin) and at office i managed 14 (16) pfSense box with WAN static IP. But i have pfSense at home too with PPPoE connection, and from 2.3 release i have several problem with auth. I have a little bit of knowledge of programming, so i try to investigate and finally i found redmine #1837 and so on.
I start to learn PHP, but I think it is still early and I'm not at an advanced level as the official team, so I think it's better to just report the bug. ;) ;)
File is /etc/inc/interfaces.inc from line 1806 to line 1815.
Thanks in advance. :)
-
OK, for pfSense people to take this seriously you'll have to create it as a patch here:
https://github.com/pfsense/pfsenseNot true, there is a bug open and we'll get a proper fix. Going back to the change discussed in this thread will regress other things and isn't right. We need to track down the real source of the issue and fix that. I can't replicate it at all though, so going to need some help from those who can.
mpd calls ppp-linkup after connecting, which triggers rc.newwanip. rc.newwanip sets the default gateway.
When you're left with no default gateway after a reconnect, check the system log. What is there from rc.newwanip? Should see something like:
rc.newwanip: ROUTING: setting default route to x.x.x.x
is that there? What else is logged at the time?
If you cause the WAN NIC to lose its link, in addition to rc.newwanip, rc.linkup will also set the default gateway and have a similar log. So you'll see it twice in that case, which is fine.
Note I'm talking about using strictly stock source code, not the change in this thread. Revert that change first if you made it.
-
@cmb:
[…]
When you're left with no default gateway after a reconnect, check the system log. What is there from rc.newwanip? Should see something like:rc.newwanip: ROUTING: setting default route to x.x.x.x
is that there? What else is logged at the time?
If you cause the WAN NIC to lose its link, in addition to rc.newwanip, rc.linkup will also set the default gateway and have a similar log. So you'll see it twice in that case, which is fine.
Note I'm talking about using strictly stock source code, not the change in this thread. Revert that change first if you made it.
Hi Cmb,
thanks for your post. I'll try and post the log. :)Actually i can test with 3 PPPoE ISP provider and 1 PPPoA (converted by modem in PPPoE) ISP and four different hardware (Alix, APU, x64 a i386). I follow redmine #6495 status, as soon as a fix is posted, i'll try and let you know.
Thanks in advance,
–
Marlenio