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