-2

I have a router. This router has two interfaces - one into my LAN with a static IP (xl1 with fd01::1/64) and one with a dynamic IP ( xl0 with autoconf ). My desktop has fd01::2/64. If I ping from fd01::2 to fd01::1 it works just fine.

net.inet6.ip6.forwarding is activated.

If I do "ifconfig xl0 inet6 autoconf" the ping suddenly stops.

The following route -n show output on the first situation (no autoconf on xl0)

fd01::/64 link#3  UC  1 0  -  4 xl1  
fd01::1  00:50:04:12:34:56 UHLl   0 0 -  1 lo0  
fd01::2  b8:ac:6f:12:34:56 UHLc   0 3 -  4 xl1  

After this i do "ifconfig xl0 inet6 autoconf"

fd01::1 00:50:04:2a:3d:bf UHLl 0 0 - 1 lo0  
fd23:b4dc:4b1e::/64 link#1 UC 0 0  - 4 xl0  
fd23:b4dc:4b1e:0:210:5aff:fe12:345 00:10:5a:31:23:45  UHLl 0 0 - 1 lo0  
fd23:b4dc:4b1e:0:34b6:509e:6d80:af07 00:10:5a:31:23:45 UHLl 0 0 - 1 lo0  

The route for fd01::/64 completely disappeared.

My question is: Is this normal behavior or is this maybe a bug in OpenBSD 5.7 ?

User0815
  • 7
  • 1
  • 5

1 Answers1

1

The fd00::/8 range has some rules about assigning the various parts of the address. The next 40 bits are known as the Global ID, and, according to the RFC, they "MUST be generated with a pseudo-random algorithm."

Apparently, your OS is attempting to follow the RFC when using auto configuration. See RFC 4193, Unique Local IPv6 Unicast Addresses for details on using the Unique Local address range.

Community
  • 1
  • 1
Ron Maupin
  • 6,180
  • 4
  • 29
  • 36
  • So there is no way to assign v6 addresses by hand? – User0815 Sep 23 '15 at 18:41
  • There certainly are are, but special address ranges have special rules. Any global address range allows you to assign addresses as you see fit: manually, DHCPv6, SLAAC, etc. – Ron Maupin Sep 23 '15 at 18:46
  • How does the router detect "not random generated" Global IDs? I tried to use 2001:db8::/64 but have the same effect - the routes kicked out. If the fd23 interface went down or the fd23 adresses from xl0 are removed the routes for 2001:db8:: appear. – User0815 Sep 23 '15 at 19:12
  • I would imagine that auto-configuration tells it to generate a random Global ID. Certainly `01::` doesn't appear to be random. This is something you should discuss with the router manufacturer. – Ron Maupin Sep 23 '15 at 19:16