I have some IPv6 nodes in two IPv6 networks. There is a single IPv6 router, link-local to all nodes.
The router sends out router advertisements(RA) containing two prefixes for the two networks. The nodes in the network accept the RA and create two random addresses with the prefixes.
I want to configure one node (Alpine Linux) to have a static address for one of the two prefixes, while using SLAAC for the other prefix on the same interface.
The problem is that the server still needs to accept RAs to configure the address for the second network. The result of my failed solution attempts is that I have two addresses configured for the same prefix not one static address.
I configured the network interface with one static address:
/etc/network/interfaces
iface eth0 inet6 static
address fd22:235b:ffe9:1::17/64
The outcome of the configuration is that the interface gets a second address created for that prefix:
inet6 fd22:235b:ffe9:1::17/64 # desired static address
inet6 2001:a53:638:1f01:2bc3:ec82:5ab:db1/64 # desired address derived from router advertisement
inet6 fd22:235b:ffe9:1:ecc3:b271:273a:3836/64 # additional random address
inet6 fe80::4971:fcbf:62cd:8137/64
The kernel parameters for controlling automatic address configuration are all interface-wide and prevent the creation of addresses for both prefixes not just for the one with the static address.
sysctl net.ipv6.conf.eth0.autoconf=0
sysctl net.ipv6.conf.eth0.accept_ra=0
How can I prevent the automatic address configuration for one of the two prefixes?
I do not want to run a DHCPv6-Server.