# IPv6: second router adv. on vlan doesn't add routes



## yggdrasil (May 13, 2021)

Hi all,

I have an OpenBSD router that sends out router advertisements on the main network, my FreeBSD machine gets a public IPv6 as it's supposed to get. Now I've set up a VLAN on both machines for a VPN transfer net. When I tested that with manually set addresses, it worked as expected. Now I wanted the transfer net to also distribute IPv6 automatically (but internal addresses, fd00::/8), so I added the VLAN interface on the router to the router advertisement daemon. On the FreeBSD machine, the VLAN interface gets this advertisement or solicits for it with rtsold, either way, it gets the IPv6 addresses as expected. What's missing however is any kind of route entry. When I add the addresses manually to the interface, the routing table gets populated with the appropriate network entries, but with the automation they are missing. On the "regular" LAN it works as expected.

ifconfig:

```
telekombng: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1400
        options=80003<RXCSUM,TXCSUM,LINKSTATE>
        ether 00:d8:61:37:33:93
        inet6 fe80::2d8:61ff:fe37:3393%telekombng prefixlen 64 scopeid 0x5
        inet6 fd4b:5320:4954:eeee:2d8:61ff:fe37:3393 prefixlen 64 detached autoconf
        inet6 fd4b:5320:4954:eeee:e0f0:70ed:ec19:efd prefixlen 64 detached autoconf temporary
        groups: vlan
        vlan: 101 vlanproto: 802.1q vlanpcp: 0 parent interface: re0
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
```

netstat -rnf inet6

```
Internet6:
Destination                       Gateway                       Flags     Netif Expire
::/96                             ::1                           UGRS        lo0
default                           fe80::200:5eff:fe00:101%re0   UG          re0
::1                               link#2                        UHS         lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
2003:a:a05:2700::/64              link#1                        U           re0
2003:a:a05:2700:2d8:61ff:fe37:3393 link#1                       UHS         lo0
2003:a:a05:2700:c45:19b7:8d75:6915 link#1                       UHS         lo0
2003:a:a05:2700:35c8:935a:244b:6325 link#1                      UHS         lo0
2003:a:a05:2700:41c4:3ace:dbdc:c63a link#1                      UHS         lo0
2003:a:a05:2700:5cf6:f850:610f:fc2d link#1                      UHS         lo0
2003:a:a05:2700:bd43:8e1c:52eb:691d link#1                      UHS         lo0
2003:a:a05:2700:cd63:ecc6:1a55:59bd link#1                      UHS         lo0
2003:a:a05:2700:fc54:e896:250:ae68 link#1                       UHS         lo0
fd4b:5320:4954:eeee:2d8:61ff:fe37:3393 link#5                   UHS         lo0
fd4b:5320:4954:eeee:e0f0:70ed:ec19:efd link#5                   UHS         lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%re0/64                     link#1                        U           re0
fe80::2d8:61ff:fe37:3393%re0      link#1                        UHS         lo0
fe80::%lo0/64                     link#2                        U           lo0
fe80::1%lo0                       link#2                        UHS         lo0
fe80::%telekombng/64              link#5                        U      telekomb
fe80::2d8:61ff:fe37:3393%telekombng link#5                      UHS         lo0
ff02::/16
```
As you can see, the entry for the fd4b:5320:4954:eeee::/64 network is missing, and the addresses are marked "detached" in ifconfig.

rad.conf on OpenBSD:

```
interface carp0
interface vlan1010000101 {
        #prefix fd4b:5320:4954:eeee::/64
        default router no
        #prefix 64:ff9b::/96 {
                #autonomous address-configuration no
                #on-link no
        #}
        mtu 1400
}
```
Playing around with the options, esp. prefix and default router shows no difference.

Any help is appreciated, thanks!


----------

