2001-07-28 12:27:06 +00:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2001 Yar Tikhiy
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2012-06-05 02:18:54 +00:00
|
|
|
.Dd June 4, 2012
|
2001-07-28 12:27:06 +00:00
|
|
|
.Dt VLAN 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm vlan
|
2005-07-19 00:26:30 +00:00
|
|
|
.Nd "IEEE 802.1Q VLAN network interface"
|
2001-07-28 12:27:06 +00:00
|
|
|
.Sh SYNOPSIS
|
2005-10-07 02:32:16 +00:00
|
|
|
To compile this driver into the kernel,
|
2012-06-05 02:18:54 +00:00
|
|
|
place the following line in your
|
2005-07-21 05:02:39 +00:00
|
|
|
kernel configuration file:
|
2005-07-19 00:26:30 +00:00
|
|
|
.Bd -ragged -offset indent
|
|
|
|
.Cd "device vlan"
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2005-10-07 02:32:16 +00:00
|
|
|
Alternatively, to load the driver as a
|
|
|
|
module at boot time, place the following line in
|
2005-07-19 00:26:30 +00:00
|
|
|
.Xr loader.conf 5 :
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
if_vlan_load="YES"
|
|
|
|
.Ed
|
2001-07-28 12:27:06 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver demultiplexes frames tagged according to
|
|
|
|
the IEEE 802.1Q standard into logical
|
|
|
|
.Nm
|
|
|
|
network interfaces, which allows routing/bridging between
|
|
|
|
multiple VLANs through a single switch trunk port.
|
|
|
|
.Pp
|
2002-05-29 06:55:06 +00:00
|
|
|
Each
|
|
|
|
.Nm
|
|
|
|
interface is created at runtime using interface cloning.
|
|
|
|
This is
|
|
|
|
most easily done with the
|
|
|
|
.Xr ifconfig 8
|
|
|
|
.Cm create
|
|
|
|
command or using the
|
|
|
|
.Va cloned_interfaces
|
|
|
|
variable in
|
|
|
|
.Xr rc.conf 5 .
|
|
|
|
.Pp
|
2001-07-28 12:27:06 +00:00
|
|
|
To function, a
|
|
|
|
.Nm
|
|
|
|
interface must be assigned a parent interface and
|
|
|
|
numeric VLAN tag using
|
|
|
|
.Xr ifconfig 8 .
|
|
|
|
A single parent can be assigned to multiple
|
|
|
|
.Nm
|
|
|
|
interfaces provided they have different tags.
|
2004-12-21 01:09:34 +00:00
|
|
|
The parent interface is likely to be an Ethernet card connected
|
2001-07-28 12:27:06 +00:00
|
|
|
to a properly configured switch port.
|
|
|
|
The VLAN tag should match one of those set up in the switched
|
|
|
|
network.
|
2006-08-11 17:09:27 +00:00
|
|
|
.Pp
|
|
|
|
.Nm
|
2012-05-26 21:30:18 +00:00
|
|
|
initially assumes the same minimum length for tagged and untagged frames.
|
|
|
|
This mode is selected by setting the
|
2006-08-12 17:11:43 +00:00
|
|
|
.Xr sysctl 8
|
2006-08-11 17:09:27 +00:00
|
|
|
variable
|
|
|
|
.Va net.link.vlan.soft_pad
|
2012-05-26 21:30:18 +00:00
|
|
|
to 0
|
|
|
|
.Pq default .
|
|
|
|
However, there are network devices that fail to adjust frame length
|
|
|
|
when it falls below the allowed minimum due to untagging.
|
2006-08-11 17:09:27 +00:00
|
|
|
Such devices should be able to interoperate with
|
|
|
|
.Nm
|
|
|
|
after changing the value of
|
|
|
|
.Va net.link.vlan.soft_pad
|
|
|
|
to 1.
|
|
|
|
In the latter mode,
|
|
|
|
.Nm
|
|
|
|
will pad short frames before tagging them
|
2012-05-26 21:30:18 +00:00
|
|
|
so that their length is not less than the minimum value
|
2006-08-11 17:09:27 +00:00
|
|
|
after untagging by the non-compliant devices.
|
2005-01-30 12:06:02 +00:00
|
|
|
.Sh HARDWARE
|
2001-07-28 12:27:06 +00:00
|
|
|
The
|
|
|
|
.Nm
|
2005-01-30 12:06:02 +00:00
|
|
|
driver supports efficient operation over parent interfaces that can provide
|
|
|
|
help in processing VLANs.
|
|
|
|
Such interfaces are automatically recognized by their capabilities.
|
|
|
|
Depending on the level of sophistication found in a physical
|
|
|
|
interface, it may do full VLAN processing or just be able to
|
2007-04-24 11:35:47 +00:00
|
|
|
receive and transmit long frames (up to 1522 bytes including an Ethernet
|
|
|
|
header and FCS).
|
2005-01-30 12:06:02 +00:00
|
|
|
The capabilities may be user-controlled by the respective parameters to
|
|
|
|
.Xr ifconfig 8 ,
|
2012-05-26 21:30:18 +00:00
|
|
|
.Cm vlanhwtag ,
|
2005-01-30 12:06:02 +00:00
|
|
|
and
|
|
|
|
.Cm vlanmtu .
|
|
|
|
However, a physical interface is not obliged to react to them:
|
|
|
|
It may have either capability enabled permanently without
|
|
|
|
a way to turn it off.
|
|
|
|
The whole issue is very specific to a particular device and its driver.
|
|
|
|
.Pp
|
2012-06-05 02:18:54 +00:00
|
|
|
At present, these devices are capable of full VLAN processing
|
|
|
|
in hardware:
|
2008-10-04 15:44:22 +00:00
|
|
|
.Xr ae 4 ,
|
2008-05-19 02:03:52 +00:00
|
|
|
.Xr age 4 ,
|
2009-06-10 02:19:54 +00:00
|
|
|
.Xr alc 4 ,
|
2008-11-12 10:20:29 +00:00
|
|
|
.Xr ale 4 ,
|
2007-05-02 10:51:48 +00:00
|
|
|
.Xr bce 4 ,
|
2001-10-05 06:30:42 +00:00
|
|
|
.Xr bge 4 ,
|
2007-05-02 10:51:48 +00:00
|
|
|
.Xr cxgb 4 ,
|
2011-02-18 08:00:26 +00:00
|
|
|
.Xr cxgbe 4 ,
|
2002-08-27 14:01:14 +00:00
|
|
|
.Xr em 4 ,
|
2010-12-20 00:10:53 +00:00
|
|
|
.Xr igb 4 ,
|
2005-01-30 10:59:50 +00:00
|
|
|
.Xr ixgb 4 ,
|
2010-12-20 00:10:53 +00:00
|
|
|
.Xr ixgbe 4 ,
|
2008-05-27 02:01:42 +00:00
|
|
|
.Xr jme 4 ,
|
2006-12-13 02:42:01 +00:00
|
|
|
.Xr msk 4 ,
|
2010-12-20 00:10:53 +00:00
|
|
|
.Xr mxge 4 ,
|
|
|
|
.Xr nxge 4 ,
|
2001-07-28 12:27:06 +00:00
|
|
|
.Xr nge 4 ,
|
2004-05-26 11:34:51 +00:00
|
|
|
.Xr re 4 ,
|
2010-04-29 18:21:27 +00:00
|
|
|
.Xr sge 4 ,
|
2006-07-25 00:56:47 +00:00
|
|
|
.Xr stge 4 ,
|
2001-07-28 12:27:06 +00:00
|
|
|
.Xr ti 4 ,
|
2005-01-30 10:59:50 +00:00
|
|
|
.Xr txp 4 ,
|
2001-07-28 12:27:06 +00:00
|
|
|
and
|
2005-01-30 10:59:50 +00:00
|
|
|
.Xr vge 4 .
|
2001-07-28 12:27:06 +00:00
|
|
|
.Pp
|
2012-05-26 21:30:18 +00:00
|
|
|
Other Ethernet interfaces can run VLANs using software emulation in the
|
2001-07-28 12:27:06 +00:00
|
|
|
.Nm
|
|
|
|
driver.
|
2012-05-26 21:30:18 +00:00
|
|
|
However, some lack the capability
|
2007-04-24 11:35:47 +00:00
|
|
|
of transmitting and receiving long frames.
|
2005-01-30 12:06:02 +00:00
|
|
|
Assigning such an interface as the parent to
|
|
|
|
.Nm
|
|
|
|
will result in a reduced MTU on the corresponding
|
2001-07-28 12:27:06 +00:00
|
|
|
.Nm
|
|
|
|
interfaces.
|
|
|
|
In the modern Internet, this is likely to cause
|
|
|
|
.Xr tcp 4
|
|
|
|
connectivity problems due to massive, inadequate
|
|
|
|
.Xr icmp 4
|
|
|
|
filtering that breaks the Path MTU Discovery mechanism.
|
|
|
|
.Pp
|
2012-05-26 21:30:18 +00:00
|
|
|
These interfaces natively support long frames for
|
|
|
|
.Nm :
|
2011-10-25 19:10:10 +00:00
|
|
|
.Xr axe 4 ,
|
2007-04-24 11:22:27 +00:00
|
|
|
.Xr bfe 4 ,
|
2009-06-15 18:24:04 +00:00
|
|
|
.Xr cas 4 ,
|
2007-04-24 11:22:27 +00:00
|
|
|
.Xr dc 4 ,
|
2010-12-20 00:10:53 +00:00
|
|
|
.Xr et 4 ,
|
2007-05-02 10:51:48 +00:00
|
|
|
.Xr fwe 4 ,
|
2007-04-24 11:22:27 +00:00
|
|
|
.Xr fxp 4 ,
|
|
|
|
.Xr gem 4 ,
|
|
|
|
.Xr hme 4 ,
|
|
|
|
.Xr le 4 ,
|
2007-05-02 10:51:48 +00:00
|
|
|
.Xr nfe 4 ,
|
2007-05-07 09:52:39 +00:00
|
|
|
.Xr nve 4 ,
|
2007-04-24 11:22:27 +00:00
|
|
|
.Xr rl 4 ,
|
2008-01-21 06:47:20 +00:00
|
|
|
.Xr sf 4 ,
|
2007-04-24 11:22:27 +00:00
|
|
|
.Xr sis 4 ,
|
|
|
|
.Xr sk 4 ,
|
|
|
|
.Xr ste 4 ,
|
2007-05-09 09:02:11 +00:00
|
|
|
.Xr tl 4 ,
|
2007-04-24 11:22:27 +00:00
|
|
|
.Xr tx 4 ,
|
|
|
|
.Xr vr 4 ,
|
2010-12-31 00:46:30 +00:00
|
|
|
.Xr vte 4 ,
|
2007-04-24 11:22:27 +00:00
|
|
|
and
|
|
|
|
.Xr xl 4 .
|
2001-08-08 10:27:25 +00:00
|
|
|
.Pp
|
2002-11-15 00:25:33 +00:00
|
|
|
The
|
2001-07-28 12:27:06 +00:00
|
|
|
.Nm
|
2007-04-24 11:35:47 +00:00
|
|
|
driver automatically recognizes devices that natively support long frames
|
2002-11-15 00:25:33 +00:00
|
|
|
for
|
2001-07-28 12:27:06 +00:00
|
|
|
.Nm
|
2002-11-15 00:25:33 +00:00
|
|
|
use and calculates the appropriate frame MTU based on the
|
|
|
|
capabilities of the parent interface.
|
2007-04-24 11:35:47 +00:00
|
|
|
Some other interfaces not listed above may handle long frames,
|
2012-06-05 02:18:54 +00:00
|
|
|
but they do not advertise this ability.
|
2005-01-30 12:06:02 +00:00
|
|
|
The MTU setting on
|
|
|
|
.Nm
|
2007-04-24 11:22:27 +00:00
|
|
|
can be corrected manually if used in conjunction with such a parent interface.
|
2004-11-15 16:38:37 +00:00
|
|
|
.Sh SEE ALSO
|
2006-08-11 17:09:27 +00:00
|
|
|
.Xr ifconfig 8 ,
|
|
|
|
.Xr sysctl 8
|
2004-11-15 14:33:17 +00:00
|
|
|
.Sh BUGS
|
|
|
|
No 802.1Q features except VLAN tagging are implemented.
|