dhcpcd-discuss

Re: Late start for IPv6

Roy Marples

Mon Apr 28 23:09:30 2014

On 28/04/2014 22:03, Jouke Witteveen wrote:
In netctl, IPv4 and IPv6 are configured separately. In principle,
users could choose to use a different dhcp client for both versions of
the IP. When netctl goes through the IPv4 configuration stage, it
might start dhcpcd for IPv4. Later, in the IPv6 stage, it might want
to start dhcpcd for IPv6. If the client would have been dhclient in
both cases, this means there will be two instances of dhclient
running. One for the IPv4 address and one for the IPv6 address. These
instances can be tinkered with independently. For dhcpcd, it would be
nice if there was some form of introspection possible to allow IPv6 to
be added to the responsibilities of a running IPv4 instance.

If you find this approach is flawed to begin with, that is okay.

It's a perfectly valid approach if you like a daemon per interface per protocol. I personally find that a little bloated, one daemon to manage all interfaces and protocols :)

However, dhcpcd itself has a rather clean separation of the
implementation on both protocols, so my request might not be too hard
to implement (although I couldn't see a trivial fix).

Yes, it's clean and it's fairly trivial to implement via enabling the control socket per interface,
but lets consider the command line.

dhcpcd -4 == IPv4 only
dhcpcd -6 == IPv6 only

So, if dhcpcd starts with -4 and is then later called with -6, what is the expectation? My expectation is that IPv4 is stopped and IPv6 is started. If you want to run both protocols then you should use dhcpcd -46.
This keeps consistency with the current control socket implementation.

Another approach would be to add another option to instruct dhcpcd to use a different pidfile per protocol. This is infact the better solution currently because when dhcpcd writes to it's control socket it returns immediately instead of waiting for the protocol to be configured.

This is all kind of moot anyway. Every distribution under the sun has their own way of configuring this stuff. I just edit dhcpcd.conf(5) with the new configuration and then do `dhcpcd -n` and boom - everything is reconfigured.

Thanks

Roy

Follow-Ups:
Re: Late start for IPv6Jouke Witteveen
References:
Late start for IPv6Jouke Witteveen
Re: Late start for IPv6Roy Marples
Re: Late start for IPv6Jouke Witteveen
Archive administrator: postmaster@marples.name