Re: Not getting IPv6 link local address when link carrier goes up -> down -> up
Floris Bos
Sun Oct 20 10:48:54 2019
Hi Roy,
On 10/20/19 11:58 AM, Roy Marples wrote:
On 19/10/2019 12:14, Floris Bos wrote:
There seems to be a problem in which a network interface is sometimes
not get assigned an IPv6 link local address if the network interface
goes quickly up -> down -> up again. Using dhcpcd-8.1.1 I ran the
following script on a Linux VM
while true; do ip link set down dev eth0; ip link set up dev eth0;
sleep 3; done
Each time the link went down, dhcpcd removed the LL address and each
time it came up dhcpcd added it back.
While it does not get the IPv6 link local address when the USB device
first shows up, and the network interface goes up -> down -> up quickly:
==
Oct 20 11:40:12 raspberrypi dhcpcd[392]: usb0: IAID 60:99:b3:1e
Oct 20 11:40:12 raspberrypi dhcpcd[392]: usb0: adding address
fe80::4d92:7daa:a2d7:b46
Oct 20 11:40:12 raspberrypi dhcpcd[392]: usb0: carrier lost
Oct 20 11:40:12 raspberrypi dhcpcd[392]: usb0: deleting address
fe80::4d92:7daa:a2d7:b46
Oct 20 11:40:12 raspberrypi dhcpcd[392]: usb0: carrier acquired
Oct 20 11:40:12 raspberrypi dhcpcd[392]: usb0: IAID 60:99:b3:1e
Oct 20 11:40:13 raspberrypi dhcpcd[392]: usb0: soliciting a DHCP lease
Oct 20 11:40:13 raspberrypi dhcpcd[392]: usb0: soliciting an IPv6 router
==
It does if I run your command:
==
Oct 20 11:40:16 raspberrypi dhcpcd[392]: usb0: carrier lost
Oct 20 11:40:16 raspberrypi dhcpcd[392]: usb0: carrier acquired
Oct 20 11:40:16 raspberrypi dhcpcd[392]: usb0: IAID 60:99:b3:1e
Oct 20 11:40:16 raspberrypi dhcpcd[392]: usb0: adding address
fe80::4d92:7daa:a2d7:b46
Oct 20 11:40:16 raspberrypi dhcpcd[392]: usb0: soliciting a DHCP lease
Oct 20 11:40:17 raspberrypi dhcpcd[392]: usb0: soliciting an IPv6 router
Oct 20 11:40:19 raspberrypi dhcpcd[392]: usb0: carrier lost
Oct 20 11:40:19 raspberrypi dhcpcd[392]: usb0: deleting address
fe80::4d92:7daa:a2d7:b46
Oct 20 11:40:19 raspberrypi dhcpcd[392]: usb0: carrier acquired
Oct 20 11:40:19 raspberrypi dhcpcd[392]: usb0: IAID 60:99:b3:1e
Oct 20 11:40:19 raspberrypi dhcpcd[392]: usb0: adding address
fe80::4d92:7daa:a2d7:b46
Oct 20 11:40:20 raspberrypi dhcpcd[392]: usb0: soliciting an IPv6 router
Oct 20 11:40:20 raspberrypi dhcpcd[392]: usb0: soliciting a DHCP lease
==
So problem is likely highly timing sensitive.
Could you try upgrading please and see if it's still an issue?
Same problem when I compile dhcpcd 8.1.1 from source.
==
root@raspberrypi:/home/pi# dhcpcd --version
dhcpcd 8.1.1
Copyright (c) 2006-2019 Roy Marples
Compiled in features: INET ARP ARPing IPv4LL INET6 DHCPv6 AUTH
root@raspberrypi:/home/pi# journalctl -u dhcpcd -b |grep usb0
Oct 20 11:47:26 raspberrypi dhcpcd[394]: usb0: waiting for carrier
Oct 20 11:47:26 raspberrypi dhcpcd[394]: usb0: carrier acquired
Oct 20 11:47:26 raspberrypi dhcpcd[394]: usb0: IAID 60:99:b3:1e
Oct 20 11:47:26 raspberrypi dhcpcd[394]: usb0: adding address
fe80::62c8:16be:6909:4f84
Oct 20 11:47:26 raspberrypi dhcpcd[394]: usb0: carrier lost
Oct 20 11:47:26 raspberrypi dhcpcd[394]: usb0: deleting address
fe80::62c8:16be:6909:4f84
Oct 20 11:47:26 raspberrypi dhcpcd[394]: usb0: carrier acquired
Oct 20 11:47:26 raspberrypi dhcpcd[394]: usb0: IAID 60:99:b3:1e
Oct 20 11:47:27 raspberrypi dhcpcd[394]: usb0: soliciting a DHCP lease
Oct 20 11:47:27 raspberrypi dhcpcd[394]: usb0: soliciting an IPv6 router
Oct 20 11:47:46 raspberrypi dhcpcd[394]: usb0: probing for an IPv4LL address
Oct 20 11:47:51 raspberrypi dhcpcd[394]: usb0: using IPv4LL address
169.254.140.228
Oct 20 11:47:51 raspberrypi dhcpcd[394]: usb0: adding route to
169.254.0.0/16
Yours sincerely,
Floris Bos
Archive administrator: postmaster@marples.name