]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - share/man/man4/vlan.4
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.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$
27 .\"
28 .Dd April 14, 2010
29 .Dt VLAN 4
30 .Os
31 .Sh NAME
32 .Nm vlan
33 .Nd "IEEE 802.1Q VLAN network interface"
34 .Sh SYNOPSIS
35 To compile this driver into the kernel,
36 place the following lines in your
37 kernel configuration file:
38 .Bd -ragged -offset indent
39 .Cd "device vlan"
40 .Ed
41 .Pp
42 Alternatively, to load the driver as a
43 module at boot time, place the following line in
44 .Xr loader.conf 5 :
45 .Bd -literal -offset indent
46 if_vlan_load="YES"
47 .Ed
48 .Sh DESCRIPTION
49 The
50 .Nm
51 driver demultiplexes frames tagged according to
52 the IEEE 802.1Q standard into logical
53 .Nm
54 network interfaces, which allows routing/bridging between
55 multiple VLANs through a single switch trunk port.
56 .Pp
57 Each
58 .Nm
59 interface is created at runtime using interface cloning.
60 This is
61 most easily done with the
62 .Xr ifconfig 8
63 .Cm create
64 command or using the
65 .Va cloned_interfaces
66 variable in
67 .Xr rc.conf 5 .
68 .Pp
69 To function, a
70 .Nm
71 interface must be assigned a parent interface and
72 numeric VLAN tag using
73 .Xr ifconfig 8 .
74 A single parent can be assigned to multiple
75 .Nm
76 interfaces provided they have different tags.
77 The parent interface is likely to be an Ethernet card connected
78 to a properly configured switch port.
79 The VLAN tag should match one of those set up in the switched
80 network.
81 .Pp
82 Initially
83 .Nm
84 assumes the same minimum length for tagged and untagged frames.
85 This mode is selected by the
86 .Xr sysctl 8
87 variable
88 .Va net.link.vlan.soft_pad
89 set to 0 (default).
90 However, there are network devices that fail to adjust frame length,
91 should it fall below the allowed minimum due to untagging.
92 Such devices should be able to interoperate with
93 .Nm
94 after changing the value of
95 .Va net.link.vlan.soft_pad
96 to 1.
97 In the latter mode,
98 .Nm
99 will pad short frames before tagging them
100 so that their length stays not less than the minimum value
101 after untagging by the non-compliant devices.
102 .Sh HARDWARE
103 The
104 .Nm
105 driver supports efficient operation over parent interfaces that can provide
106 help in processing VLANs.
107 Such interfaces are automatically recognized by their capabilities.
108 Depending on the level of sophistication found in a physical
109 interface, it may do full VLAN processing or just be able to
110 receive and transmit long frames (up to 1522 bytes including an Ethernet
111 header and FCS).
112 The capabilities may be user-controlled by the respective parameters to
113 .Xr ifconfig 8 ,
114 .Cm vlanhwtag
115 and
116 .Cm vlanmtu .
117 However, a physical interface is not obliged to react to them:
118 It may have either capability enabled permanently without
119 a way to turn it off.
120 The whole issue is very specific to a particular device and its driver.
121 .Pp
122 By now, the list of physical interfaces able of full VLAN processing
123 in the hardware is limited to the following devices:
124 .Xr ae 4 ,
125 .Xr age 4 ,
126 .Xr alc 4 ,
127 .Xr ale 4 ,
128 .Xr bce 4 ,
129 .Xr bge 4 ,
130 .Xr cxgb 4 ,
131 .Xr em 4 ,
132 .Xr ixgb 4 ,
133 .Xr jme 4 ,
134 .Xr msk 4 ,
135 .Xr nge 4 ,
136 .Xr re 4 ,
137 .Xr sge 4 ,
138 .Xr stge 4 ,
139 .Xr ti 4 ,
140 .Xr txp 4 ,
141 and
142 .Xr vge 4 .
143 .Pp
144 The rest of the Ethernet interfaces can run
145 VLANs using software emulation in the
146 .Nm
147 driver.
148 However, some of them lack the capability
149 of transmitting and receiving long frames.
150 Assigning such an interface as the parent to
151 .Nm
152 will result in a reduced MTU on the corresponding
153 .Nm
154 interfaces.
155 In the modern Internet, this is likely to cause
156 .Xr tcp 4
157 connectivity problems due to massive, inadequate
158 .Xr icmp 4
159 filtering that breaks the Path MTU Discovery mechanism.
160 .Pp
161 The following interfaces support long frames for
162 .Nm
163 natively:
164 .Xr bfe 4 ,
165 .Xr cas 4 ,
166 .Xr dc 4 ,
167 .Xr fwe 4 ,
168 .Xr fxp 4 ,
169 .Xr gem 4 ,
170 .Xr hme 4 ,
171 .Xr le 4 ,
172 .Xr nfe 4 ,
173 .Xr nve 4 ,
174 .Xr rl 4 ,
175 .Xr sf 4 ,
176 .Xr sis 4 ,
177 .Xr sk 4 ,
178 .Xr ste 4 ,
179 .Xr tl 4 ,
180 .Xr tx 4 ,
181 .Xr vr 4 ,
182 and
183 .Xr xl 4 .
184 .Pp
185 The
186 .Nm
187 driver automatically recognizes devices that natively support long frames
188 for
189 .Nm
190 use and calculates the appropriate frame MTU based on the
191 capabilities of the parent interface.
192 Some other interfaces not listed above may handle long frames,
193 but they do not advertise this ability of theirs.
194 The MTU setting on
195 .Nm
196 can be corrected manually if used in conjunction with such a parent interface.
197 .Sh SEE ALSO
198 .Xr ifconfig 8 ,
199 .Xr sysctl 8
200 .Sh BUGS
201 No 802.1Q features except VLAN tagging are implemented.