dhcpcd-discuss

Re: Routes not set at boot after upgrade from 6.7.1-1 to 6.8.1-1

Roy Marples

Tue Apr 14 12:41:56 2015

Hi Bill

On 13/04/2015 21:36, William Wraith IV wrote:
> I am working on a VM on Google Compute Engine using arch linux with
> kernel 3.19.3-3 and dhcpcd-6.8.1-1. I recently upgraded from
> dhcpcd-6.7.1-1 and discovered the VM would not boot. I narrowed it down
> to the fact that routes aren't being set in the new version. I was able
> to work around this by adding a script 12-gateway in dhcpcd-hooks
> directory to manually set routes as follows:
> 
> ip route add 10.240.0.1/32 <http://10.240.0.1/32> dev eth0
> ip route add default via 10.240.0.1 dev eth0
> 
> My dhcpcd.conf is as follows:
> 
> duid
> persistent
> option rapid_commit
> option classless_static_routes
> option domain_name_servers, domain_name, domain_search, host_name
> option ntp_servers
> require dhcp_server_identifier
> nohook lookup-hostname
> noipv4ll
> noipv6
> noipv6rs
> 
> The output of dhcpcd -U4 eth0 is as follows:
> 
> broadcast_address=10.240.148.242
> classless_static_routes='10.240.0.1/32 <http://10.240.0.1/32> 0.0.0.0 0.0.0.0/0 <http://0.0.0.0/0> 10.240.0.1'
> dhcp_lease_time=4294967295
> dhcp_message_type=5
> dhcp_server_identifier=169.254.169.254
> domain_name=c.ambient-stone-852.internal.
> domain_name_servers='169.254.169.254 10.240.0.1'
> domain_search='c.ambient-stone-852.internal 579702880541.google.internal google.internal'
> host_name=bwgce2-ext4-test.c.ambient-stone-852.internal
> interface_mtu=1460
> ip_address=10.240.148.242
> network_number=10.240.148.242
> ntp_servers=169.254.169.254
> routers=10.240.0.1
> subnet_cidr=32
> subnet_mask=255.255.255.255
> 
> journalctl output for dhcpcd:
> 
> Apr 13 19:08:18 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[179]: forked to background, child pid 185
> Apr 13 19:08:19 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[185]: eth0: waiting for carrier
> Apr 13 19:08:19 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[185]: eth0: carrier acquired
> Apr 13 19:08:19 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[185]: DUID 00:01:00:01:1c:be:a8:95:42:01:0a:f0:b1:2f
> Apr 13 19:08:19 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[185]: eth0: IAID 0a:f0:94:f2
> Apr 13 19:08:19 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[185]: eth0: rebinding lease of 10.240.251.107
> Apr 13 19:08:19 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[185]: eth0: NAK: from 169.254.169.254
> Apr 13 19:08:19 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[185]: eth0: soliciting a DHCP lease
> Apr 13 19:08:19 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[185]: eth0: offered 10.240.148.242 from 169.254.169.254

That's a very odd server id - it's a link local IPv4 address!
Renews probably won't work either ....

> Apr 13 19:08:24 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[185]: eth0: leased 10.240.148.242 for infinity
> Apr 13 19:08:24 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd-run-hooks[209]: eth0: MTU set to 1460
> 
> 
> Using dhcpcd-6.7.1-1, same config file, but no hook for manually setting gateway, the log output is:
> 
> Apr 13 20:24:19 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[177]: version 6.7.1 starting
> Apr 13 20:24:19 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[177]: forked to background, child pid 183
> Apr 13 20:24:20 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[183]: eth0: waiting for carrier
> Apr 13 20:24:20 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[183]: eth0: carrier acquired
> Apr 13 20:24:20 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[183]: DUID 00:01:00:01:1c:6d:47:3d:42:01:0a:f0:f6:b1
> Apr 13 20:24:20 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[183]: eth0: IAID 0a:f0:b0:cf
> Apr 13 20:24:21 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[183]: eth0: rebinding lease of 10.240.176.207
> Apr 13 20:24:26 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[183]: eth0: leased 10.240.176.207 for infinity
> Apr 13 20:24:26 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[183]: eth0: adding route to 10.240.0.1/32 <http://10.240.0.1/32>
> Apr 13 20:24:26 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[183]: eth0: adding default route via 10.240.0.1
> Apr 13 20:24:26 bwgce2.wraithnj.com <http://bwgce2.wraithnj.com> dhcpcd[195]: eth0: MTU set to 1460
> 
> 
> Any advice on how to troubleshoot this much appreciated.

Best advice is to add the debug keyword to dhcpcd.conf as it will then
log a lot more information. If that doesn't provide enough info, then
please email me offlist the dhcpcd lease file from both versions and/or
a full tcpdump of the transaction.

This is probably an issue with the new route learning code dhcpcd grew
in 6.8.x.

Roy

References:
Routes not set at boot after upgrade from 6.7.1-1 to 6.8.1-1William Wraith IV
Archive administrator: postmaster@marples.name