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