2

I'm looking for a tool, very much like rdisc6, that will, having received the RA, will configure the v6 address(es) on an interface using a static IID. This is a server that needs to be at a known address within a ULA. (No, I can't use mDNS and SLAAC, as there are certificates bound to names involved, and mDNS may not even work until this interface is configured).
If I have to, I'll extend rdisc6, but I'm hoping not to replicate something someone already did. This will be running on Linux (armv7) inside an LXC container.

3

You should be able to use an IPv6 token for this. The IPv6 token is a manually set IID which remains the same regardless of the IPv6 prefix assigned via SLAAC. Use of IPv6 tokens requires SLAAC.

You can configure the token persistently by setting interface properties in NetworkManager.

# nmcli c mod enp4s0 ipv6.addr-gen-mode eui64
# nmcli c mod enp4s0 ipv6.token ::deca:fbad:c0:ffee

Now with a subnet prefix of 2001:db8:dead:beef::/64 the interface will have the IPv6 address 2001:db8:dead:beef:deca:fbad:c0:ffee.

To remove the token, set it to an empty value. You can then reset the addr-gen-mode to its default.

# nmcli c mod enp4s0 ipv6.token ''
# nmcli c mod enp4s0 ipv6.addr-gen-mode stable-privacy

With systemd-networkd, set the IPv6Token= property in the [Network] section of your configuration.

You can also run the ip token command manually. For use in configuring a container, this is probably what you will end up doing.

If you need multiple IIDs on a single interface, then you're going to have to set them up manually. Nothing else will help you.

  • Thanks for confirming that ip token is the way to go. – mcr May 24 at 15:43
1

The key to using "ip token" turned out that the interface has to be down.

%sudo ifconfig lan down            
%sudo ip token set ::45/64 dev lan 
%sudo ifconfig lan up             
%ifconfig lan
lan: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet6 fe80::1c60:e9ff:fe26:dc74  prefixlen 64  scopeid 0x20<link>
    inet6 2607:f0b0:f:e0::45  prefixlen 64  scopeid 0x0<global>
    inet6 fdba:d505:5c1::45  prefixlen 64  scopeid 0x0<global>
    ether 1e:60:e9:26:dc:74  txqueuelen 1000  (Ethernet)
    RX packets 664833  bytes 85127613 (81.1 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 22823  bytes 3091931 (2.9 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.