0

I've learned the way to automatically configure a device's IPv6 address. It's based on some flag bits in the RA (router advertisement) ICMPv6 packet.

When using SLAAC (stateless), the device will generate the last 64 bits based on some algorithms (not necessarily EUI-64) , can these bits will be concatenated to the prefix (also 64 bits) to form a global unicast IPv6 address.

When using DHCPv6 (stateful), the device will ask the DHCPv6 server, and the DHCPv6 server will allocate an IPv6 address to this device.

I know that when the all the "A" (autonomous), "M" (managed), "O" (other) bits in the RA packet are set to 1, the device will configure its own stateless address, and at the same time obtain an allocated address from DHCPv6 server.

When I run ip addr or ifconfig on Linux, ifconfig on macOS, ipconfig on Windows, I can see that my device has 2 global unicast IPv6 addresses with same prefixes. One of them is a temporary address. I know this is for privacy considerations.

I'm wondering if these 2 IPv6 addresses of my device are related to the 2 ways of automatically address configuration? For example, the temporary address is configured using SLAAC and the non-temporary address is configured by DHCPv6.

1
  • 1
    It's not related to the two ways of configuration; either DHCP is used for addresses, or it isn't. Commented May 21, 2024 at 5:36

1 Answer 1

0

I've found the answer myself. Like @vidarlo said in the question comment, the 2 IPv6 addresses of my device ARE NOT related to the 2 ways of address auto configuration.

I've checked the settings in my router. I'm using an OpenWRT router, and the configuration file could be found at /etc/config/dhcp (Note though the file name is "dhcp", it actually also contains the configuration for SLAAC). What I found is that my router sets the "A" flag bit, doesn't set the "M" flag bit, and set the "O" flag bit. This means the auto configuration method is "stateless DHCP". Each device gets the 64 bits prefix in the RA packet and generate its own 64 bits suffix (interface ID) based on some algorithms (maybe EUI-64 or RFC7217), thus the "A" bit. Each device also gets the DNS server in the RA packet, thus the "O" bit.

So why are there 2 addresses? This is due to RFC 4941. You can refer to this question on another sub-site of stack exchange.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.