dhcpcd-discuss

dhcpcd+radvd under debian stretch causes the latter to reload every second

Peng Shao

Sun Dec 20 11:01:10 2015

Hi, thanks for reading my post. I am using dhcpcd 6.9.3, radvd 2.11
under debian testing for a linux box used as ipv6 gateway/router. The
box has four nics but two of them are not being used and I use enp4s0
as WAN and enp6s0 as LAN. The following is my dhcpcd.conf,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
duid
noipv6rs
waitip
interface enp4s0
ipv6rs
ia_na 1
ia_pd 2/::/56 enp6s0/1/64 enp8s0/2/64 enp9s0/3/64
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Debian still uses /etc/network/interface:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auto enp4s0
iface enp4s0 inet static
auto enp6s0
iface enp6s0 inet static
    address 10.0.1.1
    netmask 255.255.255.0
    broadcast 10.0.1.255
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By doing so I was able to obtain a working /56 from my ISP, however a
tcpdump analysis showed that radvd is sending RA to multicast every
second no matter how often I set it to. Launching radvd in debug mode
showed that it would "re-load" itself every second, causing this
issue.

At first I thought it was a bug of radvd and reported it to its
developer, however after researching this bug further it seemed to be
related to dhcpcd as well. If I switch to wide-dhcpv6-client to handle
my ipv6 pd, simply remove "ia_pd 2:..." line from dhcpcd.conf, or
change it to something else like "ia_pd 2 enp6s0/1" radvd will behave
normally, though I was not able to figure out another working
dhcpcd.conf for pd. After comparing different version of radvd, it
seemed during their  2.8-->2.9 update they introduced a new feature to
"Recognize new interfaces coming up and react immediately "

code:
https://github.com/reubenhwk/radvd/commit/4a32c5e4392bb85955bea70a445a68f47945742a

It sounds almost to me that somehow dhcpcd was constantly "refreshing"
network interfaces, causing radvd to see "new" interfaces every
second, therefore reload itself accordingly every second afterwards.

I have no idea if this is a bug of radvd, dhcpcd or perhaps it is my
incorrect dhcpcd.conf file. Using wide-dhcpv6-client for ipv6,
isc-dhcp-client for ipv6 works normally for me in terms of working
dual stack, though I still prefer dhcpcd since it is a lot faster to
start/terminate. I reported this issue to radvd as well  as reporting
it here. Hopefully it could be resolved soon. Thanks.

By the way, I am attaching my dhcpcd log if it helps anyway.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
root@debian:~# dhcpcd
dhcpcd-6.9.3 starting
enp8s0: adding address fe80::230:18ff:fec7:acaf
enp8s0: pltime infinity, vltime infinity
enp9s0: adding address fe80::230:18ff:fec7:acb0
enp9s0: pltime infinity, vltime infinity
enp4s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
enp4s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
enp6s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
enp6s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
enp8s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
enp8s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER
enp9s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
enp9s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER
DUID 00:01:00:01:1e:08:1d:6d:00:30:18:c7:ac:ad
enp4s0: IAID 18:c7:ac:ad
enp4s0: IAID 00:00:00:01
enp4s0: IAID 00:00:00:02
enp4s0: delaying IPv6 router solicitation for 1.0 seconds
enp4s0: reading lease `/var/lib/dhcpcd5/dhcpcd-enp4s0.lease6'
enp4s0: rebinding prior DHCPv6 lease
enp4s0: delaying REBIND6 (xid 0x8c8ff8), next in 0.6 seconds
enp4s0: delaying IPv4 for 0.6 seconds
enp6s0: IAID 18:c7:ac:ae
enp6s0: delaying IPv6 router solicitation for 0.6 seconds
enp8s0: waiting for carrier
enp9s0: waiting for carrier
enp4s0: reading lease `/var/lib/dhcpcd5/dhcpcd-enp4s0.lease'
enp4s0: rebinding lease of 74.69.188.107
enp4s0: sending REQUEST (xid 0xedc594a7), next in 3.2 seconds
enp4s0: broadcasting REBIND6 (xid 0x8c8ff8), next in 1.0 seconds
enp6s0: soliciting an IPv6 router
enp6s0: sending Router Solicitation
enp4s0: REPLY6 received from fe80::201:5cff:fe64:9246
enp4s0: adding address 2604:6000:dfc0:27:2125:6af5:a24c:ee16/128
enp4s0: pltime 602716 seconds, vltime 602716 seconds
enp4s0: delegated prefix 2604:6000:d9c5:3b00::/56
enp6s0: adding address 2604:6000:d9c5:3b01::1/64
enp6s0: pltime 602716 seconds, vltime 602716 seconds
enp6s0: waiting for DHCPv6 DAD to complete
enp8s0: has no carrier, cannot delegate addresses
enp9s0: has no carrier, cannot delegate addresses
enp4s0: renew in 301358 seconds, rebind in 482172 seconds
enp4s0: adding reject route to 2604:6000:d9c5:3b00::/56 via ::1
enp6s0: adding route to 2604:6000:d9c5:3b01::/64
enp4s0: writing lease `/var/lib/dhcpcd5/dhcpcd-enp4s0.lease6'
enp4s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' REBIND6
forking to background
forked to background, child pid 10044
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks in advance,

Peng

Follow-Ups:
Re: dhcpcd+radvd under debian stretch causes the latter to reload every secondRoy Marples
Archive administrator: postmaster@marples.name