Assigning hosts static IPv6 addresses within radvd
![]()
Hi,
From what I can see, radvd gives IPv6 address to to users on the local network in my setup, however is it possible to assign specific hosts/mac-addresses, specific IPv6 address (similar to the way you can do this with dhcp3-server)?
Thank you...
Assigning hosts static IPv6 addresses within radvd
![]()
radvd is used for stateless autoconfiguration. What you're looking for is DHCPv6.
Assigning hosts static IPv6 addresses within radvd
![]()
While you cannot "reserve" addresses with RA you can generally expect for the clients to always autoconfigure the same address because they construct their address from the RA prefix and a rearrangement of their MAC address. (It's a little more complex than that, but the each MAC produces one unique host address.)
However, clients may employ a privacy feature to avoid the effectively static address and periodically change addresses. Windows Vista and Windows 7 clients do this by default. Check this setting with netsh interface ipv6 show privacy and disable it with netsh interface ipv6 set privacy state=disabled if you want a consistent autoconfigured address for that host. The linux clients I've seen have privacy disabled by default.
Assigning hosts static IPv6 addresses within radvd
![]()
I didn't know about that set privacy command, I was using netsh interface ipv6 set global randomizeidentifiers=disabled which seems to have the same effect.
Assigning hosts static IPv6 addresses within radvd
![]()
Linux can do that, too, but compared to Windows doesn't do it by default. You need CONFIG_IPV6_PRIVACY=y and then
sysctl -w net.ipv6.conf.all.use_tempaddr=1
(or echo net.ipv6.conf.all.use_tempaddr=1 >> /etc/sysctl.conf to make it persistent.)
Assigning hosts static IPv6 addresses within radvd
![]()
On my machines ipv6 isn't available at the time sysctl.conf is processed, so I had to do it in /etc/network/interfaces
iface eth0 inet6 static
pre-up modprobe ipv6
pre-up sysctl -w net.ipv6.conf.all.autoconf=0
pre-up sysctl -w net.ipv6.conf.eth0.autoconf=0
address 2001:xxxx:xxxx::8
netmask 64
up ip -6 route add 2000::/3 via 2001:xxxx:xxxx::1
Assigning hosts static IPv6 addresses within radvd
Put 'ipv6' in /etc/modules and rebuild your initial ramdisk and you should be fine. Of course, just compiling IPv6 into the kernel is another alternative ;)
|