179458d0bSYaroslav Tykhiy.\" 279458d0bSYaroslav Tykhiy.\" Copyright (c) 2001 Yar Tikhiy 379458d0bSYaroslav Tykhiy.\" All rights reserved. 479458d0bSYaroslav Tykhiy.\" 579458d0bSYaroslav Tykhiy.\" Redistribution and use in source and binary forms, with or without 679458d0bSYaroslav Tykhiy.\" modification, are permitted provided that the following conditions 779458d0bSYaroslav Tykhiy.\" are met: 879458d0bSYaroslav Tykhiy.\" 1. Redistributions of source code must retain the above copyright 979458d0bSYaroslav Tykhiy.\" notice, this list of conditions and the following disclaimer. 1079458d0bSYaroslav Tykhiy.\" 2. Redistributions in binary form must reproduce the above copyright 1179458d0bSYaroslav Tykhiy.\" notice, this list of conditions and the following disclaimer in the 1279458d0bSYaroslav Tykhiy.\" documentation and/or other materials provided with the distribution. 1379458d0bSYaroslav Tykhiy.\" 1479458d0bSYaroslav Tykhiy.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1579458d0bSYaroslav Tykhiy.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1679458d0bSYaroslav Tykhiy.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1779458d0bSYaroslav Tykhiy.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1879458d0bSYaroslav Tykhiy.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1979458d0bSYaroslav Tykhiy.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2079458d0bSYaroslav Tykhiy.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2179458d0bSYaroslav Tykhiy.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2279458d0bSYaroslav Tykhiy.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2379458d0bSYaroslav Tykhiy.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2479458d0bSYaroslav Tykhiy.\" SUCH DAMAGE. 2579458d0bSYaroslav Tykhiy.\" 2679458d0bSYaroslav Tykhiy.\" $FreeBSD$ 2779458d0bSYaroslav Tykhiy.\" 28a5eb8d53SSam Leffler.Dd November 14, 2002 2979458d0bSYaroslav Tykhiy.Dt VLAN 4 3079458d0bSYaroslav Tykhiy.Os 3179458d0bSYaroslav Tykhiy.Sh NAME 3279458d0bSYaroslav Tykhiy.Nm vlan 3379458d0bSYaroslav Tykhiy.Nd IEEE 802.1Q VLAN network interface 3479458d0bSYaroslav Tykhiy.Sh SYNOPSIS 359d4fe4b2SBrooks Davis.Cd device vlan 3679458d0bSYaroslav Tykhiy.\" 3779458d0bSYaroslav Tykhiy.Sh DESCRIPTION 3879458d0bSYaroslav TykhiyThe 3979458d0bSYaroslav Tykhiy.Nm 4079458d0bSYaroslav Tykhiydriver demultiplexes frames tagged according to 4179458d0bSYaroslav Tykhiythe IEEE 802.1Q standard into logical 4279458d0bSYaroslav Tykhiy.Nm 4379458d0bSYaroslav Tykhiynetwork interfaces, which allows routing/bridging between 4479458d0bSYaroslav Tykhiymultiple VLANs through a single switch trunk port. 4579458d0bSYaroslav Tykhiy.Pp 460d35b35aSBrooks DavisEach 470d35b35aSBrooks Davis.Nm 480d35b35aSBrooks Davisinterface is created at runtime using interface cloning. 490d35b35aSBrooks DavisThis is 500d35b35aSBrooks Davismost easily done with the 510d35b35aSBrooks Davis.Xr ifconfig 8 520d35b35aSBrooks Davis.Cm create 530d35b35aSBrooks Daviscommand or using the 540d35b35aSBrooks Davis.Va cloned_interfaces 550d35b35aSBrooks Davisvariable in 560d35b35aSBrooks Davis.Xr rc.conf 5 . 570d35b35aSBrooks Davis.Pp 5879458d0bSYaroslav TykhiyTo function, a 5979458d0bSYaroslav Tykhiy.Nm 6079458d0bSYaroslav Tykhiyinterface must be assigned a parent interface and 6179458d0bSYaroslav Tykhiynumeric VLAN tag using 6279458d0bSYaroslav Tykhiy.Xr ifconfig 8 . 6379458d0bSYaroslav TykhiyA single parent can be assigned to multiple 6479458d0bSYaroslav Tykhiy.Nm 6579458d0bSYaroslav Tykhiyinterfaces provided they have different tags. 6679458d0bSYaroslav TykhiyThe parent interface is likely to be an ethernet card connected 6779458d0bSYaroslav Tykhiyto a properly configured switch port. 6879458d0bSYaroslav TykhiyThe VLAN tag should match one of those set up in the switched 6979458d0bSYaroslav Tykhiynetwork. 7079458d0bSYaroslav Tykhiy.Pp 7179458d0bSYaroslav TykhiyThe 7279458d0bSYaroslav Tykhiy.Nm 7379458d0bSYaroslav Tykhiydriver supports physical devices that do 7479458d0bSYaroslav Tykhiythe VLAN demultiplexing in firmware. 75a5eb8d53SSam LefflerDevices that have hardware support for 76a5eb8d53SSam Leffler802.1Q VLANs are automatically recognized by their interface capabilities. 7779458d0bSYaroslav Tykhiy.\" 7879458d0bSYaroslav Tykhiy.Ss "Selecting the Right Network Interface Card to Run VLANs Through" 7979458d0bSYaroslav TykhiyBy now, the only NICs that have both hardware support and proper 8079458d0bSYaroslav Tykhiydriver hooks for the 802.1Q VLAN technology in 8179458d0bSYaroslav Tykhiy.Fx 8279458d0bSYaroslav Tykhiyare 832ba5fff2SYaroslav Tykhiy.Xr bge 4 , 84a5a8905cSYaroslav Tykhiy.Xr em 4 , 85a5a8905cSYaroslav Tykhiy.Xr gx 4 , 8679458d0bSYaroslav Tykhiy.Xr nge 4 , 87d57916b1SYaroslav Tykhiy.Xr re 4 , 8879458d0bSYaroslav Tykhiy.Xr ti 4 , 8979458d0bSYaroslav Tykhiyand 9079458d0bSYaroslav Tykhiy.Xr txp 4 . 9179458d0bSYaroslav Tykhiy.Pp 9279458d0bSYaroslav TykhiyThe rest of the ethernet NICs supported by 9379458d0bSYaroslav Tykhiy.Fx 9479458d0bSYaroslav Tykhiycan run 95dd4dc0a9SYaroslav TykhiyVLANs using software emulation in the 9679458d0bSYaroslav Tykhiy.Nm 9779458d0bSYaroslav Tykhiydriver. 9879458d0bSYaroslav TykhiyHowever, most of them lack the capability 9979458d0bSYaroslav Tykhiyof transmitting and/or receiving oversized frames. 100dd4dc0a9SYaroslav TykhiyUsing such a NIC as a parent interface 10179458d0bSYaroslav Tykhiyimplies a reduced MTU on the corresponding 10279458d0bSYaroslav Tykhiy.Nm 10379458d0bSYaroslav Tykhiyinterfaces. 10479458d0bSYaroslav TykhiyIn the modern Internet, this is likely to cause 10579458d0bSYaroslav Tykhiy.Xr tcp 4 10679458d0bSYaroslav Tykhiyconnectivity problems due to massive, inadequate 10779458d0bSYaroslav Tykhiy.Xr icmp 4 10879458d0bSYaroslav Tykhiyfiltering that breaks the Path MTU Discovery mechanism. 10979458d0bSYaroslav Tykhiy.Pp 11079458d0bSYaroslav TykhiyThe NICs that support oversized frames are as follows: 11172ddf849SRuslan Ermilov.Bl -tag -width ".Xr fxp 4 " -offset indent 112d57916b1SYaroslav Tykhiy.It Xr bfe 4 113d57916b1SYaroslav Tykhiysupports long frames for 114d57916b1SYaroslav Tykhiy.Nm 115d57916b1SYaroslav Tykhiynatively. 116db40c1aeSDoug Ambrisko.It Xr dc 4 117dd4dc0a9SYaroslav Tykhiysupports long frames for 118db40c1aeSDoug Ambrisko.Nm 119db40c1aeSDoug Ambriskonatively. 12079458d0bSYaroslav Tykhiy.It Xr de 4 12179458d0bSYaroslav Tykhiyrequires defining 12279458d0bSYaroslav Tykhiy.Dv BIG_PACKET 12379458d0bSYaroslav Tykhiyin the 12479458d0bSYaroslav Tykhiy.Pa /usr/src/sys/pci/if_de.c 12579458d0bSYaroslav Tykhiysource file and rebuilding the kernel 12679458d0bSYaroslav Tykhiyor module. 12779458d0bSYaroslav TykhiyThe hack works only for the 21041, 21140, and 21140A chips. 12879458d0bSYaroslav Tykhiy.It Xr fxp 4 129dd4dc0a9SYaroslav Tykhiysupports long frames for 13079458d0bSYaroslav Tykhiy.Nm 13179458d0bSYaroslav Tykhiynatively. 132469873caSJoerg Wunsch.It Xr hme 4 133469873caSJoerg Wunschsupports long frames for 134469873caSJoerg Wunsch.Nm 135469873caSJoerg Wunschnatively. 136d57916b1SYaroslav Tykhiy.It Xr rl 4 137d57916b1SYaroslav Tykhiysupports long frames for 138d57916b1SYaroslav Tykhiy.Nm 139d57916b1SYaroslav Tykhiynatively. 1408c992b7fSJohn Hay.It Xr sis 4 141dd4dc0a9SYaroslav Tykhiysupports long frames for 1428c992b7fSJohn Hay.Nm 1438c992b7fSJohn Haynatively. 144a5a8905cSYaroslav Tykhiy.It Xr ste 4 145dd4dc0a9SYaroslav Tykhiysupports long frames for 146a5a8905cSYaroslav Tykhiy.Nm 147a5a8905cSYaroslav Tykhiynatively. 14879458d0bSYaroslav Tykhiy.It Xr tl 4 149dd4dc0a9SYaroslav Tykhiyhas support for long frames. 15079458d0bSYaroslav Tykhiy.It Xr tx 4 151dd4dc0a9SYaroslav Tykhiysupports long frames for 152dd4dc0a9SYaroslav Tykhiy.Nm 153dd4dc0a9SYaroslav Tykhiynatively. 15479458d0bSYaroslav Tykhiy.It Xr xl 4 15579458d0bSYaroslav Tykhiysupports long frames only if the card is built on a newer chip 15672ddf849SRuslan Ermilov(Cyclone and above). 15779458d0bSYaroslav Tykhiy.El 15872ddf849SRuslan Ermilov.Pp 159a5eb8d53SSam LefflerThe 16079458d0bSYaroslav Tykhiy.Nm 161a5eb8d53SSam Lefflerdriver automatically recognizes devices that support oversized frames 162a5eb8d53SSam Lefflerfor 16379458d0bSYaroslav Tykhiy.Nm 164a5eb8d53SSam Leffleruse and calculates the appropriate frame MTU based on the 165a5eb8d53SSam Lefflercapabilities of the parent interface. 16679458d0bSYaroslav Tykhiy.Sh SEE ALSO 16779458d0bSYaroslav Tykhiy.Xr ifconfig 8 16879458d0bSYaroslav Tykhiy.Sh BUGS 16979458d0bSYaroslav TykhiyNo 802.1Q features except VLAN tagging are implemented. 170