VLAN(4)                   OpenBSD Programmer's Manual                  VLAN(4)

NAME
     vlan - IEEE 802.1Q encapsulation/decapsulation pseudo-device

SYNOPSIS
     pseudo-device vlan [count]

DESCRIPTION
     The vlan Ethernet interface allows construction of virtual LANs when used
     in conjunction with IEEE 802.1Q-compliant Ethernet devices.

     This driver currently supports the following modes of operation:

     802.1Q encapsulation over Ethernet (Ethernet protocol 0x8100)

          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 physi-
          cal interface with 802.1Q vlan encapsulation.  Frames with 802.1Q
          encapsulation received by the parent interface with the correct vlan
          tag will be diverted to the associated vlan pseudo-interface.

     Frame headers which normally contain the destination host, source host,
     and protocol, are altered with additional information.  After the source
     host, a 32-bit 802.1Q header is included, with 16 bits for the ether type
     (0x8100), 3 bits for the priority field (not used in this implementa-
     tion), 1 bit for the canonical field (always 0), and 12 bits for the vlan
     identifier.  Following the vlan header is the actual ether type for the
     frame and length information.

     The network interfaces are named vlan0, vlan1, etc.  The number of inter-
     faces is given by the corresponding pseudo-device line in the system con-
     fig file.  vlan(4) interfaces support the following unique ioctl(2)s:

     SIOCSETVLAN:
          Set the vlan tag and parent for a given vlan interface.

     SIOCGETVLAN:
          Get the vlan tag and parent for a given vlan interface.

     The operation mode can be given as

     link0
          The parent interface supports VLAN tagging/untagging in hardware,
          this requires support from the Ethernet driver as well.

     to ifconfig(8).

SEE ALSO
     bridge(4), inet(4), ip(4), netintro(4), ifconfig(8)

     All aspects of the vlan interface can be configured with ifconfig(8); see
     its manual page for more information.

     A draft of IEEE 802.1Q standard can be obtained from
     http://grouper.ieee.org/groups/802/1/pages/802.1Q.html or the final ver-
     sion can be purchased from the Institute of Electrical and Electronic En-
     gineers, Inc.

BUGS
     The 802.1Q specification allows for operation over FDDI and Token Ring as
     well as Ethernet.  This driver only supports such operation with Ethernet
     devices.

     Some Ethernet chips (notably the Intel 82558 and 82559) automatically
     discard frames that are larger then 1514 bytes.  All Ethernet chips sup-
     porting this sort of feature should allow for it to be turned off.  Opti-
     mally, upon loading, the chip's driver would do this (The fxp(4) driver
     currently does for the Intel 82558/82559 chips.)  Refer to the hardware
     manual for your Ethernet chip to determine if it has this feature, and if
     so, for information on how to turn it off.  A symptom of this problem is
     that small frames pass through the VLAN (such as a frame carrying an ICMP
     packet), but frames which are at MTU size are dropped.  When these frames
     are dropped, the TCP session will hang.  A temporary kludge is to set the
     MTU for each machine behind each VLAN to 1496 or less.

     Some Ethernet chips support 802.1Q tagging/untagging in hardware, but do
     not have the appropriate hooks in their driver to pass the frame directly
     to if_vlan.  The PCI device driver if_ti is able to do this, use it as a
     reference.

     This driver could be the basis for support of the Cisco ISL VLAN proto-
     col, detailed at http://www.cisco.com/warp/public/741/4.html.  Unfortu-
     nately, public reimplementation of this protocol is currently prevented
     by patent (at least in the USA).

AUTHORS
     Originally wollman@freebsd.org.

OpenBSD 2.9                     January 9, 2000                              2
