Re: Question about DHCPv6 timeout behavior
Roy Marples
Tue Mar 14 14:33:03 2017
Hi Harald
On 14/03/2017 12:38, Harald Albrecht wrote:
> I'm using dhcpcd in a virtual environment with DHCPv6 prefix delegation.
> There is a constraint of which I'm unsure as to whether this does
> influence dhcpcd's timeout behavior, so I would be glad if someone here
> can shed some light on it. I'm also unsure as to whether I simply missed
> something in the general design and configuration of dhcpcd.
dhcpcd doesn't care about VM's
I'm using them a lot more right now - infact this mail server (and my
entire domain for that matter) runs in a NetBSD XEN DOMU client.
I also have images on this box for FreeBSD, OpenBSD and Dilos .... and
another NetBSD image as a binary builder for my other boxes.
All run dhcpcd.
> The use case is as follows: I have a router cascade of two IPv6 routers,
> each with dhcpcd. On each router, eth0 faces upstream, eth1 downstream.
> Due to the environment, both routers run as docker containers, and a
> side effect of all this is that et0 and eth1 are more or less
> permanently up (if that is of any importance).
>
> Sometimes, the lower router dhcpcd becomes ready before the upper router
> gets ready with its local DHCPv6 PD server. What I notice is that dhcpcd
> tries to contact the upper DHCPv6 server for some time and then falls
> silent. dhcpcd does not terminate, but it doesn't seem to retry
> contacting the server again -- unless I'm missing here some
> communication by not waiting long enough.
This sounds like a bug!
dhcpcd only stops DHCPv6 when it get a response, at least in my testing.
However, it does wrap generic DHCPv6 and DHCPv6-PD into one message, so
if you get one without the other that could explain it.
Can you post some dhcpcd debug logs please?
Just add `debug` to /etc/dhcpcd.conf.
As it seems to be a boot issue, you probably want `logfile
/var/log/dhcpcd.log` as well incase your syslog logger starts afer
dhcpcd (it does on NetBSD is is annoying as heck, hence the option).
Also, this is a good time to try out the pasebin in phabrictor!
https://dev.marples.name/paste/
Of course, you can still post the logs here if you prefer.
> 1. So, do I need statically IP configuration in order to make dhcpcd
> fall back on it and terminate after configuring the fallback?
No
> 2. Does dhcpcd also time out and terminate without a fallback
> configuration? If this is possible, how do I configure this --
> preferably without a fallback configuration (unless this could be an
> empty one)?
Not with DHCPv6.
Where-as there's a clear use case for fallback configs with IPv4, there
is little for IPv6 because the whole protocol falls apart if there is no
working advertising router.
> My rationale here is that I would like to make the routers work without
> having to up/down interfaces if possible, and without any dependy on the
> startup sequence.
I agree entirely.
Lets see what the logs say and work it out from there.
Roy
Archive administrator: postmaster@marples.name