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