Re: [systemd-devel] systemd-resolved cannot survive router reinstall
Hi Sorry for the delay, just got back home. On Tue, Aug 12, 2014 at 12:19 PM, Tom Gundersen t...@jklm.no wrote: On Tue, Aug 12, 2014 at 2:48 AM, Anatol Pomozov anatol.pomo...@gmail.com wrote: Thanks for the instructions, here is the log https://gist.github.com/anatol/cb497118cfad6af3dc60 The interesting entries are: Aug 11 17:30:25 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Aug 11 17:30:25 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Aug 11 17:30:30 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Is it the heartbeat message from the router? This is IPv6 router advertisment. Not related to your DHCPv4 problems. When the router is rebooted, we should expect to get -LOWER_UP followed by +LOWER_UP in the logs (same as when unplugging the cable). Could you try running ip monitor link when rebooting the rooter and paste whatever events you get? How about when you unplug/replug the cable? I just realized that all my computers (except the home server that has the dhcp problem) are either connected directly to router via cable or use wifi (i.e. also connected directly). This means when router power cycles all directly connected machines see it and thus renew the dhcp lease. But the home server is connected via switch so it is located in its own network segment. Even if router reboots, that segment stays healthy and the server does not notice any problem with the router. It thinks that the lease is OK. I need to unplug/plug the cable connected to the home server - this brings networkd down/up and eventually updates the lease. So the problem is not in networkd, sorry for the noise. The problem is in OpenWRT that uses dnsmasq and stores dhcp lease information on tmpfs. If I reboot the router it looses all the leases and machines should update the information somehow. This is a problem for machines in a separate network segment. I can not believe that OpenWRT developers never tested such configuration. I am going to contact openwrt/dnsmasq maillist and ask what is the right way to solve the issue. PS According to off-list discussion with Tom FORCERENEW dhcp option http://tools.ietf.org/html/rfc3203 is what suppose to fix this issue. But dnsmasq does not support it. PPS NetworkManager has a higher-level connectivity checking. It can be configured to read an url content periodically and if it returns unexpected result then connection considered broken. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-resolved cannot survive router reinstall
On Thu, Aug 21, 2014 at 8:22 AM, Anatol Pomozov anatol.pomo...@gmail.com wrote: Hi Sorry for the delay, just got back home. On Tue, Aug 12, 2014 at 12:19 PM, Tom Gundersen t...@jklm.no wrote: On Tue, Aug 12, 2014 at 2:48 AM, Anatol Pomozov anatol.pomo...@gmail.com wrote: Thanks for the instructions, here is the log https://gist.github.com/anatol/cb497118cfad6af3dc60 The interesting entries are: Aug 11 17:30:25 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Aug 11 17:30:25 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Aug 11 17:30:30 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Is it the heartbeat message from the router? This is IPv6 router advertisment. Not related to your DHCPv4 problems. When the router is rebooted, we should expect to get -LOWER_UP followed by +LOWER_UP in the logs (same as when unplugging the cable). Could you try running ip monitor link when rebooting the rooter and paste whatever events you get? How about when you unplug/replug the cable? I just realized that all my computers (except the home server that has the dhcp problem) are either connected directly to router via cable or use wifi (i.e. also connected directly). This means when router power cycles all directly connected machines see it and thus renew the dhcp lease. But the home server is connected via switch so it is located in its own network segment. Even if router reboots, that segment stays healthy and the server does not notice any problem with the router. It thinks that the lease is OK. I need to unplug/plug the cable connected to the home server - this brings networkd down/up and eventually updates the lease. So the problem is not in networkd, sorry for the noise. The problem is in OpenWRT that uses dnsmasq and stores dhcp lease information on tmpfs. If I reboot the router it looses all the leases and machines should update the information somehow. This is a problem for machines in a separate network segment. I can not believe that OpenWRT developers never tested such configuration. I am going to contact openwrt/dnsmasq maillist and ask what is the right way to solve the issue. Thanks for getting back to this. That explains the situation. PS According to off-list discussion with Tom FORCERENEW dhcp option http://tools.ietf.org/html/rfc3203 is what suppose to fix this issue. But dnsmasq does not support it. PPS NetworkManager has a higher-level connectivity checking. It can be configured to read an url content periodically and if it returns unexpected result then connection considered broken. We intend to add such connectivity checking to networkd too, but I doubt we should use it to renew the DHCP lease, but keep the DHCP logic to only renewing when connectivity to the local link is lost. Cheers, Tom ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-resolved cannot survive router reinstall
So the problem is not in networkd, sorry for the noise. The problem is in OpenWRT that uses dnsmasq and stores dhcp lease information on tmpfs. If I reboot the router it looses all the leases and machines should update the information somehow. This is a problem for machines in a separate network segment. I can not believe that OpenWRT developers never tested such configuration. I am going to contact openwrt/dnsmasq maillist and ask what is the right way to solve the issue. I suspect they know about this but are not concerned. Many DHCP servers (I believe OpenWRT does as well) performs an arp check before giving out an ip address. Thus, even if they loose the lease table, IP conflicts should be impossible. PS According to off-list discussion with Tom FORCERENEW dhcp option http://tools.ietf.org/html/rfc3203 is what suppose to fix this issue. But dnsmasq does not support it. This seems like a nice extension, OpenWRT would probably be open to this. I suspect this would get implemented such that if the DHCP server detects an unknown IP in its lease range it sends FORCERENEW to it. - Thomas ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-resolved cannot survive router reinstall
On Tue, Aug 12, 2014 at 2:48 AM, Anatol Pomozov anatol.pomo...@gmail.com wrote: Thanks for the instructions, here is the log https://gist.github.com/anatol/cb497118cfad6af3dc60 The interesting entries are: Aug 11 17:30:25 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Aug 11 17:30:25 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Aug 11 17:30:30 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Is it the heartbeat message from the router? This is IPv6 router advertisment. Not related to your DHCPv4 problems. When the router is rebooted, we should expect to get -LOWER_UP followed by +LOWER_UP in the logs (same as when unplugging the cable). Could you try running ip monitor link when rebooting the rooter and paste whatever events you get? How about when you unplug/replug the cable? And here is my network config: $ cat /etc/systemd/network/dhcp.network [Match] Name=en* [Network] DHCP=yes The problem exists not only when I reinstall the router firmware but also when I just reboot it. But I believe openwrt does the same in both cases, it just drops all the leases and expects that device reacquire DHCP leases when router gets online. systemd-networkd restart fixes the problem but I expect that it should work without systemd-networkd restart. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-resolved cannot survive router reinstall
On Sat, Aug 9, 2014 at 7:59 PM, Anatol Pomozov anatol.pomo...@gmail.com wrote: I have a router where I experiment with OpenWRT. I sysupdate (i.e. reinstall) openwrt regularly, once or twice a week. I also have an Arch home server with the latest systemd. The machine connected via ethernet cable. Every time I reboot router it looses information about current DHCP leases and devices need to renew it. All devices (ipads/androids/music center/..) are able to renew leases, openwrt ui shows valid new dhcp leases. And only the Arch machine does not. It looks like other dhcp clients have some kind of heartbeat message and renew leases when the network is back. But not systemd-resolved. To restore the system back I need to suspend/wakeup the machine and it is annoying. (I guess you mean systemd-networkd instead of systems-resolved) The way it should work is that if you lose the carrier on a link and then regain it we should renew the lease. If your machine is directly connected to the router and the router is rebooted, this should be triggered. So this sounds like a bug to me. Is it a known issue? Is there any additional information I can provide? Not known, so may I ask you to start networkd from the command line as follows and send the output: # SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd In particular, point out at what point in the logs you restart the router. Thanks for the report. Tom ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-resolved cannot survive router reinstall
Hi On Mon, Aug 11, 2014 at 4:08 PM, Tom Gundersen t...@jklm.no wrote: On Sat, Aug 9, 2014 at 7:59 PM, Anatol Pomozov anatol.pomo...@gmail.com wrote: I have a router where I experiment with OpenWRT. I sysupdate (i.e. reinstall) openwrt regularly, once or twice a week. I also have an Arch home server with the latest systemd. The machine connected via ethernet cable. Every time I reboot router it looses information about current DHCP leases and devices need to renew it. All devices (ipads/androids/music center/..) are able to renew leases, openwrt ui shows valid new dhcp leases. And only the Arch machine does not. It looks like other dhcp clients have some kind of heartbeat message and renew leases when the network is back. But not systemd-resolved. To restore the system back I need to suspend/wakeup the machine and it is annoying. (I guess you mean systemd-networkd instead of systems-resolved) The way it should work is that if you lose the carrier on a link and then regain it we should renew the lease. If your machine is directly connected to the router and the router is rebooted, this should be triggered. So this sounds like a bug to me. Is it a known issue? Is there any additional information I can provide? Not known, so may I ask you to start networkd from the command line as follows and send the output: # SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd In particular, point out at what point in the logs you restart the router. Thanks for the instructions, here is the log https://gist.github.com/anatol/cb497118cfad6af3dc60 The interesting entries are: Aug 11 17:30:25 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Aug 11 17:30:25 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Aug 11 17:30:30 theserver systemd-networkd[32648]: ICMPv6 CLIENT: Received Router Advertisment flags MANAGED/OTHER Is it the heartbeat message from the router? And here is my network config: $ cat /etc/systemd/network/dhcp.network [Match] Name=en* [Network] DHCP=yes The problem exists not only when I reinstall the router firmware but also when I just reboot it. But I believe openwrt does the same in both cases, it just drops all the leases and expects that device reacquire DHCP leases when router gets online. systemd-networkd restart fixes the problem but I expect that it should work without systemd-networkd restart. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] systemd-resolved cannot survive router reinstall
Hi I have a router where I experiment with OpenWRT. I sysupdate (i.e. reinstall) openwrt regularly, once or twice a week. I also have an Arch home server with the latest systemd. The machine connected via ethernet cable. Every time I reboot router it looses information about current DHCP leases and devices need to renew it. All devices (ipads/androids/music center/..) are able to renew leases, openwrt ui shows valid new dhcp leases. And only the Arch machine does not. It looks like other dhcp clients have some kind of heartbeat message and renew leases when the network is back. But not systemd-resolved. To restore the system back I need to suspend/wakeup the machine and it is annoying. Is it a known issue? Is there any additional information I can provide? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-resolved cannot survive router reinstall
Hi, On Sat, Aug 09, 2014 at 10:59:30AM -0700, Anatol Pomozov wrote: Hi I have a router where I experiment with OpenWRT. I sysupdate (i.e. reinstall) openwrt regularly, once or twice a week. I also have an Arch home server with the latest systemd. The machine connected via ethernet cable. Every time I reboot router it looses information about current DHCP leases and devices need to renew it. All devices (ipads/androids/music center/..) are able to renew leases, openwrt ui shows valid new dhcp leases. And only the Arch machine does not. It looks like other dhcp clients have some kind of heartbeat message and renew leases when the network is back. But not systemd-resolved. To restore the system back I need to suspend/wakeup the machine and it is annoying. Is it a known issue? Is there any additional information I can provide? Are you possibly confusing resolved with networkd? The former is for setting up DNS and is not really needed on a small LAN. AFAIK, networkd will not renew a lease if DHCP server goes down and then up. OTOH, why is this a problem: do you have an IP collision after the router is back up (because another device got your IP)? Cheers, -- Leonid Isaev GPG fingerprints: DA92 034D B4A8 EC51 7EA6 20DF 9291 EE8A 043C B8C4 C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D pgppzzTaxoBj3.pgp Description: PGP signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel