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