Unreliable DHCP

Markus Hitter mah at jump-ing.de
Fri Dec 26 15:29:02 UTC 2008


Hello all,

since about the release date of Intrepid my desktop Ubuntu box has  
difficulties setting up networking with DHCP. I installed Intrepid a  
lot earlier and didn't change network settings manually after  
installation.

Typically, Ubuntu boots now without setting up working ethernet  
network. Booting also takes a long time, as some of the init scripts  
apparently wait for a DHCP response. All other computers on this  
network operate fine, just like the same box booted into Windows or  
Hardy Heron.

To get networking operational, I now have to issue

   sudo /etc/init.d/network restart

several times until it finally works. From there on, networking works  
well.


To debug the issue, I've captured the DHCP response received. Please  
notice the different IP lease times reported by dhclient and dhcpdump:

- - - snip - - -
mah at piccard:~$ sudo /etc/init.d/networking restart
[...]
Listening on LPF/eth0/00:xx:xx:xx:xx:xx
Sending on   LPF/eth0/00:xx:xx:xx:xx:xx
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPOFFER of 10.0.0.102 from 10.0.0.1
DHCPREQUEST of 10.0.0.102 on eth0 to 255.255.255.255 port 67
DHCPACK of 10.0.0.102 from 10.0.0.1
bound to 10.0.0.102 -- renewal in 6529 seconds.
                                                                         
   [ OK ]
mah at piccard:~$ [...]

(In another shell at the same time:)

mah at piccard:~$ while true; do dhcpdump -i eth0; done
[...]
     IP: 10.0.0.1 (0:a0:xx:xx:xx:xx) > 255.255.255.255  
(ff:ff:ff:ff:ff:ff)
     OP: 2 (BOOTPREPLY)
[...]
CIADDR: 0.0.0.0
YIADDR: 10.0.0.102
SIADDR: 10.0.0.1
GIADDR: 0.0.0.0
[...]
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:   3 (  4) Routers                   10.0.0.1
OPTION:   6 (  4) DNS server                10.0.0.1
OPTION:  12 (  7) Host name                 piccard
OPTION:  15 ( 11) Domainname                jump-ing.de
OPTION:  28 (  4) Broadcast address         10.0.0.255
OPTION:  38 (  4) TCP keepalive interval    0 ()
OPTION:  51 (  4) IP address leasetime      14400 (4h)
OPTION:  54 (  4) Server identifier         10.0.0.1
OPTION:  58 (  4) T1                        7200 (2h)
OPTION:  59 (  4) T2                        10800 (3h)

- - - snip - - -

Those 14400 seconds are what I've configured on the DHCP server. No  
idea why Intrepid thinks it should renew the address after less than  
half the time.

Any other idea on how to track down the culprit?


Thanks,
Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/








More information about the ubuntu-users mailing list