1

I have a raspberry connected to an OpenWrt IPv4/IPv6 router. As you can see below, on the eth1 interface I get two ULA addresses: fd00::1f0/128 and fd00::27d5:6387:c8e5:3b1a/64

On the router, the fd00::/64 ULA prefix is set, for testing purposes. My questions are:

  1. Why are there two different ULA addresses?
  2. How are they created? Is the prefix advertised somehow from the router? Is it requested by the hosts on the network?
  3. What does the /128 mean on the first ULA addr? It does not make much sense to have a 128bit prefix length..

Running ip -a on my raspberry

    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:e0:99:00:06:d3 brd ff:ff:ff:ff:ff:ff
    
    inet 192.168.1.10/24 brd 192.168.1.255 scope global dynamic noprefixroute eth1
       valid_lft 41726sec preferred_lft 36326sec
    inet6 fd00::1f0/128 scope global dynamic noprefixroute
       valid_lft 42612sec preferred_lft 42612sec
    inet6 fd00::27d5:6387:c8e5:3b1a/64 scope global mngtmpaddr noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::6e28:de2e:f0e0:ce5f/64 scope link
       valid_lft forever preferred_lft forever

1 Answer 1

2

The valid_lft value on the first IPv6 address means it was acquired through a DHCP lease. It shows a /128 mask because it's a single host IP (compare it to /32 in IPv4). ip -6 route should show the /64 network

The mngtmpaddr flag on the second IPv6 address means it's a Privacy Extensions address pool for use with Stateless Address Autoconfiguration (SLAAC). If the use_tempaddr sysctl setting is enabled, the kernel will generate addresses from that pool as source of outgoing traffic

Basically, it's going to use the auto-generated mngtmpaddr to communicate on the /64 LAN, and the /128 address to communicate directly with the gateway

2
  • 1) "and the /128 address to communicate directly with the gateway": I've seen that in order to communicate with the router, the link local address is also used. Do you mean it will use this address when needed to be routed outside the LAN? 2) About the mngtmpaddr flag: Is this related to creating the IID for the SLAAC ULA address not as an EUI-64 but with a hash function, to avoid privacy issues? 3) Is there a reason why the SLAAC ULA addr is used on the LAN and the DHCP one is used for the gateway? I guess both ULAs could work in both cases?
    – NickG
    Commented Dec 7, 2023 at 8:22
  • 1) yes, I should have said 'through' the gateway. 2) yes, it's the slaac template from which to generate privacy addresses. 3) It was a generalization/simplification on my part. The slaac IPs can come from autoconfiguration with other devices on the network, and just get used for local traffic (but can be routable + advertised from the router). A dhcpv6 address will come from your router and get a route out. You can use both though, but the actual rules for which gets used when depend more on your client's OS/network stack/routing table. I'm not familiar enough to go into much detail there
    – Cpt.Whale
    Commented Dec 7, 2023 at 17:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .