]>
Commit | Line | Data |
---|---|---|
d04bc300 SH |
1 | .TH BRIDGE 8 "1 August 2012" "iproute2" "Linux" |
2 | .SH NAME | |
3 | bridge \- show / manipulate bridge addresses and devices | |
4 | .SH SYNOPSIS | |
5 | ||
6 | .ad l | |
7 | .in +8 | |
8 | .ti -8 | |
9 | .B bridge | |
10 | .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | " | |
11 | .BR help " }" | |
12 | .sp | |
13 | ||
14 | .ti -8 | |
15 | .IR OBJECT " := { " | |
aa2f1335 | 16 | .BR link " | " fdb " | " vlan " | " monitor " }" |
d04bc300 SH |
17 | .sp |
18 | ||
19 | .ti -8 | |
20 | .IR OPTIONS " := { " | |
21 | \fB\-V\fR[\fIersion\fR] | | |
aa2f1335 VY |
22 | \fB\-s\fR[\fItatistics\fR] } |
23 | ||
24 | .ti -8 | |
25 | .BR "bridge link set" | |
26 | .B dev | |
27 | .IR DEV | |
28 | .IR " [ " | |
29 | .B cost | |
30 | .IR COST " ] [ " | |
31 | .B priority | |
32 | .IR PRIO " ] [ " | |
33 | .B state | |
34 | .IR STATE "] [" | |
35 | .BR guard " { " on " | " off " } ] [ " | |
36 | .BR hairpin " { " on " | " off " } ] [ " | |
37 | .BR fastleave " { " on " | " off " } ] [ " | |
38 | .BR root_block " { " on " | " off " } ] [ " | |
39 | .BR hwmode " { " vepa " | " veb " } ] " | |
40 | ||
41 | .ti -8 | |
42 | .BR "bridge link" " [ " show " ] [ " | |
43 | .B dev | |
44 | .IR DEV " ]" | |
d04bc300 SH |
45 | |
46 | .ti -8 | |
d611682a | 47 | .BR "bridge fdb" " { " add " | " del " } " |
d04bc300 SH |
48 | .I LLADDR |
49 | .B dev | |
50 | .IR DEV " { " | |
d611682a JF |
51 | .BR local " | " temp " } { " |
52 | .BR self " } { " embedded " } " | |
d04bc300 SH |
53 | |
54 | .ti -8 | |
55 | .BR "bridge fdb" " [ " show " ] [ " | |
56 | .B dev | |
57 | .IR DEV " ]" | |
58 | ||
ab938710 VY |
59 | .ti -8 |
60 | .BR "bridge vlan" " { " add " | " del " } " | |
61 | .B dev | |
62 | .IR DEV | |
63 | .B vid | |
64 | .IR VID " [ " | |
65 | .BR pvid " ] [ " untagged " ] [ " | |
66 | .BR self " ] [ " master " ] " | |
67 | ||
68 | .ti -8 | |
69 | .BR "bridge vlan" " [ " show " ] [ " | |
70 | .B dev | |
71 | .IR DEV " ]" | |
72 | ||
d04bc300 SH |
73 | .ti -8 |
74 | .BR "bridge monitor" " [ " all " | " neigh " | " link " ]" | |
75 | ||
76 | .SH OPTIONS | |
77 | ||
78 | .TP | |
79 | .BR "\-V" , " -Version" | |
80 | print the version of the | |
81 | .B bridge | |
82 | utility and exit. | |
83 | ||
84 | .TP | |
85 | .BR "\-s" , " \-stats", " \-statistics" | |
49572501 KR |
86 | output more information. If this option |
87 | is given multiple times, the amount of information increases. | |
d04bc300 SH |
88 | As a rule, the information is statistics or some time values. |
89 | ||
90 | ||
91 | .SH BRIDGE - COMMAND SYNTAX | |
92 | ||
93 | .SS | |
94 | .I OBJECT | |
95 | ||
aa2f1335 VY |
96 | .TP |
97 | .B link | |
98 | - Bridge port. | |
99 | ||
d04bc300 SH |
100 | .TP |
101 | .B fdb | |
102 | - Forwarding Database entry. | |
103 | ||
ab938710 VY |
104 | .TP |
105 | .B vlan | |
106 | - VLAN filter list. | |
107 | ||
d04bc300 SH |
108 | .SS |
109 | .I COMMAND | |
110 | ||
111 | Specifies the action to perform on the object. | |
112 | The set of possible actions depends on the object type. | |
113 | As a rule, it is possible to | |
114 | .BR "add" , " delete" | |
115 | and | |
116 | .B show | |
117 | (or | |
118 | .B list | |
119 | ) objects, but some objects do not allow all of these operations | |
120 | or have some additional commands. The | |
121 | .B help | |
122 | command is available for all objects. It prints | |
123 | out a list of available commands and argument syntax conventions. | |
124 | .sp | |
125 | If no command is given, some default command is assumed. | |
126 | Usually it is | |
127 | .B list | |
128 | or, if the objects of this class cannot be listed, | |
129 | .BR "help" . | |
130 | ||
aa2f1335 VY |
131 | .SH bridge link - bridge port |
132 | ||
133 | .B link | |
134 | objects correspond to the port devices of the bridge. | |
135 | ||
136 | .P | |
137 | The corresponding commands set and display port status and bridge specific | |
138 | attributes. | |
139 | ||
140 | .SS bridge link set - set bridge specific attributes on a port | |
141 | ||
142 | .TP | |
143 | .BI dev " NAME " | |
144 | interface name of the bridge port | |
145 | ||
146 | .TP | |
147 | .BI cost " COST " | |
148 | the STP path cost of the specified port. | |
149 | ||
150 | .TP | |
151 | .BI priority " PRIO " | |
152 | the STP port priority. The priority value is an unsigned 8-bit quantity | |
153 | (number between 0 and 255). This metric is used in the designated port an | |
154 | droot port selectio algorithms. | |
155 | ||
156 | .TP | |
157 | .BI state " STATE " | |
158 | the operation state of the port. This is primarily used by user space STP/RSTP | |
159 | implementation. The following is a list of valid values: | |
160 | ||
161 | .B 0 | |
162 | - port is DISABLED. Make this port completely inactive. | |
163 | .sp | |
164 | ||
165 | .B 1 | |
166 | - STP LISTENING state. Only valid if STP is enabled on the brige. In this | |
167 | state the port for list for STP BPDUs and drop all other traffic. | |
168 | .sp | |
169 | ||
170 | .B 2 | |
171 | - STP LEARNING state. Only valid if STP is enabled on the bridge. In this | |
172 | state the port will accept traffic only for the purpose of updating MAC | |
173 | adress tables. | |
174 | .sp | |
175 | ||
176 | .B 3 | |
177 | - STP FORWARDING state. Port is fully active. | |
178 | .sp | |
179 | ||
180 | .B 4 | |
6274b0b7 | 181 | - STP BLOCKING state. Only valid if STP is enabled on the bridge. This state |
aa2f1335 VY |
182 | is used during the STP election process. In this state, port will only process |
183 | STP BPDUs. | |
184 | .sp | |
185 | ||
186 | .TP | |
187 | .BR "guard on " or " guard off " | |
188 | Controls whether STP BPUDs will be processed by the bridge port. By default, | |
189 | the flag is turned off allowed BPDU processing. Turning this flag on will | |
190 | cause the port to stop processing STP BPDUs. | |
191 | ||
192 | .TP | |
193 | .BR "hairpin on " or " hairpin off " | |
194 | Controls whether traffic may be send back out of the port on which it was | |
195 | received. By default, this flag is turned off and the bridge will not forward | |
196 | traffic back out of the receiving port. | |
197 | ||
198 | .TP | |
199 | .BR "fastleave on " or " fastleave off " | |
200 | This flag allows the bridge to immediately stop multicast traffic on a port | |
6274b0b7 | 201 | that receives IGMP Leave message. It is only used with IGMP snooping is |
aa2f1335 VY |
202 | enabled on the bridge. By default the flag is off. |
203 | ||
204 | .TP | |
205 | .BR "root_block on " or " root_block off " | |
206 | Controls whether a given port is allowed to become root port or not. Only used | |
207 | when STP is enabled on the bridge. By default the flag is off. | |
208 | ||
209 | .TP | |
210 | .BI hwmode | |
211 | Some network interface cards support HW bridge functionality and they may be | |
212 | configured in different modes. Currently support modes are: | |
213 | ||
214 | .B vepa | |
215 | - Data sent between HW ports is sent on the wire to the external | |
216 | switch. | |
217 | ||
218 | .B veb | |
219 | - bridging happens in hardware. | |
220 | ||
221 | .SS bridge link show - list bridge port configuration. | |
222 | ||
223 | This command displays the current bridge port configuration and flags. | |
224 | ||
d04bc300 SH |
225 | .SH bridge fdb - forwarding database management |
226 | ||
227 | .B fdb | |
228 | objects contain known Ethernet addresses on a link. | |
229 | ||
230 | .P | |
231 | The corresponding commands display fdb entries, add new entries, | |
232 | and delete old ones. | |
233 | ||
d611682a | 234 | .SS bridge fdb add - add a new fdb entry |
d04bc300 | 235 | |
d611682a | 236 | This command creates a new fdb entry. |
d04bc300 SH |
237 | |
238 | .TP | |
239 | .BI "ADDRESS" | |
240 | the Ethernet MAC address. | |
241 | ||
242 | .TP | |
243 | .BI dev " NAME" | |
244 | the interface to which this address is associated. | |
245 | ||
d611682a JF |
246 | .B self |
247 | - the address is associated with a software fdb (default) | |
248 | .sp | |
249 | ||
250 | .B embedded | |
251 | - the address is associated with an offloaded fdb | |
252 | .sp | |
253 | ||
d04bc300 SH |
254 | .in -8 |
255 | ||
256 | .SS bridge fdb delete - delete a forwarding database entry | |
257 | This command removes an existing fdb entry. | |
258 | ||
259 | .PP | |
260 | The arguments are the same as with | |
261 | .BR "bridge fdb add" , | |
262 | ||
263 | .SS bridge fdb show - list forwarding entries. | |
264 | ||
49572501 | 265 | This command displays the current forwarding table. |
d04bc300 SH |
266 | |
267 | .PP | |
268 | With the | |
269 | .B -statistics | |
270 | option, the command becomes verbose. It prints out the last updated | |
271 | and last used time for each entry. | |
272 | ||
ab938710 VY |
273 | .SH bridge vlan - VLAN filter list |
274 | ||
275 | .B vlan | |
276 | objects contain known VLAN IDs for a link. | |
277 | ||
278 | .P | |
279 | The corresponding commands display vlan filter entries, add new entries, | |
280 | and delete old ones. | |
281 | ||
282 | .SS bridge vlan add - add a new vlan filter entry | |
283 | ||
284 | This command creates a new vlan filter entry. | |
285 | ||
286 | .TP | |
287 | .BI dev " NAME" | |
288 | the interface with which this vlan is associated. | |
289 | ||
290 | .TP | |
291 | .BI vid " VID" | |
292 | the VLAN ID that identifies the vlan. | |
293 | ||
294 | .TP | |
295 | .BI pvid | |
296 | the vlan specified is to be considered a PVID at ingress. | |
297 | Any untagged frames will be assigned to this VLAN. | |
298 | ||
299 | .TP | |
300 | .BI untagged | |
301 | the vlan specified is to be treated as untagged on egress. | |
302 | ||
303 | .TP | |
304 | .BI self | |
305 | the vlan is configured on the specified physical device. Required if the | |
306 | device is the bridge device. | |
307 | ||
308 | .TP | |
309 | .BI master | |
6274b0b7 | 310 | the vlan is configured on the software bridge (default). |
ab938710 VY |
311 | |
312 | .SS bridge vlan delete - delete a forwarding database entry | |
313 | This command removes an existing fdb entry. | |
314 | ||
315 | .PP | |
316 | The arguments are the same as with | |
317 | .BR "bridge vlan add". | |
318 | The | |
319 | .BR "pvid " and " untagged" | |
320 | flags are ignored. | |
321 | ||
322 | .SS bridge vlan show - list vlan configuration. | |
323 | ||
324 | This command displays the current VLAN filter table. | |
325 | ||
d04bc300 SH |
326 | .SH bridge monitor - state monitoring |
327 | ||
328 | The | |
329 | .B bridge | |
330 | utility can monitor the state of devices and addresses | |
331 | continuously. This option has a slightly different format. | |
332 | Namely, the | |
333 | .B monitor | |
334 | command is the first in the command line and then the object list follows: | |
335 | ||
336 | .BR "bridge monitor" " [ " all " |" | |
49572501 | 337 | .IR OBJECT-LIST " ]" |
d04bc300 SH |
338 | |
339 | .I OBJECT-LIST | |
340 | is the list of object types that we want to monitor. | |
341 | It may contain | |
342 | .BR link ", and " fdb "." | |
343 | If no | |
344 | .B file | |
345 | argument is given, | |
346 | .B bridge | |
347 | opens RTNETLINK, listens on it and dumps state changes in the format | |
348 | described in previous sections. | |
349 | ||
350 | .P | |
351 | If a file name is given, it does not listen on RTNETLINK, | |
352 | but opens the file containing RTNETLINK messages saved in binary format | |
353 | and dumps them. Such a history file can be generated with the | |
354 | ||
355 | ||
356 | .SH NOTES | |
357 | This command uses facilities added in Linux 3.0. | |
358 | ||
359 | Although the forwarding table is maintained on a per-bridge device basis | |
360 | the bridge device is not part of the syntax. This is a limitation of the | |
361 | underlying netlink neighbour message protocol. When displaying the | |
362 | forwarding table, entries for all bridges are displayed. | |
363 | Add/delete/modify commands determine the underlying bridge device | |
6274b0b7 | 364 | based on the bridge to which the corresponding ethernet device is attached. |
d04bc300 SH |
365 | |
366 | ||
367 | .SH SEE ALSO | |
368 | .BR ip (8) | |
49572501 | 369 | .SH BUGS |
d04bc300 SH |
370 | .RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org> |
371 | ||
372 | .SH AUTHOR | |
373 | Original Manpage by Stephen Hemminger |