Re: Detecting DHCPv6 pd lease timeout (in hook) without an existing lease?
Roy Marples
Mon Dec 19 15:01:54 2016
Hi Harald
On 2016-12-19 13:30, Harald Albrecht wrote:
Hi,
I want to realize kind of a "stand-alone" mode on a Raspberry Pi IPv6
router. The RasPi IPv6 router can work either (1) as a cascaded
router, where it asks its upstream delegating router for IPv6 prefixes
and assigns them to its own downstream interface(s). When there is no
upstream connection, the RasPi should switch to (2) stand-alone mode:
it then should configure its downstream interface with a static ULA
prefix. However, as soon as there is an upstream router coming back
and delegating a prefix, the ULA prefix should be removed from the
downstream interaces.
When looking through hook scripts and dhcpcd sources I've noticed the
DELEGATED6 hook $reason, but this covers a new lease, or a dropped
lease on a downstream interface. When there hasn't been any delegated
prefix before, this would not trigger (at least that's my limited
understanding here). In addition, I cannot assume that there is an
old, still valid lease.
I've seen the syslog timeout notice that dhcpd sends after its initial
leasing attempt has been failed. But there does not seem to be a hook
reason for this? Or did I miss it?
Of course, any help here greatly appreciated! And finally, thank you
very much for dhcpcd!
Is there a reason why the two addresses cannot exist at the same time?
See RFC5220 2.1.4 - https://tools.ietf.org/html/rfc5220#page-7
There currently is no hook script for DHCPv6 timeouts because DHCPv6 is
wholey reliant on a functioning IPv6 router brodcasting it's RA where-as
DHCPv4 is fully self supportive.
Also see the recent thread here about Is "--lastleaseextend -p" expected
to work for IPv6 as well? in the archvies.
DELEGATED6 is only run on downstream interfaces as you have correctly
noted.
Roy
Archive administrator: postmaster@marples.name