]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/vlan.4
This commit was generated by cvs2svn to compensate for changes in r156251,
[FreeBSD/FreeBSD.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 January 30, 2006
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 miibus"
40 .Cd "device vlan"
41 .Ed
42 .Pp
43 Alternatively, to load the driver as a
44 module at boot time, place the following line in
45 .Xr loader.conf 5 :
46 .Bd -literal -offset indent
47 if_vlan_load="YES"
48 .Ed
49 .Sh DESCRIPTION
50 The
51 .Nm
52 driver demultiplexes frames tagged according to
53 the IEEE 802.1Q standard into logical
54 .Nm
55 network interfaces, which allows routing/bridging between
56 multiple VLANs through a single switch trunk port.
57 .Pp
58 Each
59 .Nm
60 interface is created at runtime using interface cloning.
61 This is
62 most easily done with the
63 .Xr ifconfig 8
64 .Cm create
65 command or using the
66 .Va cloned_interfaces
67 variable in
68 .Xr rc.conf 5 .
69 .Pp
70 To function, a
71 .Nm
72 interface must be assigned a parent interface and
73 numeric VLAN tag using
74 .Xr ifconfig 8 .
75 A single parent can be assigned to multiple
76 .Nm
77 interfaces provided they have different tags.
78 The parent interface is likely to be an Ethernet card connected
79 to a properly configured switch port.
80 The VLAN tag should match one of those set up in the switched
81 network.
82 .Sh HARDWARE
83 The
84 .Nm
85 driver supports efficient operation over parent interfaces that can provide
86 help in processing VLANs.
87 Such interfaces are automatically recognized by their capabilities.
88 Depending on the level of sophistication found in a physical
89 interface, it may do full VLAN processing or just be able to
90 receive and transmit frames exceeding the maximum Ethernet frame size
91 by the length of a 802.1Q header.
92 The capabilities may be user-controlled by the respective parameters to
93 .Xr ifconfig 8 ,
94 .Cm vlanhwtag
95 and
96 .Cm vlanmtu .
97 However, a physical interface is not obliged to react to them:
98 It may have either capability enabled permanently without
99 a way to turn it off.
100 The whole issue is very specific to a particular device and its driver.
101 .Pp
102 By now, the list of physical interfaces able of full VLAN processing
103 in the hardware is limited to the following devices:
104 .Xr bge 4 ,
105 .Xr em 4 ,
106 .Xr ixgb 4 ,
107 .Xr nge 4 ,
108 .Xr re 4 ,
109 .Xr ti 4 ,
110 .Xr txp 4 ,
111 and
112 .Xr vge 4 .
113 .Pp
114 The rest of the Ethernet interfaces can run
115 VLANs using software emulation in the
116 .Nm
117 driver.
118 However, most of them lack the capability
119 of transmitting and receiving oversized frames.
120 Assigning such an interface as the parent to
121 .Nm
122 will result in a reduced MTU on the corresponding
123 .Nm
124 interfaces.
125 In the modern Internet, this is likely to cause
126 .Xr tcp 4
127 connectivity problems due to massive, inadequate
128 .Xr icmp 4
129 filtering that breaks the Path MTU Discovery mechanism.
130 .Pp
131 The interfaces that support oversized frames are as follows:
132 .Bl -tag -width ".Xr fxp 4 " -offset indent
133 .It Xr bfe 4
134 supports long frames for
135 .Nm
136 natively.
137 .It Xr dc 4
138 supports long frames for
139 .Nm
140 natively.
141 .It Xr de 4
142 requires defining
143 .Dv BIG_PACKET
144 in the
145 .Pa /usr/src/sys/pci/if_de.c
146 source file and rebuilding the kernel
147 or module.
148 The hack works only for the 21041, 21140, and 21140A chips.
149 .It Xr fxp 4
150 supports long frames for
151 .Nm
152 natively.
153 .It Xr gem 4
154 supports long frames for
155 .Nm
156 natively.
157 .It Xr hme 4
158 supports long frames for
159 .Nm
160 natively.
161 .It Xr le 4
162 supports long frames for
163 .Nm
164 natively.
165 .It Xr rl 4
166 supports long frames for
167 .Nm
168 natively.
169 .It Xr sis 4
170 supports long frames for
171 .Nm
172 natively.
173 .It Xr sk 4
174 supports long frames for
175 .Nm
176 natively.
177 .It Xr ste 4
178 supports long frames for
179 .Nm
180 natively.
181 .It Xr tl 4
182 has support for long frames.
183 .It Xr tx 4
184 supports long frames for
185 .Nm
186 natively.
187 .It Xr xl 4
188 supports long frames only if the card is built on a newer chip
189 (Cyclone and above).
190 .El
191 .Pp
192 The
193 .Nm
194 driver automatically recognizes devices that natively support oversized frames
195 for
196 .Nm
197 use and calculates the appropriate frame MTU based on the
198 capabilities of the parent interface.
199 The other interfaces listed above can handle oversized frames,
200 but they do not advertise this ability of theirs.
201 The MTU setting on
202 .Nm
203 can be corrected manually if used in conjunction with such parent interface.
204 .Sh SEE ALSO
205 .Xr kqueue 2 ,
206 .Xr miibus 4 ,
207 .Xr ifconfig 8
208 .Sh BUGS
209 No 802.1Q features except VLAN tagging are implemented.
210 .Pp
211 .Dv EVFILT_NETDEV
212 events on a
213 .Nm
214 interface will be sent through
215 .Xr kqueue 2
216 only if the parent interface uses
217 .Xr miibus 4
218 for link state notification.