VLAN(4) BSD Programmer's Manual VLAN(4)NAMEvlan - Virtual LAN (VLAN)
SYNOPSIS
#include <sys/types.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <netinet/if_ether.h>
#include <net/if_vlan.h>
pseudo-device vlan count
DESCRIPTION
The Virtual LAN Interface provides a method for trunking multiple broad-
cast domains through one physical interface. Currently only 802.1q vlan
tagging is supported.
To support vlans, the number of virtual interfaces should be provided us-
ing the vlan pseudo-device specification. The number of Virtual LAN in-
terfaces may be increased by adjusting count at kernel config time, modi-
fying the nvlan variable in the system with bpatch(1) before booting, or
by modifying the net.link_layer.generic.vlan.numif variable with
sysctl(1).
The VLAN names are composed from the prefix ``vlan'' and a decimal inter-
face number; for example ``vlan0''.
802.1
Currently only 8021.Q encapsulation on Ethernet interfaces is supported.
User priorities are not generated on output and are ignored on input.
IOCTL OPERATIONS
The SIOCSETVLAN ioctl is used to connect a vlan interface to a physical
interface.
The layout of the struct vlanreq is:
struct vlanreq {
char vlr_name[IFNAMSIZ];
char vlr_parent[IFNAMSIZ];
union {
u_int16_t vlru_8021q_vid; /* Vlan ID */
} vlr_u;
};
#define vlr_8021q_vid vlr_u.vlru_8021q_vid
To disconnect the parent interface, use SIOCSETVLAN with a zero-length
vlanreq.vlr_parent name.
The SIOCGETVLAN ioctl is used read out the current vlan settings.
SEE ALSOsysctl(1), ioctl(2), socket(2), intro(4), ifconfig(8),
STANDARDS
IEEE Std 802.1Q-1998 (``Virtual Bridged Local Area networks'')
BUGS
The vlan facility is currently of experimental nature and is likely to
change in future releases.
Not all Ethernet interfaces properly support the 1522 byte frames re-
quired to send and received full-sized packets with 802.1Q encapsulation.
Check the man pages for the specific Ethernet interface for details.
Packets that contain 802.1Q routing information (i.e. have the CFI bit
set) are currently ignored.
No dynamic configuration of 802.1 VLANs is supported.
BSD/OS Dec 23, 1999 2