You are not logged in.
I use netctl to connect to a wireless network that doesn't provide me with a default route.
The default route is added using Routes=() in the netctl profile.
However, after a certain amount of time the route just disappears. I can manually add it again using ip route, upon which everything works again.
The netctl service is running.
Does anyone know what might cause this? I don't see anything weird in the logging.
Offline
I use netctl to connect to a wireless network that doesn't provide me with a default route.
The default route is added using Routes=() in the netctl profile.
However, after a certain amount of time the route just disappears. I can manually add it again using ip route, upon which everything works again.
The netctl service is running.Does anyone know what might cause this? I don't see anything weird in the logging.
Assuming that you obtain an IP address via DHCP, I guess that at the lease renewal, your dhcp client rewrites your default route with a blank one. If you are using dhcpcd(8), I'd try running it with "-G" in DhcpcdOptions='' (it's undocumented due to whatever reason). If you are using dhclient, read its manpage for an equivalent option. Or better yet, get rid of it ![]()
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
Just added -G to my DhcpcdOptions. I'll be able to test again tomorrow. Thanks ![]()
Edit: Didn't work. The route is still disappearing.
Last edited by bcd87 (2014-11-11 08:25:59)
Offline
Right, so I finally figured out what's happening.
The first issue is that I don't get a default route. This is due to a misconfigured DHCP server.
RFC3442 states that when option 121 (Classless Static Route) is used, the DHCP client must ignore the Router option:
If the DHCP server returns both a Classless Static Routes option and
a Router option, the DHCP client MUST ignore the Router option.
I used DhcpcdOptions='-O 121' to ignore option 121, and verified that a default route was now automatically added without having to use netctl's Routes=('') option.
That still leaves the issue of the disappearing route. Apparently there are some issues with my network driver that causes a lost carrier a few times a day. When that happens all routes get removed, when the carrier is acquired again (in some cases only 4 seconds later), the routes get setup according to the DHCP options, but the routes in netctl are ignored.
This seems like a bug to me.
Edit: Created a bug-report https://bugs.archlinux.org/task/42772
Last edited by bcd87 (2014-11-13 11:18:09)
Offline
I'm glad that you found a workaround... but why do think this is a bug in netctl? AFAIU from reading /usr/lib/network/ip, it sets a static route after a call to dhcpcd. So, when the lease is renewed, the route is overwritten by dhcpcd. I don't think that your wifi issues are related to the TCP/IP problems. Are you using netctl-auto with wpa_actiond? If not, netctl/dhcpcd won't even notice that your carrier disappeared.
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline