Page MenuHomeVyOS Platform

DHCPv6 client on interface fails after reboot
Closed, ResolvedPublicBUG

Description

When using the following configuration for both DHCP and DHCPv6:

...
interfaces {
   ethernet eth0 {
       address dhcp
       address dhcpv6
       description WAN
       duplex auto
       hw-id xx:xx:xx:xx:xx:xx
       smp-affinity auto
       speed auto
   }
   ...
}
...

After first reboot, the following is printed to the serial console:

[  OK  ] Started Login Service.
[  OK  ] Started Permit User Sessions.
         Starting Serial Getty on ttyS0...
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started System Logging Service.
[   12.279929] vyatta-router[1536]: starting staticd since zebra is running. bgpd. ripd. ripngd. ospfd. ospf6d.
[   12.519833] vyatta-router[1536]: Exiting from the script
[   12.539559] vyatta-router[1536]: Mounting VyOS Config...done.

Welcome to VyOS - xxxxxxx ttyS0

gw login: [   57.796231] vyatta-router[1536]: Starting VyOS router: migrate rl-system firewall configure failed!

This is the syslog:

Oct 14 18:44:25 gw dhclient: Can't bind to dhcp address: Cannot assign requested address
Oct 14 18:44:25 gw dhclient: Please make sure there is no other dhcp server
Oct 14 18:44:25 gw dhclient: running and that there's no entry for dhcp or
Oct 14 18:44:25 gw dhclient: bootp in /etc/inetd.conf.   Also make sure you
Oct 14 18:44:25 gw dhclient: are not running HP JetAdmin software, which
Oct 14 18:44:25 gw dhclient: includes a bootp server.
Oct 14 18:44:25 gw dhclient: 
Oct 14 18:44:25 gw dhclient: If you think you have received this message due to a bug rather
Oct 14 18:44:25 gw dhclient: than a configuration issue please read the section on submitting
Oct 14 18:44:25 gw dhclient: bugs on either our web page at www.isc.org or in the README file
Oct 14 18:44:25 gw dhclient: before submitting a bug.  These pages explain the proper
Oct 14 18:44:25 gw dhclient: process and the information we find helpful for debugging..
Oct 14 18:44:25 gw dhclient: 
Oct 14 18:44:25 gw dhclient: exiting.
Oct 14 18:44:25 gw dhclient: Can't bind to dhcp address: Cannot assign requested address
Oct 14 18:44:25 gw dhclient: Please make sure there is no other dhcp server
Oct 14 18:44:25 gw dhclient: running and that there's no entry for dhcp or
Oct 14 18:44:25 gw dhclient: bootp in /etc/inetd.conf.   Also make sure you
Oct 14 18:44:25 gw dhclient: are not running HP JetAdmin software, which
Oct 14 18:44:25 gw dhclient: includes a bootp server.
Oct 14 18:44:25 gw dhclient: 
Oct 14 18:44:25 gw dhclient: If you think you have received this message due to a bug rather
Oct 14 18:44:25 gw dhclient: than a configuration issue please read the section on submitting
Oct 14 18:44:25 gw dhclient: bugs on either our web page at www.isc.org or in the README file
Oct 14 18:44:25 gw dhclient: before submitting a bug.  These pages explain the proper
Oct 14 18:44:25 gw dhclient: process and the information we find helpful for debugging..
Oct 14 18:44:25 gw dhclient: 
Oct 14 18:44:25 gw dhclient: exiting.
Oct 14 18:44:26 gw ntpd[3969]: ntpd [email protected] Fri Jul 22 17:30:51 UTC 2016 (1)
Oct 14 18:44:26 gw ntpd[3970]: proto: precision = 0.117 usec
Oct 14 18:44:30 gw dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
Oct 14 18:44:30 gw dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
Oct 14 18:44:30 gw dhcpd: 
Oct 14 18:44:30 gw dhcpd: No subnet declaration for eth0 (x.x.x.x).
Oct 14 18:44:30 gw dhcpd: ** Ignoring requests on eth0.  If this is not what
Oct 14 18:44:30 gw dhcpd:    you want, please write a subnet declaration
Oct 14 18:44:30 gw dhcpd:    in your dhcpd.conf file for the network segment
Oct 14 18:44:30 gw dhcpd:    to which interface eth0 is attached. **
Oct 14 18:44:30 gw dhcpd: 
Oct 14 18:44:30 gw snmpd[4364]: Duplicate IPv4 address detected, some interfaces may not be visible in IP-MIB
Oct 14 18:44:32 gw boot-config-loader: Commit failed at boot.
Oct 14 18:44:32 gw kernel: [   57.736434] random: crng init done
Oct 14 18:44:32 gw kernel: [   57.736436] random: 6 urandom warning(s) missed due to ratelimiting

At this point, the eth0 interface item show above also vanishes from the output of 'show configuration', meaning on a second reboot the interface likely won't even be configured if any config changes are made.

In /var/lib/dhcp there are two client configuration files for eth0, one for IPv4 and one for IPv6.:

vyos@gw:~$ cat /var/lib/dhcp/dhclient_eth0.conf 
#
# autogenerated by vyatta-interfaces.pl on Sun Oct 14 18:44:24 UTC 2018
#
interface "eth0" {
        send host-name "gw";
        request subnet-mask, broadcast-address, routers, domain-name-servers, interface-mtu;
}

vyos@gw:~$ cat /var/lib/dhcp/dhclient_v6_eth0.conf 
# This file was auto-generated by the Vyatta
# configuration sub-system.  Do not edit it.

#   Generated on Sun Oct 14 18:44:25 2018 by root
#
interface "eth0" {
}

It appears that when rebooting, the IPv4 dhclient starts successfully. The IPv6 dhclient attempts to start and fails when it tries to bind a port. Searching for the issue reveals this: https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1447715

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close

Event Timeline

Some further investigation:

  • The presence of DHCP (v4) is actually insignificant, DHCPv6 alone on an interface also fails with the same error and loss of config.
  • When the interface is initially configured and committed with DHCPv6 (prior to reboot), dhclient -6 ... starts successfully, adding more weight to that Ubuntu bug report that suggests it's a timing issue with the interface coming up.
syncer changed the visibility from "Subscribers" to "Public (No Login Required)".Oct 14 2018, 7:23 PM
aaliddell renamed this task from DHCP and DHCPv6 on same interface fails to DHCPv6 client on interface fails after reboot.Oct 14 2018, 7:44 PM
syncer triaged this task as Normal priority.Oct 14 2018, 8:28 PM

The relevant Debian bug is https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834928
From this report, the issue is in ifupdown and is supposedly fixed in 0.8.11. Unfortunately, this version is not available in Jessie without resorting to backports.

syncer changed the subtype of this task from "Task" to "Bug".Oct 18 2018, 5:40 AM
aaliddell claimed this task.
aaliddell moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.0-rc5) board.

Resolved by waiting for IPv6 DAD to complete in scripts/vyatta-dhcpv6-client.pl. The 'configure failed!' message no longer appears, dhclient starts and the configuration nodes are not deleted.
Typically it only has to wait 1 second for DAD to complete, so on some systems/reboots you would never have seen this issue.