jails IPv6 SLAAC using iocage is broken

Does anyone know how to configure IPv6 SLAAC using strictly iocage commands?
I got it working but only by editing my jail /etc/rc.conf file.
BTW I'm using FreeBSD 12.2-RELEASE-p1.

My first thought was to set the iocage property rtsold -> 1.
Tried starting the jail and iocage failed with warning that you must set at least one ip6_addr property to accept_rtadv.
That makes sense so I set the ip6_addr property to "vnet0|accept_rtadv".
The jails now starts but only the link local IPv6 address ever gets an IPv6 address.

My jails /etc/rc.conf now contains to follow two lines:
Code:
ipv6_activate_all_interfaces="YES"
rtsold_enable="YES"
so iocage is doing something but ifconfig show the following:

Code:
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:0c:29:eb:16:e2
        hwaddr 02:05:b3:b2:2a:0b
        inet 192.168.10.208 netmask 0xffffff00 broadcast 192.168.10.255
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,AUTO_LINKLOCAL>

Hmm the nb6 options don't look correct, it seems to be missing the ACCEPT_RTADV option.

So tried forcing a router solicitation using rtsol and as expected I get an error:

Code:
#rtsol epair0b
#rtsol: epair0b does not support Router Advertisement

If I manually set the epair0b interface to accept_rtadv using ifconfig it works:

Code:
#ifconfig epair0b inet6 accept_rtadv
#rtsol epair0b
#ifconfig

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:0c:29:eb:16:e2
        hwaddr 02:d6:a3:f0:77:0b
        inet6 fe80::20c:29ff:feeb:16e2%epair0b prefixlen 64 scopeid 0x2
        inet6 2607:fea8:4ea0:a7:20c:29ff:feeb:16e2 prefixlen 64 autoconf
        inet6 fddd::20c:29ff:feeb:16e2 prefixlen 64 autoconf
        inet 192.168.10.208 netmask 0xffffff00 broadcast 192.168.10.255
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>


So I set the two iocage properties I changed back to their defaults:

iocage set rtsol=0 and iocage set ip6_addr="none"

and I replaced the line in my jails /etc/rc.conf that reads:

ipv6_activate_all_interfaces="YES" with ifconfig_epair0b_ipv6="inet6 accept_rtadv"

and left the line rtsold_enable="YES"

and now IPv6 works using SLAAC, well sort of ......

If I have jail that doesn't have this ipv6 solution running first (ie it only has ipv4 configured) than my jail with ipv6 always starts with the "ifdisabled" flag set on the epair0b interface thus no ipv6 at all. The only solution is to stop the ipv4 only jail and make sure my ipv6 jail starts up first.
 
Last edited:
Back
Top