dhcpcd-discuss

Re: problem with expired prefix (dhcpv6)

Stuart Henderson

Fri Apr 21 16:33:31 2017

On 2017/04/21 17:12, Harald Dunkel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> On 04/21/17 14:48, Stuart Henderson wrote:
> > 
> > Unless I misunderstand the problem I think this may have been fixed in -current (as of sys/netinet6/in6.c r1.201, committed this week).
> > 
> > Harald, can you try a recent snapshot kernel and this ports patch? (At this point if you're on 6.1 release you should be able to get away with just using a snapshot kernel without updating userland).
> > 
> 
> Done. The snapshots kernel was built this morning at 7:10. After a
> reboot the patched dhcpcd gave me
> 
> Apr 21 16:52:29 marvin dhcpcd[38405]: DUID 00:01:00:01:20:79:21:d4:80:ee:73:95:c1:0c
> Apr 21 16:52:29 marvin dhcpcd[38405]: pppoe0: IAID 00:00:00:00
> Apr 21 16:52:29 marvin dhcpcd[38405]: pppoe0: rebinding prior DHCPv6 lease
> Apr 21 16:52:29 marvin dhcpcd[38405]: re1: waiting for carrier
> Apr 21 16:52:30 marvin dhcpcd[38405]: pppoe0: soliciting an IPv6 router
> Apr 21 16:52:30 marvin dhcpcd[38405]: re1: carrier acquired
> Apr 21 16:52:30 marvin dhcpcd[38405]: re1: IAID 73:95:c1:0d
> Apr 21 16:52:31 marvin dhcpcd[38405]: pppoe0: Router Advertisement from fe80::101:101:3e9b:f1ab
> Apr 21 16:52:31 marvin dhcpcd[38405]: pppoe0: adding address 2003:dd:b3bf:2e18:665a:4ff:fe35:830a/64
> Apr 21 16:52:39 marvin dhcpcd[38405]: pppoe0: failed to rebind prior delegation
> Apr 21 16:52:39 marvin dhcpcd[38405]: pppoe0: soliciting a DHCPv6 lease
> Apr 21 16:52:41 marvin dhcpcd[38405]: pppoe0: REPLY6 received from fe80::101:101:3e9b:f1ab
> Apr 21 16:52:41 marvin dhcpcd[38405]: pppoe0: renew in 900, rebind in 1440, expire in 14400 seconds
> Apr 21 16:52:41 marvin dhcpcd[38405]: lo0: adding reject route to 2003:dd:b3ee:1800::/56 via ::1
> Apr 21 16:52:41 marvin dhcpcd[38405]: pppoe0: delegated prefix 2003:dd:b3ee:1800::/56
> Apr 21 16:52:41 marvin dhcpcd[38405]: re1: adding address 2003:dd:b3ee:1800::1/56
> Apr 21 16:52:41 marvin dhcpcd[38405]: re1: changing route to 2003:dd:b3ee:1800::/56
> Apr 21 16:52:41 marvin dhcpcd[38405]: forked to background, child pid 74240
> 
> # ifconfig pppoe0 down
> # ifconfig pppoe0 up
> 
> Apr 21 16:53:32 marvin dhcpcd[74240]: pppoe0: carrier lost
> Apr 21 16:53:32 marvin dhcpcd[74240]: pppoe0: deleting address 2003:dd:b3bf:2e18:665a:4ff:fe35:830a/64
> Apr 21 16:53:32 marvin dhcpcd[74240]: pppoe0: if_addrflags: 93.233.195.203: Undefined error: 0
> Apr 21 16:53:32 marvin dhcpcd[74240]: pppoe0: if_addrflags: Undefined error: 0
> Apr 21 16:54:02 marvin dhcpcd[74240]: pppoe0: carrier acquired
> Apr 21 16:54:02 marvin dhcpcd[74240]: pppoe0: IAID 00:00:00:00
> Apr 21 16:54:02 marvin dhcpcd[74240]: pppoe0: rebinding prior DHCPv6 lease
> Apr 21 16:54:02 marvin dhcpcd[74240]: pppoe0: Router Advertisement from fe80::101:101:3e9b:f1ab
> Apr 21 16:54:02 marvin dhcpcd[74240]: pppoe0: adding address 2003:dd:b3bf:2e1c:665a:4ff:fe35:830a/64
> Apr 21 16:54:12 marvin dhcpcd[74240]: pppoe0: failed to rebind prior delegation
> Apr 21 16:54:12 marvin dhcpcd[74240]: pppoe0: soliciting a DHCPv6 lease
> Apr 21 16:54:15 marvin dhcpcd[74240]: pppoe0: REPLY6 received from fe80::101:101:3e9b:f1ab
> Apr 21 16:54:15 marvin dhcpcd[74240]: pppoe0: renew in 900, rebind in 1440, expire in 14400 seconds
> Apr 21 16:54:15 marvin dhcpcd[74240]: lo0: adding reject route to 2003:dd:b3ee:1c00::/56 via ::1
> Apr 21 16:54:15 marvin dhcpcd[74240]: pppoe0: delegated prefix 2003:dd:b3ee:1c00::/56
> Apr 21 16:54:15 marvin dhcpcd[74240]: re1: adding address 2003:dd:b3ee:1c00::1/56
> Apr 21 16:54:15 marvin dhcpcd[74240]: re1: changing route to 2003:dd:b3ee:1c00::/56
> 
> The error message after "carrier lost" is gone.

That's promising.

>                                                 The "failed to rebind
> prior delegation" is still there, but this might be an issue of
> Deutsche Telekom.

Here they refused your request to re-use the previous delegation (as
you would expect for a dynamic allocation that changes each time).
In my case my ISP hands me the same /48 each time and I get "pppoe1:
rebinding prior DHCPv6 lease" instead.

> I still have an invalid IPv6 address bound to re1, but both have
> a limited lifetime now:
> 
> # ifconfig re1
> re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         lladdr 80:ee:73:95:c1:0d
>         index 3 priority 0 llprio 3
>         groups: intern
>         media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
>         status: active
>         inet 10.42.100.2 netmask 0xffffff00 broadcast 10.42.100.255
>         inet6 fe80::82ee:73ff:fe95:c10d%re1 prefixlen 64 scopeid 0x3
>         inet6 2003:dd:b3ee:1800::1 prefixlen 56 pltime 1377 vltime 13977
>         inet6 2003:dd:b3ee:1c00::1 prefixlen 56 pltime 1470 vltime 14070
> 
> Question: Shouldn't the old IPv6 address be marked as "deprecated"? I am not
> sure if ifconfig can show.
> 
> Without this deprecated flag dnsmasq doesn't know. It still picks up both
> prefixes and distributes them in my LAN.

An address is "deprecated" in the interval between pltime ("preferred
lifetime") and vltime ("valid lifetime") expiring. In that case, either
address is expected to work for incoming connections, but deprecated
addresses are skipped as a source address for new outgoing connections.
This allows a smooth transition in cases where both addresses work in
parallel. ifconfig does show "deprecated" when this happens.

What you describe is different to the usual "deprecated" case as the
address is expected to _not_ work any more. Maybe in the "failed to
rebind" case it would make sense to just remove the address, or
maybe keep it but reset pltime to 0 to allow local connections
to the old address to stay working. This would be under dhcpcd's
control rather than the kernel.


Follow-Ups:
Re: problem with expired prefix (dhcpv6)Harald Dunkel
References:
problem with expired prefix (dhcpv6)Harald Dunkel
Re: problem with expired prefix (dhcpv6)Roy Marples
Re: problem with expired prefix (dhcpv6)Harald Dunkel
Re: problem with expired prefix (dhcpv6)Roy Marples
Re: problem with expired prefix (dhcpv6)Stuart Henderson
Re: problem with expired prefix (dhcpv6)Harald Dunkel
Archive administrator: postmaster@marples.name