Re: [opensuse] DHCP lease requests



On 01/05/2012 08:34 AM, Lew Wolfgang wrote:
On 01/05/2012 08:26 AM, James Knott wrote:
Per Jessen wrote:
On a reboot dhcpcd has to be started, so check to see what is happening
at that point.

I think the idea is to have an immediate dhcp request when connecting to a network, which means dhcpcd should be restarted at that time.

Right, but if there's a still-valid lease showing in /var/lib/dhcpcd it
looks like the just-started dhcpcd doesn't request a new lease. At
least this how it seemed to me, I was in a hurry.

OK, I confirmed the behavior on another 12.1 x86-64 desktop.

I started the system with eth0 connected to a router which assigned a DHCP
address of 192.168.1.2. I then unplugged the cable and connected to a
fully up and running network. ifconfig showed the old, and now stale, IP address.
/var/log/messages showed a "link down", then a "link up" message without
re-running dhcpcd.

I then issued a "/etc/init.d/network restart" which didn't help. Messages showed
an entry from ifup-dhcp saying the "client is already running" and repeated the
old IP address.

So I then issued a "/etc/init.d/network restart-all-dhcp-clients". This option did a
lot more as reflected in messages, but it still didn't renew the DHCP lease. It started
dhcpcd but put it in background, then dhcpcd reported "eth0 timed out". At
this point it tried to "use old lease in `/var/lib/dhcpcd/dhcpcd-eth0.info'", which
still contained the old lease info, and proceeded to reuse the old lease without
broadcasting for a new one.

I then removed the lease files in /var/lib/dhcpcd/ and re-ran
/etc/init.d/network restart-all-dhcp-clients. Now dhcpcd says the lease information
file does not exist and proceeds to broadcast for a new lease. Now it works!

So I see two issues:

1. dhcpcd doesn't seem to be tickled by the interface going down, then up (cable swap).

2. When dhcpcd does start/restart, it doesn't broadcast for a new lease if an
old one exists.

This sounds like a "feature" to streamline the boot process that turned into a bug.

Regards,
Lew

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx



Relevant Pages

  • Re: [opensuse] DHCP lease requests (solved)
    ... didn't renew the DHCP lease. ... then dhcpcd reported "eth0 timed out". ... Is there a problem with the DHCP server? ... So it appears that my only problem was the sluggish DHCP server on the big network. ...
    (SuSE)
  • Re: Vista Wireless Disaster - LImited Connectivity
    ... This means that your laptop isn't getting an IP address through DHCP from ... Go through the process of "connecting" to the wireless LAN including setting ... assigned computers aren't currently connected or turned on or ..... ... decrease the lease time of the DHCP addresses. ...
    (microsoft.public.windows.vista.networking_sharing)
  • Re: [opensuse] DHCP lease requests
    ... connecting to a network, which means dhcpcd should be restarted at ... looks like the just-started dhcpcd doesn't request a new lease. ... DHCP address of 192.168.1.2. ...
    (SuSE)
  • [Full-disclosure] [gentoo-announce] [ GLSA 200507-16 ] dhcpcd: Denial of Service vulnerability
    ... A vulnerability in dhcpcd may cause the dhcpcd daemon to crash. ... dhcpcd is a standards compliant DHCP client daemon. ... Security is a primary focus of Gentoo Linux and ensuring the ...
    (Full-Disclosure)
  • [ GLSA 200507-16 ] dhcpcd: Denial of Service vulnerability
    ... A vulnerability in dhcpcd may cause the dhcpcd daemon to crash. ... dhcpcd is a standards compliant DHCP client daemon. ... Security is a primary focus of Gentoo Linux and ensuring the ...
    (Bugtraq)