Re: Late start for IPv6
Jouke Witteveen
Tue Apr 29 13:57:13 2014
On Tue, Apr 29, 2014 at 1:09 AM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> 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 :)
The profile-based nature of netctl is actually quite nice and you can
hardly call its source bloated :-).
>> 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.
I was thinking of something like '--extend-functionality-with=ipv6' as
a new parameter.
I believe -46 doesn't work (not tested, just from reading the source),
which is in line with what the man page tells.
> 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.
Or just un-hardcode the pidfile in general. I don't know if dhcpcd
will play nice with multiple instances of itself on the same
interface, but I don't immediately see why it wouldn't.
> 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.
The rebinding of existing leases is unnecessary, but I fully agree:
this discussion is largely inconsequential.
Best,
- Jouke
Archive administrator: postmaster@marples.name