Re: which rc.conf syntax for vlans ? if.N or vlanN ?
Date: Sat, 25 Jan 2025 19:19:38 UTC
Hi!
> > Until around FreeBSD 13.2, one could create vlans with this:
> >
> > cloned_interfaces="vlan200"
> > ifconfig_vlan200="vlandev ix0 vlan 200 inet 192.168.10.1/24"
>
> This is the general approach to clone create interfaces, applicable
> to vlan(4) but also for other driver such as gif(4) and wg(4) etc.
It worked even for dual stack:
cloned_interfaces="vlan2000"
ifconfig_vlan2000="vlandev mce0 vlan 2000 192.168.10.12/24"
ifconfig_vlan2000_ipv6="inet6 2001:db8:0001:0010:0000:0000:0000:eeee/64"
and running:
ifconfig vlan2000 create
produced:
vlan2000: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=1c680703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG,TXTLS4,TXTLS6>
ether 10:70:fd:53:ed:ae
inet 192.168.10.12 netmask 0xffffff00 broadcast 192.168.10.255
inet6 fe80::1270:fdff:fe53:edae%vlan2000 prefixlen 64 scopeid 0x4b
inet6 2001:db8:1:10::eeee prefixlen 64
groups: vlan
vlan: 2000 vlanproto: 802.1q vlanpcp: 0 parent interface: mce0
But this no longer works with 14.2.
If I do the same steps, the ipv6 address is not configured:
vlan2000: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=1c680703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG,TXTLS4,TXTLS6>
ether 10:70:fd:53:ed:ae
inet 192.168.10.12 netmask 0xffffff00 broadcast 192.168.10.255
inet6 fe80::1270:fdff:fe53:edae%vlan2000 prefixlen 64 scopeid 0x4b
inet6 2001:db8:1:10::eeee prefixlen 64
groups: vlan
vlan: 2000 vlanproto: 802.1q vlanpcp: 0 parent interface: mce0
What's wrong here ?
> > Will both variants be supported in the future (14, 15) or is one
> > of them on it's way out ?
>
> I believe both will be supported in future releases.
Ok, then the vlanNNNN variant has some issues with ipv6 in 14.2.
--
pi@FreeBSD.org +49 171 3101372 Now what ?