2
1
I have a webserver running on a local machine, which spontaneously started to send about 400 DHCP requests per second, constantly changing its IP address, until I killed dhclient several hours later. Simply restarting the server did not help, I actually had to kill dhclient in order for it to stop.
The server is configured to use DHCP, and the router is configured to give it a static IP address.
This is the output of grep -i dhc /var/log/syslog.1
(.1 because I restarted it) for the first few seconds (the rate increased dramatically later, but not the overall pattern):
Sep 11 04:36:01 net-server dhclient: DHCPREQUEST on eth0 to 10.0.0.1 port 67
Sep 11 04:36:01 net-server dhclient: DHCPACK from 10.0.0.1
Sep 11 04:36:01 net-server dhclient: DHCPDECLINE on eth0 to 255.255.255.255 port 67
Sep 11 04:36:01 net-server dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
Sep 11 04:36:04 net-server dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Sep 11 04:36:04 net-server dhclient: DHCPOFFER from 10.0.0.1
Sep 11 04:36:04 net-server dhclient: DHCPACK from 10.0.0.1
Sep 11 04:36:04 net-server dhclient: DHCPDECLINE on eth0 to 255.255.255.255 port 67
Sep 11 04:36:04 net-server dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
Sep 11 04:36:04 net-server dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Sep 11 04:36:04 net-server dhclient: DHCPOFFER from 10.0.0.1
Sep 11 04:36:05 net-server dhclient: DHCPACK from 10.0.0.1
Sep 11 04:36:05 net-server dhclient: DHCPDECLINE on eth0 to 255.255.255.255 port 67
Sep 11 04:36:05 net-server dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
Later, lines like Sep 11 05:13:01 net-server ifup[436]: /sbin/dhclient-script: 28: .: Can't open /usr/share/sendmail/dynamic
started to appear, but since they did not appear for the better part of an hour, I don't imagine that they are causally related.
Since I guess I didn't actually ask anything yet, my question is: what could possibly cause a Linux server to change its IP this often, and how can I prevent it?
Searching the internet was entirely unproductive, because in most cases "many" requests means every few minutes, not hundreds per second. I can provide more information if requested, but at the moment I don't even know enough about the situation to ask a proper question about it.
1Which debian version are you running? – StackAbstraction – 2015-09-12T02:17:31.237
Debian 8 standard, with manually installed X – Killian L. – 2015-09-12T04:22:13.717
Did you configure your DHCP server? If so, could you please tell us the details of your configuration? There are several possible reasons for this odd behavior, and we need more info to pinpoint one. – MariusMatutiae – 2015-09-12T07:00:30.170
The DHCP server for my network is just a Comcast-branded consumer router with standard configuration except for the one static IP. It's worked 'well enough' for about two months. – Killian L. – 2015-09-12T09:23:55.387