Page MenuHomeVyOS Platform

DHCP v6 client only supports single interface configuration
Closed, ResolvedPublicBUG

Description

Using DHCPv6 on a single interface works fine. Setting up DHCPv6 (client) on two interfaces causes either one or the other to fail, depending on which instance of dhcp6c started first (that one succeeds). The same situation has been found by other projects, e.g. pfSense: https://redmine.pfsense.org/issues/6880

dhcp6c does not support multiple instantiations. Possible solutions would be to put all dhcp6c configuration in a single file and run a single instance or to patch dhcp6c to bind to an interface rather than ::

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.4-rolling-202204080957
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

At least dhcpv6 address assign correctly, VyOS 1.4-rolling-202204162001

set interfaces ethernet eth2 address 'dhcp'
set interfaces ethernet eth2 address 'dhcpv6'
set interfaces ethernet eth3 address 'dhcp'
set interfaces ethernet eth3 address 'dhcpv6'

Show interfaces:

vyos@vyos:~$ show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             -                                 u/u  
eth1             -                                 u/u  
eth2             100.64.20.21/24                   u/u  WAN01
                 2001:db8:23::934f/128                  
eth3             100.64.30.21/24                   u/u  WAN02
                 2001:db8::934f/128

Adding logs. dhcpv6 configured for interfaces eth0 and eth3. Depending which starts first, the other one fails and gives "unexpected interface":

Apr 11 14:57:43 vyos dhcp6c[31967]: copy_option: set client ID (len 18)
Apr 11 14:57:43 vyos dhcp6c[31967]: copy_option: set elapsed time (len 2)
Apr 11 14:57:43 vyos dhcp6c[31967]: copy_option: set option request (len 4)
Apr 11 14:57:43 vyos dhcp6c[31967]: client6_send: send information request to ff02::1:2%eth3
Apr 11 14:57:43 vyos dhcp6c[31967]: dhcp6_reset_timer: reset a timer on eth3, state=INFOREQ, timeo=511, retrans=131616
Apr 11 14:57:43 vyos dhcp6c[31757]: client6_recv: unexpected interface (5)
Apr 11 14:59:54 vyos dhcp6c[31967]: copy_option: set client ID (len 18)
Apr 11 14:59:54 vyos dhcp6c[31967]: copy_option: set elapsed time (len 2)
Apr 11 14:59:54 vyos dhcp6c[31967]: copy_option: set option request (len 4)
Apr 11 14:59:54 vyos dhcp6c[31967]: client6_send: send information request to ff02::1:2%eth3
Apr 11 14:59:54 vyos dhcp6c[31967]: dhcp6_reset_timer: reset a timer on eth3, state=INFOREQ, timeo=512, retrans=109956
Apr 11 14:59:54 vyos dhcp6c[31757]: client6_recv: unexpected interface (5)

on restart of dhcpv6 client, eth3 client sometimes starts first, and we get "unexpected interface" for eth0.

I see no errors on 1.4:

vyos@vyos:~$ show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             2001:b0b0:1111:1::100/128         u/u  
eth1             2001:cafe:1111:1::100/128         u/u  
eth2             2001:c0ca:1111:1::100/128         u/u  
eth3             -                                 u/u  
lo               127.0.0.1/8                       u/u  
                 ::1/128                                
vyos@vyos:~$ show config comm | grep dhcp
set interfaces ethernet eth0 address 'dhcpv6'
set interfaces ethernet eth1 address 'dhcpv6'
set interfaces ethernet eth2 address 'dhcpv6'
vyos@vyos:~$ sudo ps aux | grep dhcp
root        1264  0.0  0.0   2548   132 ?        Ss   11:20   0:00 /usr/sbin/dhcp6c -D -k /run/dhcp6c/dhcp6c.eth1.sock -c /run/dhcp6c/dhcp6c.eth1.conf -p /run/dhcp6c/dhcp6c.eth1.pid eth1
root        1318  0.0  0.0   2548   132 ?        Ss   11:20   0:00 /usr/sbin/dhcp6c -D -k /run/dhcp6c/dhcp6c.eth2.sock -c /run/dhcp6c/dhcp6c.eth2.conf -p /run/dhcp6c/dhcp6c.eth2.pid eth2
root        1419  0.0  0.0   2548   132 ?        Ss   11:20   0:00 /usr/sbin/dhcp6c -D -k /run/dhcp6c/dhcp6c.eth0.sock -c /run/dhcp6c/dhcp6c.eth0.conf -p /run/dhcp6c/dhcp6c.eth0.pid eth0
vyos        1860  0.0  0.1   6376   712 ttyS0    S+   11:23   0:00 grep dhcp
vyos@vyos:~$

Can you re-check using a newer 1.4 version @billsimon ?

I'm closing this one. No news in the last year, and the tests I've done last month were ok.