Is it possible to have both static and dynamic IPv6 addresses on one interface?
I have two Qemu virtual machines with Ubuntu Server. I would like one of them to be a DHCP server. On the second one, I would like to have two IPv6 addresses. One should be static, and the other one should be obtained from my DHCP server. I am able to create many static addresses, but when I get a dynamic one, I lose all my static addresses except a link-local one. What should I do to have both static and dynamic IPv6 addressess on one interface?
Thank you in advance for any help.
How IPv6 addresses are auto configured depends on the flags in the ICMPv6 RA.
To have the host both request from DHCPv6, and generate its own via SLAAC, you'll likely want to enable all the flags. Autonomous, Managed address configuration, and Other. Plus a prefix information option. And static addresses on the host if desired.
Yes, this may be done with one interface. Linux has been capable of many IPs on one interface for a very long time. (Alias interfaces of the form eth0:0
have been obsolete for just as long. Don't use ifconfig
on Linux any more.)