Score:0

Static IPv6 LAN address while using SLAAC for global unicast

gu flag

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.

Ron Maupin avatar
us flag
Does this answer your question? [Is there a way to disable IPv6 SLAAC on a per-interface basis in Debian?](https://serverfault.com/questions/263976/is-there-a-way-to-disable-ipv6-slaac-on-a-per-interface-basis-in-debian)
bungsearch avatar
gu flag
No, this per-interface setting does not work because it deactivates automatic address configuration for all prefixes.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.