Re: force IPv6 SLAAC

[Btw, you didn't CC the mailing list. So, I reply to you in private]

That was an oversight - copying the list now. Thanks.
> My situation is with laptops in a large organisation with a central
> DHCP service. The DUID is static and so the laptop gets the same IPv6
> address even when it's moved to a different VLAN with a different
> prefix. When  I realise the IPv6 address is not appropriate I delete
> the lease file and then it all works until the laptop moves VLANs
> again.

It sounds like you are in fact connecting to different networks
(VLANs). I guess, usually you would have different connection profiles
for each network.

Correct. My default profile is just "Wired Connection 1"  - NetworkManager doesn't know.
One downside is that autoconnection would always only autoconnect the
profile used as last. Autoconnect does not allow you to choose the
candiate profile based on the "cable" you plug in. That means, when you
plug to a different network, you'd have to manually activate a
different profile.
That means I have to create separate, almost identical profiles for the different VLANs.

What you hoever could do: write a script (e.g. in
/etc/NetworkManager/dispatcher, see `man NetworkManager` or a a
constantly running service), and whenever you notice that the wrong
profile got activated, activate the better one.

This sounds like a solution: a script that sniffs the network and changes
the profile if the network prefix has changed. This would work for my laptop but
I would worry about setting this up for other laptops in the organisation. 

> Is there a way to change the DUID according to the prefix?

No. You can set `ipv6.dhcp-duid`, including special keywords like
"stable-uuid". See `man nm-settings`. But that is basically fixed for
your connection profile.

Could generating a fresh random DUID each time be a future option for a profile? Then the 
laptop would always get  an appropriate DHCPv6 address for the network. IPv6 
address space is large and hopefully we can update the local DNS service.

One advantage is for privacy: each visit to your local coffee shop guest wifi would be 
with a unique DUID. Just a thought.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]