1.\" 2.\" Copyright (c) 2001 Yar Tikhiy 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.\" $FreeBSD$ 27.\" 28.Dd July 25, 2001 29.Dt VLAN 4 30.Os 31.Sh NAME 32.Nm vlan 33.Nd IEEE 802.1Q VLAN network interface 34.Sh SYNOPSIS 35.\" In -stable: .Cd pseudo-device vlan Op Ar count 36.Cd device vlan Op Ar count 37.\" 38.Sh DESCRIPTION 39The 40.Nm 41driver demultiplexes frames tagged according to 42the IEEE 802.1Q standard into logical 43.Nm 44network interfaces, which allows routing/bridging between 45multiple VLANs through a single switch trunk port. 46.Pp 47To function, a 48.Nm 49interface must be assigned a parent interface and 50numeric VLAN tag using 51.Xr ifconfig 8 . 52A single parent can be assigned to multiple 53.Nm 54interfaces provided they have different tags. 55The parent interface is likely to be an ethernet card connected 56to a properly configured switch port. 57The VLAN tag should match one of those set up in the switched 58network. 59.Pp 60The 61.Nm 62driver supports physical devices that do 63the VLAN demultiplexing in firmware. 64The 65.Ar link0 66flag should be set on a 67.Nm 68interface 69.Pq Em not on its parent 70using 71.Xr ifconfig 8 72in that case to indicate that the hardware support for 73the 802.1Q VLANs is present in its parent. 74.\" 75.Ss "Selecting the Right Network Interface Card to Run VLANs Through" 76By now, the only NICs that have both hardware support and proper 77driver hooks for the 802.1Q VLAN technology in 78.Fx 79are 80.Xr nge 4 , 81.Xr ti 4 , 82and 83.\" not in -stable 84.Xr txp 4 . 85.Pp 86The rest of the ethernet NICs supported by 87.Fx 88can run 89VLANs using the software emulation in the 90.Nm 91driver. 92However, most of them lack the capability 93of transmitting and/or receiving oversized frames. 94Using such a NIC as a parent interface for a 95.Nm 96implies a reduced MTU on the corresponding 97.Nm 98interfaces. 99In the modern Internet, this is likely to cause 100.Xr tcp 4 101connectivity problems due to massive, inadequate 102.Xr icmp 4 103filtering that breaks the Path MTU Discovery mechanism. 104.Pp 105The NICs that support oversized frames are as follows: 106.Bl -tag -width "fxp(4)" -compact -offset indent 107.It Xr de 4 108requires defining 109.Dv BIG_PACKET 110in the 111.Pa /usr/src/sys/pci/if_de.c 112source file and rebuilding the kernel 113.\" not in -stable 114or module. 115The hack works only for the 21041, 21140, and 21140A chips. 116.It Xr fxp 4 117supports long frames for the 118.Nm 119natively. 120.It Xr tl 4 121does support long frames. 122.It Xr tx 4 123may begin supporting long frames soon. 124.It Xr xl 4 125supports long frames only if the card is built on a newer chip 126.Pq Cyclone and above . 127.El 128Note: 129Except for 130.Xr fxp 4 , 131none of the above drivers inform the 132.Nm 133driver about their support for long frames. 134Just fix the MTU of a 135.Nm 136interface if it appears to be lower that 1500 bytes after 137attaching the 138.Nm 139to a parent interface that is known to support long frames. 140.Sh SEE ALSO 141.Xr ifconfig 8 142.Sh BUGS 143No 802.1Q features except VLAN tagging are implemented. 144