IEEE 802.1Q/1AD pseudo-device
Ethernet interface allows construction of
virtual LANs when used in conjunction with IEEE 802.1Q-compliant Ethernet
devices. The svlan
Ethernet interface allows
construction of IEEE 802.1AD-compliant provider bridges. It is normally used
for QinQ to stack vlan
interfaces on top of it.
The interfaces can be created at runtime using the
command or by setting up a
configuration file for
interface itself can be configured with
its manual page for more information.
devices, the 802.1Q header specifies the
virtual LAN number, and thus allows an Ethernet switch (or other 802.1Q
compliant network devices) to be aware of which LAN the frame is part of, and
in the case of a switch, which port(s) the frame can go to. Frames transmitted
through the vlan interface will be diverted to the specified physical
interface with a 802.1Q vlan tag added. 802.1Q frames received by the parent
interface with the correct vlan tag will be diverted to the associated
Frame headers which normally contain the destination host, source host, and
protocol, are altered with additional information, comprising as follows: 16
bits for the ether type (0x8100); 3 bits for the priority field; 1 bit for the
canonical field (always 0); and 12 bits for the vlan identifier. The priority
field may be altered via
; see the
option for more information. Following the
vlan header is the actual ether type for the frame and length information.
devices, the configuration is identical
to the vlan
interface, the only differences being
that it uses a different Ethernet type (0x88a8) and an independent VLAN ID
space on the parent interface.
interfaces support the following unique
- Get the vlan tag and parent for a given vlan
- Set the vlan tag and parent for a given vlan
interfaces use the following interface capabilities:
- The parent interface can handle full sized frames, plus the
size of the vlan tag.
- The parent interface will participate in the tagging of
frames. (This is not supported by svlan
- vlan0: initialized with non-standard
mtu N (parent ...)
- The IFCAP_VLAN_MTU capability was not set on the parent
interface. We assume in this event that the parent interface is not
capable of handling frames larger than its MTU. This will generally result
in a non-compliant 802.1Q implementation.
Some Ethernet chips will either discard or truncate Ethernet frames that are
larger than 1514 bytes. This causes a problem as 802.1Q tagged frames can
be up to 1518 bytes. Most controller chips can be told not to discard
large frames and/or to increase the allowed frame size. Refer to the
hardware manual for your chip to do this.
If the IFCAP_VLAN_MTU capability is set on a vlan parent,
assumes that the Ethernet chip on the parent
can handle oversized frames. Either the chip allows 1518 byte frames by
default (such as rl(4)
the driver has instructed the chip to do so (such as
), or the driver
also takes advantage of a hardware tagging capability, and thus oversized
frames are never actually sent by OpenBSD
IEEE 802.1Q standard,
IEEE 802.1AD standard,
Provider Bridges, QinQ.