]>
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 " := { " | |
54e9c3a3 | 16 | .BR link " | " fdb " | " mdb " | " 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 | |
7578ae88 | 47 | .BR "bridge fdb" " { " add " | " append " | " del " } " |
d04bc300 SH |
48 | .I LLADDR |
49 | .B dev | |
50 | .IR DEV " { " | |
d611682a | 51 | .BR local " | " temp " } { " |
7578ae88 TR |
52 | .BR self " } { " embedded " } { " router " } [ " |
53 | .B dst | |
54 | .IR IPADDR " ] [ " | |
55 | .B vni | |
56 | .IR VNI " ] [" | |
57 | .B port | |
58 | .IR PORT " ] [" | |
59 | .B via | |
60 | .IR DEVICE " ]" | |
d04bc300 SH |
61 | |
62 | .ti -8 | |
63 | .BR "bridge fdb" " [ " show " ] [ " | |
64 | .B dev | |
65 | .IR DEV " ]" | |
66 | ||
54e9c3a3 PP |
67 | .ti -8 |
68 | .BR "bridge mdb" " { " add " | " del " } " | |
69 | .B dev | |
70 | .IR DEV | |
71 | .B port | |
72 | .IR PORT | |
73 | .B grp | |
74 | .IR GROUP " [ " | |
75 | .BR permanent " | " temp " ]" | |
76 | ||
77 | .ti -8 | |
78 | .BR "bridge mdb show " [ " | |
79 | .B dev | |
80 | .IR DEV " ]" | |
81 | ||
ab938710 VY |
82 | .ti -8 |
83 | .BR "bridge vlan" " { " add " | " del " } " | |
84 | .B dev | |
85 | .IR DEV | |
86 | .B vid | |
87 | .IR VID " [ " | |
88 | .BR pvid " ] [ " untagged " ] [ " | |
89 | .BR self " ] [ " master " ] " | |
90 | ||
91 | .ti -8 | |
92 | .BR "bridge vlan" " [ " show " ] [ " | |
93 | .B dev | |
94 | .IR DEV " ]" | |
95 | ||
d04bc300 | 96 | .ti -8 |
54e9c3a3 | 97 | .BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]" |
d04bc300 SH |
98 | |
99 | .SH OPTIONS | |
100 | ||
101 | .TP | |
102 | .BR "\-V" , " -Version" | |
103 | print the version of the | |
104 | .B bridge | |
105 | utility and exit. | |
106 | ||
107 | .TP | |
108 | .BR "\-s" , " \-stats", " \-statistics" | |
49572501 KR |
109 | output more information. If this option |
110 | is given multiple times, the amount of information increases. | |
d04bc300 SH |
111 | As a rule, the information is statistics or some time values. |
112 | ||
113 | ||
114 | .SH BRIDGE - COMMAND SYNTAX | |
115 | ||
116 | .SS | |
117 | .I OBJECT | |
118 | ||
aa2f1335 VY |
119 | .TP |
120 | .B link | |
121 | - Bridge port. | |
122 | ||
d04bc300 SH |
123 | .TP |
124 | .B fdb | |
125 | - Forwarding Database entry. | |
126 | ||
54e9c3a3 PP |
127 | .TP |
128 | .B mdb | |
129 | - Multicast group database entry. | |
130 | ||
ab938710 VY |
131 | .TP |
132 | .B vlan | |
133 | - VLAN filter list. | |
134 | ||
d04bc300 SH |
135 | .SS |
136 | .I COMMAND | |
137 | ||
138 | Specifies the action to perform on the object. | |
139 | The set of possible actions depends on the object type. | |
140 | As a rule, it is possible to | |
141 | .BR "add" , " delete" | |
142 | and | |
143 | .B show | |
144 | (or | |
145 | .B list | |
146 | ) objects, but some objects do not allow all of these operations | |
147 | or have some additional commands. The | |
148 | .B help | |
149 | command is available for all objects. It prints | |
150 | out a list of available commands and argument syntax conventions. | |
151 | .sp | |
152 | If no command is given, some default command is assumed. | |
153 | Usually it is | |
154 | .B list | |
155 | or, if the objects of this class cannot be listed, | |
156 | .BR "help" . | |
157 | ||
aa2f1335 VY |
158 | .SH bridge link - bridge port |
159 | ||
160 | .B link | |
161 | objects correspond to the port devices of the bridge. | |
162 | ||
163 | .P | |
164 | The corresponding commands set and display port status and bridge specific | |
165 | attributes. | |
166 | ||
167 | .SS bridge link set - set bridge specific attributes on a port | |
168 | ||
169 | .TP | |
170 | .BI dev " NAME " | |
171 | interface name of the bridge port | |
172 | ||
173 | .TP | |
174 | .BI cost " COST " | |
175 | the STP path cost of the specified port. | |
176 | ||
177 | .TP | |
178 | .BI priority " PRIO " | |
179 | the STP port priority. The priority value is an unsigned 8-bit quantity | |
180 | (number between 0 and 255). This metric is used in the designated port an | |
181 | droot port selectio algorithms. | |
182 | ||
183 | .TP | |
184 | .BI state " STATE " | |
185 | the operation state of the port. This is primarily used by user space STP/RSTP | |
186 | implementation. The following is a list of valid values: | |
187 | ||
188 | .B 0 | |
189 | - port is DISABLED. Make this port completely inactive. | |
190 | .sp | |
191 | ||
192 | .B 1 | |
193 | - STP LISTENING state. Only valid if STP is enabled on the brige. In this | |
194 | state the port for list for STP BPDUs and drop all other traffic. | |
195 | .sp | |
196 | ||
197 | .B 2 | |
198 | - STP LEARNING state. Only valid if STP is enabled on the bridge. In this | |
199 | state the port will accept traffic only for the purpose of updating MAC | |
200 | adress tables. | |
201 | .sp | |
202 | ||
203 | .B 3 | |
204 | - STP FORWARDING state. Port is fully active. | |
205 | .sp | |
206 | ||
207 | .B 4 | |
6274b0b7 | 208 | - STP BLOCKING state. Only valid if STP is enabled on the bridge. This state |
aa2f1335 VY |
209 | is used during the STP election process. In this state, port will only process |
210 | STP BPDUs. | |
211 | .sp | |
212 | ||
213 | .TP | |
214 | .BR "guard on " or " guard off " | |
215 | Controls whether STP BPUDs will be processed by the bridge port. By default, | |
216 | the flag is turned off allowed BPDU processing. Turning this flag on will | |
217 | cause the port to stop processing STP BPDUs. | |
218 | ||
219 | .TP | |
220 | .BR "hairpin on " or " hairpin off " | |
221 | Controls whether traffic may be send back out of the port on which it was | |
222 | received. By default, this flag is turned off and the bridge will not forward | |
223 | traffic back out of the receiving port. | |
224 | ||
225 | .TP | |
226 | .BR "fastleave on " or " fastleave off " | |
227 | This flag allows the bridge to immediately stop multicast traffic on a port | |
6274b0b7 | 228 | that receives IGMP Leave message. It is only used with IGMP snooping is |
aa2f1335 VY |
229 | enabled on the bridge. By default the flag is off. |
230 | ||
231 | .TP | |
232 | .BR "root_block on " or " root_block off " | |
233 | Controls whether a given port is allowed to become root port or not. Only used | |
234 | when STP is enabled on the bridge. By default the flag is off. | |
235 | ||
236 | .TP | |
237 | .BI hwmode | |
238 | Some network interface cards support HW bridge functionality and they may be | |
239 | configured in different modes. Currently support modes are: | |
240 | ||
241 | .B vepa | |
242 | - Data sent between HW ports is sent on the wire to the external | |
243 | switch. | |
244 | ||
245 | .B veb | |
246 | - bridging happens in hardware. | |
247 | ||
248 | .SS bridge link show - list bridge port configuration. | |
249 | ||
250 | This command displays the current bridge port configuration and flags. | |
251 | ||
d04bc300 SH |
252 | .SH bridge fdb - forwarding database management |
253 | ||
254 | .B fdb | |
255 | objects contain known Ethernet addresses on a link. | |
256 | ||
257 | .P | |
258 | The corresponding commands display fdb entries, add new entries, | |
7578ae88 | 259 | append entries, |
d04bc300 SH |
260 | and delete old ones. |
261 | ||
d611682a | 262 | .SS bridge fdb add - add a new fdb entry |
d04bc300 | 263 | |
d611682a | 264 | This command creates a new fdb entry. |
d04bc300 SH |
265 | |
266 | .TP | |
7578ae88 | 267 | .BI "LLADDR" |
d04bc300 SH |
268 | the Ethernet MAC address. |
269 | ||
270 | .TP | |
7578ae88 | 271 | .BI dev " DEV" |
d04bc300 SH |
272 | the interface to which this address is associated. |
273 | ||
d611682a JF |
274 | .B self |
275 | - the address is associated with a software fdb (default) | |
276 | .sp | |
277 | ||
278 | .B embedded | |
279 | - the address is associated with an offloaded fdb | |
280 | .sp | |
281 | ||
7578ae88 TR |
282 | .B router |
283 | - the destination address is associated with a router. | |
284 | Valid if the referenced device is a VXLAN type device and has | |
285 | route shortcircuit enabled. | |
286 | .sp | |
287 | ||
d04bc300 | 288 | .in -8 |
7578ae88 TR |
289 | The next command line parameters apply only |
290 | when the specified device | |
291 | .I DEV | |
292 | is of type VXLAN. | |
293 | .TP | |
294 | .BI dst " IPADDR" | |
295 | the IP address of the destination | |
296 | VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides. | |
297 | ||
298 | .TP | |
299 | .BI vni " VNI" | |
300 | the VXLAN VNI Network Identifier (or VXLAN Segment ID) | |
301 | to use to connect to the remote VXLAN tunnel endpoint. | |
302 | If omitted the value specified at vxlan device creation | |
303 | will be used. | |
304 | ||
305 | .TP | |
306 | .BI port " PORT" | |
307 | the UDP destination PORT number to use to connect to the | |
308 | remote VXLAN tunnel endpoint. | |
309 | If omitted the default value is used. | |
310 | ||
311 | .TP | |
312 | .BI via " DEVICE" | |
313 | device name of the outgoing interface for the | |
314 | VXLAN device driver to reach the | |
315 | remote VXLAN tunnel endpoint. | |
316 | ||
317 | .SS bridge fdb append - append a forwarding database entry | |
318 | This command adds a new fdb entry with an already known | |
319 | .IR LLADDR . | |
320 | Valid only for multicast link layer addresses. | |
321 | The command adds support for broadcast and multicast | |
322 | Ethernet MAC addresses. | |
323 | The Ethernet MAC address is added multiple times into | |
324 | the forwarding database and the vxlan device driver | |
325 | sends a copy of the data packet to each entry found. | |
326 | ||
327 | .PP | |
328 | The arguments are the same as with | |
329 | .BR "bridge fdb add" , | |
d04bc300 SH |
330 | |
331 | .SS bridge fdb delete - delete a forwarding database entry | |
332 | This command removes an existing fdb entry. | |
333 | ||
334 | .PP | |
335 | The arguments are the same as with | |
336 | .BR "bridge fdb add" , | |
337 | ||
338 | .SS bridge fdb show - list forwarding entries. | |
339 | ||
49572501 | 340 | This command displays the current forwarding table. |
d04bc300 SH |
341 | |
342 | .PP | |
343 | With the | |
344 | .B -statistics | |
345 | option, the command becomes verbose. It prints out the last updated | |
346 | and last used time for each entry. | |
347 | ||
54e9c3a3 PP |
348 | .SH bridge mdb - multicast group database management |
349 | ||
350 | .B mdb | |
351 | objects contain known IP multicast group addresses on a link. | |
352 | ||
353 | .P | |
354 | The corresponding commands display mdb entries, add new entries, | |
355 | and delete old ones. | |
356 | ||
357 | .SS bridge mdb add - add a new multicast group database entry | |
358 | ||
359 | This command creates a new mdb entry. | |
360 | ||
361 | .TP | |
362 | .BI dev " DEV" | |
363 | the interface where this group address is associated. | |
364 | ||
365 | .TP | |
366 | .BI port " PORT" | |
367 | the port whose link is known to have members of this multicast group. | |
368 | ||
369 | .TP | |
370 | .BI grp " GROUP" | |
371 | the IP multicast group address whose members reside on the link connected to | |
372 | the port. | |
373 | ||
374 | .B permanent | |
375 | - the mdb entry is permanent | |
376 | .sp | |
377 | ||
378 | .B temp | |
379 | - the mdb entry is temporary (default) | |
380 | .sp | |
381 | ||
382 | .in -8 | |
383 | .SS bridge mdb delete - delete a multicast group database entry | |
384 | This command removes an existing mdb entry. | |
385 | ||
386 | .PP | |
387 | The arguments are the same as with | |
388 | .BR "bridge mdb add" . | |
389 | ||
390 | .SS bridge mdb show - list multicast group database entries | |
391 | ||
392 | This command displays the current multicast group membership table. The table | |
393 | is populated by IGMP and MLD snooping in the bridge driver automatically. It | |
394 | can be altered by | |
395 | .B bridge mdb add | |
396 | and | |
397 | .B bridge mdb del | |
398 | commands manually too. | |
399 | ||
400 | .TP | |
401 | .BI dev " DEV" | |
402 | the interface only whose entries should be listed. Default is to list all | |
403 | bridge interfaces. | |
404 | ||
405 | .PP | |
406 | With the | |
407 | .B -details | |
408 | option, the command becomes verbose. It prints out the ports known to have | |
409 | a connected router. | |
410 | ||
ab938710 VY |
411 | .SH bridge vlan - VLAN filter list |
412 | ||
413 | .B vlan | |
414 | objects contain known VLAN IDs for a link. | |
415 | ||
416 | .P | |
417 | The corresponding commands display vlan filter entries, add new entries, | |
418 | and delete old ones. | |
419 | ||
420 | .SS bridge vlan add - add a new vlan filter entry | |
421 | ||
422 | This command creates a new vlan filter entry. | |
423 | ||
424 | .TP | |
425 | .BI dev " NAME" | |
426 | the interface with which this vlan is associated. | |
427 | ||
428 | .TP | |
429 | .BI vid " VID" | |
430 | the VLAN ID that identifies the vlan. | |
431 | ||
432 | .TP | |
433 | .BI pvid | |
434 | the vlan specified is to be considered a PVID at ingress. | |
435 | Any untagged frames will be assigned to this VLAN. | |
436 | ||
437 | .TP | |
438 | .BI untagged | |
439 | the vlan specified is to be treated as untagged on egress. | |
440 | ||
441 | .TP | |
442 | .BI self | |
443 | the vlan is configured on the specified physical device. Required if the | |
444 | device is the bridge device. | |
445 | ||
446 | .TP | |
447 | .BI master | |
6274b0b7 | 448 | the vlan is configured on the software bridge (default). |
ab938710 VY |
449 | |
450 | .SS bridge vlan delete - delete a forwarding database entry | |
451 | This command removes an existing fdb entry. | |
452 | ||
453 | .PP | |
454 | The arguments are the same as with | |
455 | .BR "bridge vlan add". | |
456 | The | |
457 | .BR "pvid " and " untagged" | |
458 | flags are ignored. | |
459 | ||
460 | .SS bridge vlan show - list vlan configuration. | |
461 | ||
462 | This command displays the current VLAN filter table. | |
463 | ||
d04bc300 SH |
464 | .SH bridge monitor - state monitoring |
465 | ||
466 | The | |
467 | .B bridge | |
468 | utility can monitor the state of devices and addresses | |
469 | continuously. This option has a slightly different format. | |
470 | Namely, the | |
471 | .B monitor | |
472 | command is the first in the command line and then the object list follows: | |
473 | ||
474 | .BR "bridge monitor" " [ " all " |" | |
49572501 | 475 | .IR OBJECT-LIST " ]" |
d04bc300 SH |
476 | |
477 | .I OBJECT-LIST | |
478 | is the list of object types that we want to monitor. | |
479 | It may contain | |
54e9c3a3 | 480 | .BR link ", " fdb ", and " mdb "." |
d04bc300 SH |
481 | If no |
482 | .B file | |
483 | argument is given, | |
484 | .B bridge | |
485 | opens RTNETLINK, listens on it and dumps state changes in the format | |
486 | described in previous sections. | |
487 | ||
488 | .P | |
489 | If a file name is given, it does not listen on RTNETLINK, | |
490 | but opens the file containing RTNETLINK messages saved in binary format | |
491 | and dumps them. Such a history file can be generated with the | |
492 | ||
493 | ||
494 | .SH NOTES | |
495 | This command uses facilities added in Linux 3.0. | |
496 | ||
497 | Although the forwarding table is maintained on a per-bridge device basis | |
498 | the bridge device is not part of the syntax. This is a limitation of the | |
499 | underlying netlink neighbour message protocol. When displaying the | |
500 | forwarding table, entries for all bridges are displayed. | |
501 | Add/delete/modify commands determine the underlying bridge device | |
6274b0b7 | 502 | based on the bridge to which the corresponding ethernet device is attached. |
d04bc300 SH |
503 | |
504 | ||
505 | .SH SEE ALSO | |
506 | .BR ip (8) | |
49572501 | 507 | .SH BUGS |
d04bc300 SH |
508 | .RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org> |
509 | ||
510 | .SH AUTHOR | |
511 | Original Manpage by Stephen Hemminger |