Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jan 2025 10:42:04 +0800
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        Kurt Jaeger <pi@freebsd.org>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: which rc.conf syntax for vlans ? if.N or vlanN ?
Message-ID:  <56597C14-A910-4E14-B9CA-A2F9D3548277@FreeBSD.org>
In-Reply-To: <Z5U5SgIE1E-pXFGZ@fc.opsec.eu>
References:  <Z5UXe2gmwuZcWfX7@fc.opsec.eu> <61620090-8A64-4CBF-9775-AC09E2A495E6@FreeBSD.org> <Z5U5SgIE1E-pXFGZ@fc.opsec.eu>

next in thread | previous in thread | raw e-mail | index | archive | help



> On Jan 26, 2025, at 3:19 AM, Kurt Jaeger <pi@freebsd.org> wrote:
> 
> 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 ?

I tested on FreeBSD 14.2, `ifconfig_vlan2000_ipv6=...` also works as intended. IPv6 address is configured correctly.
Am I missing something ?

> 
>>> 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?56597C14-A910-4E14-B9CA-A2F9D3548277>