Re: IPv6 PD - assign multiple static addresses
Roy Marples
Fri Mar 31 14:40:39 2017
On 31/03/2017 15:18, Arthur Țițeică wrote:
>> Currently no, you can only assign one static IP address.
>> This was initially discussed here:
>> https://roy.marples.name/archives/dhcpcd-discuss/0001124.html
>>
>> No-one really spoke up about needing >1 at the time and providing a use
>> case for it. Do you have one?
>>
>
> Maarten in the other reply has very good points in my opinion.
Yes, they are good points. *
> As for me I'm just toying with stuff to see how things go so no real case but
> more of a "what I would do if such a need arises".
>
> I started with dhclient and it didn't assign any IP address (at least I
> couldn't find out how). Now with dhcpcd the limit is 1 IP.
>
> What's next in this situation? Use another daemon, write a custom script? I
> did this and things are racy and buggy.
Depends on how you write the script and what it's racing with :)
If it was me, I would write a dhcpcd.exit-hook script to check for the
PREINIT reason and add the addresses there.
dhcpcd won't continue until the script has run, so there should be no
race for dhcpcd at least, so the only possible race would be on a 3rd
party waiting for DAD to complete with the addresses?
* What I find interesting is that they equally apply to IPv4 addresses
(bar the NAT reason, but that's for the protocol as a whole, not the
address itself which is this debate).
You *can* have many public IPv4 addresses on one interface - you could
even control them all via DHCP (with dhcpcd of course).
But no-one has ever asked for many static IPv4 addresses.
I wonder if this is partly bound to you get one IPv4 address from
upstream but with IPv6 you generally get a /64 block (of course you
could get more or less, but you get the idea).
I would recommend filing a ticket for the dhcpcd project here:
https://dev.marples.name
So I can stick it in my to work on queue.
We might also want to discuss how it looks in the config file - many
static ip6_address=... lines, some kind of array marking, etc and if
they should be exported to hook scripts.
Roy
Archive administrator: postmaster@marples.name