]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add support for stacked VLANs (IEEE 802.1ad, AKA Q-in-Q).
authormelifaro <melifaro@FreeBSD.org>
Wed, 21 Oct 2020 21:28:20 +0000 (21:28 +0000)
committermelifaro <melifaro@FreeBSD.org>
Wed, 21 Oct 2020 21:28:20 +0000 (21:28 +0000)
commit608c014be17b623b621d82cb7b86e7604f5606ca
tree43a36ae6b443b446902f50162ee514f2429996e8
parent60bd6dc5bc4efb56d5e899c7053834297060c62a
Add support for stacked VLANs (IEEE 802.1ad, AKA Q-in-Q).

802.1ad interfaces are created with ifconfig using the "vlanproto" parameter.
Eg., the following creates a 802.1Q VLAN (id #42) over a 802.1ad S-VLAN
(id #5) over a physical Ethernet interface (em0).

ifconfig vlan5 create vlandev em0 vlan 5 vlanproto 802.1ad up
ifconfig vlan42 create vlandev vlan5 vlan 42 inet 10.5.42.1/24

VLAN_MTU, VLAN_HWCSUM and VLAN_TSO capabilities should be properly
supported. VLAN_HWTAGGING is only partially supported, as there is
currently no IFCAP_VLAN_* denoting the possibility to set the VLAN
EtherType to anything else than 0x8100 (802.1ad uses 0x88A8).

Submitted by: Olivier Piras
Sponsored by: RG Nets
Differential Revision: https://reviews.freebsd.org/D26436
12 files changed:
sbin/ifconfig/ifclone.c
sbin/ifconfig/ifconfig.8
sbin/ifconfig/ifconfig.h
sbin/ifconfig/ifieee80211.c
sbin/ifconfig/ifvlan.c
sbin/ifconfig/ifvxlan.c
sys/net/ethernet.h
sys/net/if_clone.c
sys/net/if_ethersubr.c
sys/net/if_vlan.c
sys/net/if_vlan_var.h
tests/sys/net/if_vlan.sh