Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jan 2025 20:19:38 +0100
From:      Kurt Jaeger <pi@freebsd.org>
To:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: which rc.conf syntax for vlans ? if.N or vlanN ?
Message-ID:  <Z5U5SgIE1E-pXFGZ@fc.opsec.eu>
In-Reply-To: <61620090-8A64-4CBF-9775-AC09E2A495E6@FreeBSD.org>
References:  <Z5UXe2gmwuZcWfX7@fc.opsec.eu> <61620090-8A64-4CBF-9775-AC09E2A495E6@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Z5U5SgIE1E-pXFGZ>