xref: /freebsd/share/man/man4/vlan.4 (revision 9207b4cff7b8d483f4dd3c62266c2b58819eb7f9)
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.Cd device vlan
36.\"
37.Sh DESCRIPTION
38The
39.Nm
40driver demultiplexes frames tagged according to
41the IEEE 802.1Q standard into logical
42.Nm
43network interfaces, which allows routing/bridging between
44multiple VLANs through a single switch trunk port.
45.Pp
46To function, a
47.Nm
48interface must be assigned a parent interface and
49numeric VLAN tag using
50.Xr ifconfig 8 .
51A single parent can be assigned to multiple
52.Nm
53interfaces provided they have different tags.
54The parent interface is likely to be an ethernet card connected
55to a properly configured switch port.
56The VLAN tag should match one of those set up in the switched
57network.
58.Pp
59The
60.Nm
61driver supports physical devices that do
62the VLAN demultiplexing in firmware.
63The
64.Cm link0
65flag should be set on a
66.Nm
67interface
68.Pq Em not on its parent
69using
70.Xr ifconfig 8
71in that case to indicate that the hardware support for
72the 802.1Q VLANs is present in its parent.
73.\"
74.Ss "Selecting the Right Network Interface Card to Run VLANs Through"
75By now, the only NICs that have both hardware support and proper
76driver hooks for the 802.1Q VLAN technology in
77.Fx
78are
79.Xr bge 4 ,
80.Xr nge 4 ,
81.Xr ti 4 ,
82and
83.Xr txp 4 .
84.Pp
85The rest of the ethernet NICs supported by
86.Fx
87can run
88VLANs using the software emulation in the
89.Nm
90driver.
91However, most of them lack the capability
92of transmitting and/or receiving oversized frames.
93Using such a NIC as a parent interface for a
94.Nm
95implies a reduced MTU on the corresponding
96.Nm
97interfaces.
98In the modern Internet, this is likely to cause
99.Xr tcp 4
100connectivity problems due to massive, inadequate
101.Xr icmp 4
102filtering that breaks the Path MTU Discovery mechanism.
103.Pp
104The NICs that support oversized frames are as follows:
105.Bl -tag -width ".Xr fxp 4 " -offset indent
106.It Xr de 4
107requires defining
108.Dv BIG_PACKET
109in the
110.Pa /usr/src/sys/pci/if_de.c
111source file and rebuilding the kernel
112or module.
113The hack works only for the 21041, 21140, and 21140A chips.
114.It Xr fxp 4
115supports long frames for the
116.Nm
117natively.
118.It Xr sis 4
119supports long frames for the
120.Nm
121natively.
122.It Xr tl 4
123does support long frames.
124.It Xr tx 4
125does support long frames.
126.It Xr wx 4
127does support long frames.
128.It Xr xl 4
129supports long frames only if the card is built on a newer chip
130(Cyclone and above).
131.El
132.Pp
133Note:
134Except for
135.Xr fxp 4 ,
136.Xr sis 4
137and
138.Xr tx 4 ,
139none of the above drivers inform the
140.Nm
141driver about their support for long frames.
142Just fix the MTU of a
143.Nm
144interface if it appears to be lower than 1500 bytes after
145attaching the
146.Nm
147to a parent interface that is known to support long frames.
148.Sh SEE ALSO
149.Xr ifconfig 8
150.Sh BUGS
151No 802.1Q features except VLAN tagging are implemented.
152