Hello again. I had a different issue with dhclient that I meant to
report separately, but it seems the problem above was related to it.
There seems to be something wrong with the option rfc3442-classless-
static-routes in dhclient.conf. Check this out:

$ sudo killall -9 dhclient 
# now nm-applet tells me the network is disconnected, which is true:

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

# I removed the leases file:
$ sudo rm  /var/lib/dhcp3/dhclient.leases 

# Checked that in dhclient.conf the rfc3442 option is enabled
$ grep rfc3442 /etc/dhcp3/dhclient.conf
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
        rfc3442-classless-static-routes;

# And now run dhclient:
$ sudo dhclient eth0 
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:22:15:95:14:b8
Sending on   LPF/eth0/00:22:15:95:14:b8
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPOFFER of 192.168.1.66 from 192.168.1.254
DHCPREQUEST of 192.168.1.66 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.66 from 192.168.1.254
bound to 192.168.1.66 -- renewal in 39964 seconds.

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 eth0

# Everything seems OK. Now I run again dhclient, with the same configuration:
$ sudo dhclient eth0 
There is already a pid file /var/run/dhclient.pid with pid 16328
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

parse_option_param: Bad format a
Listening on LPF/eth0/00:22:15:95:14:b8
Sending on   LPF/eth0/00:22:15:95:14:b8
Sending on   Socket/fallback
DHCPREQUEST of 192.168.1.66 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.66 from 192.168.1.254
bound to 192.168.1.66 -- renewal in 33985 seconds.

# Note above the 'parse_option_param: Bad format a' error. The gateway route is 
not added anymore:
$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

# Now I commented-out the rfc3442 option in dhclient.conf
$ grep rfc3442 /etc/dhcp3/dhclient.conf
#option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
#       rfc3442-classless-static-routes;

# And I run again dhclient:
$ sudo dhclient eth0 
There is already a pid file /var/run/dhclient.pid with pid 16394
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

/var/lib/dhcp3/dhclient.leases line 22: no option named 
rfc3442-classless-static-routes in space dhcp
  option rfc3442-classless-static-routes 0,
         ^
Listening on LPF/eth0/00:22:15:95:14:b8
Sending on   LPF/eth0/00:22:15:95:14:b8
Sending on   Socket/fallback
DHCPREQUEST of 192.168.1.66 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.66 from 192.168.1.254
bound to 192.168.1.66 -- renewal in 39587 seconds.

# Note that it complains about the option present in dhclient.leases. But the 
route is added correctly.
$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 eth0

# And now if I run dhclient again it seems to work correctly, presumably 
because that lease was overwritten
$ sudo dhclient eth0 
There is already a pid file /var/run/dhclient.pid with pid 16463
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:22:15:95:14:b8
Sending on   LPF/eth0/00:22:15:95:14:b8
Sending on   Socket/fallback
DHCPREQUEST of 192.168.1.66 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.66 from 192.168.1.254
bound to 192.168.1.66 -- renewal in 42459 seconds.

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 eth0


---------------
Now I'm pretty sure that the Network Manager applet was troubled by the same 
setting. With the rfc3442 option commented out in dhclient.conf, I did the 
following:

* deleted my custom connection from nm-applet
* killed the nm-applet
* de-commented the "auto eth0" line in /etc/networking/interfaces
* restarted the nm-applet. It complained that "** (nm-applet:18096): WARNING 
**: No connections defined", but nevertheless it added an "Auto Ethernet" 
connection.
* I used that auto connection and sure enough the correct routes were added:

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 eth0

I disabled and re-enabled the network a couple of times, and the correct
routes are added every time.

-- 
[jaunty] option rfc3442-classless-static-routes causes missing routes
https://bugs.launchpad.net/bugs/307204
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to