Small note on DHCP daemon and boot
Today after turning my laptop I had the bad surprise to get no Internet connection; worse than that, no network connection at all: no DHCP address assigned to me :-(
Looking at the logs on Raspberry Pi (/var/log/syslog), the issue is clear:
The diagnose is simple: the DHCP daemon got started before the network interface was up and running.
After a bit of googling, it seems the way to go is to have the DHCP server getting started/stopped from the ifplugd daemon. This is achieved by modifying the file "/etc/ifplugd/action.d/ifupdown".
Looking at the logs on Raspberry Pi (/var/log/syslog), the issue is clear:
Feb 7 22:53:42 raspberrypi dhcpd: No subnet declaration for eth0 (no IPv4 addresses). Feb 7 22:53:42 raspberrypi dhcpd: ** Ignoring requests on eth0. If this is not what Feb 7 22:53:42 raspberrypi dhcpd: you want, please write a subnet declaration Feb 7 22:53:42 raspberrypi dhcpd: in your dhcpd.conf file for the network segment Feb 7 22:53:42 raspberrypi dhcpd: to which interface eth0 is attached. ** Feb 7 22:53:42 raspberrypi dhcpd: Feb 7 22:53:42 raspberrypi dhcpd: Feb 7 22:53:42 raspberrypi dhcpd: Not configured to listen on any interfaces! [...] Feb 7 22:54:11 raspberrypi kernel: [ 51.380450] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0x41E1 Feb 7 22:54:12 raspberrypi ifplugd(eth0)[1343]: Link beat detected. Feb 7 22:54:12 raspberrypi ifplugd(eth0)[1343]: Executing '/etc/ifplugd/ifplugd.action eth0 up'. Feb 7 22:54:13 raspberrypi ifplugd(eth0)[1343]: Program executed successfully.
The diagnose is simple: the DHCP daemon got started before the network interface was up and running.
After a bit of googling, it seems the way to go is to have the DHCP server getting started/stopped from the ifplugd daemon. This is achieved by modifying the file "/etc/ifplugd/action.d/ifupdown".
Comments
Post a Comment