VLAN(4) | Device Drivers Manual | VLAN(4) |
vlan
, svlan
—
pseudo-device vlan
vlan
driver provides network interfaces supporting
Virtual Local Area Networks (VLANs) on Ethernet networks.
vlan
interfaces implement virtual networks using the
IEEE 802.1q protocol. svlan
interfaces implement
virtual networks using the IEEE 802.1ad protocol.
svlan
interfaces allow construction of
IEEE 802.1ad-compliant provider bridges. vlan
and
svlan
interfaces can be configured to provide QinQ
or stacked VLANs.
The interfaces can be created at runtime using the
ifconfig vlan
N
create
command or by setting up a
hostname.if(5)
configuration file for
netstart(8). The interface
itself can be configured with
ifconfig(8); see its manual
page for more information.
vlan
and svlan
interfaces must be configured with a parent Ethernet interface to operate,
and a virtual network identifier. Packets transmitted through a
vlan
or svlan
interface will
be encapsulated in their respective protocols and transmitted on the
specified physical interface. 802.1q and 802.1ad packets received on the
parent interface will be matched to the vlan
and
svlan
interfaces by their respective protocol and
virtual network identifiers, and decapsulated for reception on the
associated virtual interfaces.
The 802.1q and 802.1ad protocols include a priority field which
may be altered via
pf.conf(5); see the
prio
option for more information.
vlan
and svlan
interfaces support the following
ioctl(2)s:
SIOCSIFPARENT
struct if_parent *SIOCGIFPARENT
struct if_parent *SIOCDIFPARENT
struct ifreq *SIOCSVNETID
struct ifreq *SIOCGVNETID
struct if_parent *SIOCDVNETID
struct ifreq *SIOCSIFLLADDR
struct ifreq *vlan
and svlan
interfaces use the following capability on parent interfaces:
vlan
interfaces use the following
capability on parent interfaces:
# ifconfig vlan0 create # ifconfig vlan0 parent em0 vnetid 5 # ifconfig vlan0 10.1.1.100/24
Create an 802.1q VLAN interface on network 10, on top of an 802.1ad provider bridge on network 8, on top of the physical interface bge0:
# ifconfig svlan0 create # ifconfig svlan0 parent bge0 vnetid 8 # ifconfig svlan0 up # ifconfig vlan0 create # ifconfig vlan0 parent svlan0 vnetid 10 # ifconfig vlan0 10.1.1.101/24
Configure an 802.1q VLAN interface with a custom MAC address:
# ifconfig vlan0 lladdr fe:e1:ba:d0:84:0e
Remove a custom MAC address from an 802.1q VLAN interface:
# ifconfig vlan0 lladdr 00:00:00:00:00:00
IEEE 802.1q standard, http://standards.ieee.org/getieee802/802.1.html.
IEEE 802.1ad standard, Provider Bridges, QinQ.
April 28, 2016 | OpenBSD-6.1 |