Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 173931

Summary: sys-apps/dhcpcd-3.0.16 don't set default route correctly
Product: Gentoo Linux Reporter: Miroslaw Mieszczak <gentoo>
Component: Current packagesAssignee: Roy Marples (RETIRED) <uberlord>
Status: RESOLVED WONTFIX    
Severity: normal CC: amg
Priority: High    
Version: 2006.1   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Miroslaw Mieszczak 2007-04-09 18:22:05 UTC
After upgrade from dhcpcd-2.0.5-r1 to new stable version 3.0.16 it is not able to set default route during getting of dhcp lease. As result I connot connect into network. When downgraded everything works correctly.

There is my route information on version 2.0.5-r1:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.23.79.159   *               255.255.255.255 UH    0      0        0 eth0
172.23.79.160   *               255.255.255.240 U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         172.23.79.159   0.0.0.0         UG    0      0        0 eth0


and on 3.0.16 version:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.23.79.160   *               255.255.255.240 U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo


Reproducible: Always

Steps to Reproduce:
1. start system after upgrading of dhcpcd
2.
3.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-04-09 19:55:44 UTC
Please attach the output of

dhcpcd -k eth0
dhcpcd -d eth0
Comment 2 Miroslaw Mieszczak 2007-04-10 12:55:12 UTC
There is result on dhcpcd-2*
laptop_mirka ~ # dhcpcd -k eth0
laptop_mirka ~ # dhcpcd -d eth0
Info, MAC address = 00:90:f5:4c:9c:30
Debug, broadcasting DHCP_DISCOVER
Debug, broadcastAddr option is missing in DHCP server response. Assuming 172.23.79.175
Debug, dhcpIPaddrLeaseTime=604800 in DHCP server response.
Debug, DHCP_OFFER received from office (172.23.79.159)
Debug, broadcasting DHCP_REQUEST for 172.23.79.168
Debug, dhcpIPaddrLeaseTime=604800 in DHCP server response.
Debug, DHCP_ACK received from office (172.23.79.159)
Debug, broadcasting ARPOP_REQUEST for 172.23.79.168
Info, verified 172.23.79.168 address is not in use
Info, your IP address = 172.23.79.168
Debug, orig hostname = laptop_mirka




and there result on dhcpcd-3*
laptop_mirka ~ # dhcpcd -k eth0
laptop_mirka ~ # dhcpcd -d eth0
Info, eth0: dhcpcd 3.0.16 starting
Info, eth0: hardware address = 00:90:f5:4c:9c:30
Info, eth0: broadcasting for a lease
Debug, eth0: sending DHCP_DISCOVER with xid 87666417
Debug, eth0: waiting on select for 20 seconds
Debug, eth0: got a packet with xid 87666417
Info, eth0: offered 172.23.79.168 from 172.23.79.159 `office'
Debug, eth0: sending DHCP_REQUEST with xid 87666417
Debug, eth0: waiting on select for 20 seconds
Debug, eth0: got a packet with xid 87666417
Info, eth0: leased 172.23.79.168 for 604800 seconds
Debug, eth0: renew in 302400 seconds
Debug, eth0: rebind in 453600 seconds
Info, eth0: adding IP address 172.23.79.168/28
Info, eth0: adding default route via 172.23.79.159 metric 0
Error, eth0: netlink: Network is unreachable
Debug, eth0: writing /etc/resolv.conf
Debug, eth0: writing /var/lib/dhcpcd/dhcpcd-eth0.info
Debug, eth0: forking to background
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-04-10 13:29:00 UTC
The dhcp server needs to supply a static route to the host.

dhcpcd-3.x no longer applies a host route if the gateway fails to add as it proved unreliable and caused too much trouble.
Comment 4 Miroslaw Mieszczak 2007-04-11 11:47:21 UTC
Changing of this could be difficult, as I have hardware router from D-link.
Comment 5 Roy Marples (RETIRED) gentoo-dev 2007-04-11 13:29:21 UTC
(In reply to comment #4)
> Changing of this could be difficult, as I have hardware router from D-link.
> 

Then use some sensible settings :)

192.168.0.1/24 --- router
192.168.0.100-255/24 - dhcp ip's
Comment 6 Miroslaw Mieszczak 2007-04-11 13:52:13 UTC
OK. Now it works fine. Thank you.
Comment 7 Christian Heim (RETIRED) gentoo-dev 2007-04-18 10:24:27 UTC
*** Bug 175053 has been marked as a duplicate of this bug. ***