1 .TH BRIDGE 8 "1 August 2012" "iproute2" "Linux"
3 bridge \- show / manipulate bridge addresses and devices
10 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
16 .BR link " | " fdb " | " mdb " | " vlan " | " monitor " }"
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] }
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 " } ] [ "
56 .BR nobackup_port " ] [ "
57 .BR self " ] [ " master " ]"
60 .BR "bridge link" " [ " show " ] [ "
65 .BR "bridge fdb" " { " add " | " append " | " del " | " replace " } "
69 .BR local " | " static " | " dynamic " } [ "
70 .BR self " ] [ " master " ] [ " router " ] [ " use " ] [ " extern_learn " ] [ " sticky " ] [ "
83 .BR "bridge fdb" " [ " show " ] [ "
96 .BR "bridge mdb" " { " add " | " del " } "
103 .BR permanent " | " temp " ] [ "
108 .BR "bridge mdb show " [ "
113 .BR "bridge vlan" " { " add " | " del " } "
119 .IR TUNNEL_ID " ] [ "
120 .BR pvid " ] [ " untagged " ] [ "
121 .BR self " ] [ " master " ] "
124 .BR "bridge vlan" " [ " show " | " tunnelshow " ] [ "
129 .BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]"
134 .BR "\-V" , " -Version"
135 print the version of the
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.
146 .BR "\-d" , " \-details"
147 print detailed information about MDB router ports.
150 .BR "\-n" , " \-net" , " \-netns " <NETNS>
153 to the specified network namespace
155 Actually it just simplifies executing of:
160 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
166 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
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.
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.
181 .BR \-c [ color ][ = { always | auto | never }
182 Configure color output. If parameter is omitted or
184 color output is enabled regardless of stdout state. If parameter is
186 stdout is checked to be a terminal before enabling color output. If parameter is
188 color output is disabled. If specified multiple times, the last one takes
189 precedence. This flag is ignored if
195 Output results in JavaScript Object Notation (JSON).
198 .BR "\-p", " \-pretty"
199 When combined with -j generate a pretty JSON output.
202 .BR "\-o", " \-oneline"
203 output each record on a single line, replacing line feeds
206 character. This is convenient when you want to count records
214 .SH BRIDGE - COMMAND SYNTAX
225 - Forwarding Database entry.
229 - Multicast group database entry.
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"
246 ) objects, but some objects do not allow all of these operations
247 or have some additional commands. The
249 command is available for all objects. It prints
250 out a list of available commands and argument syntax conventions.
252 If no command is given, some default command is assumed.
255 or, if the objects of this class cannot be listed,
258 .SH bridge link - bridge port
261 objects correspond to the port devices of the bridge.
264 The corresponding commands set and display port status and bridge specific
267 .SS bridge link set - set bridge specific attributes on a port
271 interface name of the bridge port
275 the STP path cost of the specified port.
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.
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
291 - port is DISABLED. Make this port completely inactive.
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.
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
306 - STP FORWARDING state. Port is fully active.
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
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.
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.
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.
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.
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.
345 .BR "learning_sync on " or " learning_sync off "
346 Controls whether a given port will sync MAC addresses learned on device port to
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.
355 Some network interface cards support HW bridge functionality and they may be
356 configured in different modes. Currently support modes are:
359 - Data sent between HW ports is sent on the wire to the external
363 - bridging happens in hardware.
366 .BR "mcast_flood on " or " mcast_flood off "
367 Controls whether a given port will flood multicast traffic for which
368 there is no MDB entry. By default this flag is on.
371 .BR "mcast_to_unicast on " or " mcast_to_unicast off "
372 Controls whether a given port will replicate packets using unicast
373 instead of multicast. By default this flag is off.
376 .BR "neigh_suppress on " or " neigh_suppress off "
377 Controls whether neigh discovery (arp and nd) proxy and suppression is
378 enabled on the port. By default this flag is off.
381 .BR "vlan_tunnel on " or " vlan_tunnel off "
382 Controls whether vlan to tunnel mapping is enabled on the port. By
383 default this flag is off.
386 .BR "isolated on " or " isolated off "
387 Controls whether a given port will be isolated, which means it will be
388 able to communicate with non-isolated ports only. By default this
392 .BI backup_port " DEVICE"
393 If the port loses carrier all traffic will be redirected to the
394 configured backup port
398 Removes the currently configured backup port
402 link setting is configured on specified physical device
406 link setting is configured on the software bridge (default)
409 .BR "\-t" , " \-timestamp"
410 display current time when using monitor option.
412 .SS bridge link show - list bridge port configuration.
414 This command displays the current bridge port configuration and flags.
416 .SH bridge fdb - forwarding database management
419 objects contain known Ethernet addresses on a link.
422 The corresponding commands display fdb entries, add new entries,
426 .SS bridge fdb add - add a new fdb entry
428 This command creates a new fdb entry.
432 the Ethernet MAC address.
436 the interface to which this address is associated.
439 - is a local permanent fdb entry
443 - is a static (no arp) fdb entry
447 - is a dynamic reachable age-able fdb entry
451 - the address is associated with the port drivers fdb. Usually hardware.
455 - the address is associated with master devices fdb. Usually software (default).
459 - the destination address is associated with a router.
460 Valid if the referenced device is a VXLAN type device and has
461 route shortcircuit enabled.
465 - the address is in use. User space can use this option to
466 indicate to the kernel that the fdb entry is in use.
470 - this entry was learned externally. This option can be used to
471 indicate to the kernel that an entry was hardware or user-space
472 controller learnt dynamic entry. Kernel will not age such an entry.
476 - this entry will not change its port due to learning.
480 The next command line parameters apply only
481 when the specified device
486 the IP address of the destination
487 VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.
490 .BI src_vni " SRC VNI"
491 the src VNI Network Identifier (or VXLAN Segment ID)
492 this entry belongs to. Used only when the vxlan device is in
493 external or collect metadata mode. If omitted the value specified at
494 vxlan device creation will be used.
498 the VXLAN VNI Network Identifier (or VXLAN Segment ID)
499 to use to connect to the remote VXLAN tunnel endpoint.
500 If omitted the value specified at vxlan device creation
505 the UDP destination PORT number to use to connect to the
506 remote VXLAN tunnel endpoint.
507 If omitted the default value is used.
511 device name of the outgoing interface for the
512 VXLAN device driver to reach the
513 remote VXLAN tunnel endpoint.
515 .SS bridge fdb append - append a forwarding database entry
516 This command adds a new fdb entry with an already known
518 Valid only for multicast link layer addresses.
519 The command adds support for broadcast and multicast
520 Ethernet MAC addresses.
521 The Ethernet MAC address is added multiple times into
522 the forwarding database and the vxlan device driver
523 sends a copy of the data packet to each entry found.
526 The arguments are the same as with
527 .BR "bridge fdb add" .
529 .SS bridge fdb delete - delete a forwarding database entry
530 This command removes an existing fdb entry.
533 The arguments are the same as with
534 .BR "bridge fdb add" .
536 .SS bridge fdb replace - replace a forwarding database entry
537 If no matching entry is found, a new one will be created instead.
540 The arguments are the same as with
541 .BR "bridge fdb add" .
543 .SS bridge fdb show - list forwarding entries.
545 This command displays the current forwarding table.
550 option, the command becomes verbose. It prints out the last updated
551 and last used time for each entry.
553 .SH bridge mdb - multicast group database management
556 objects contain known IP multicast group addresses on a link.
559 The corresponding commands display mdb entries, add new entries,
562 .SS bridge mdb add - add a new multicast group database entry
564 This command creates a new mdb entry.
568 the interface where this group address is associated.
572 the port whose link is known to have members of this multicast group.
576 the IP multicast group address whose members reside on the link connected to
580 - the mdb entry is permanent
584 - the mdb entry is temporary (default)
589 the VLAN ID which is known to have members of this multicast group.
592 .SS bridge mdb delete - delete a multicast group database entry
593 This command removes an existing mdb entry.
596 The arguments are the same as with
597 .BR "bridge mdb add" .
599 .SS bridge mdb show - list multicast group database entries
601 This command displays the current multicast group membership table. The table
602 is populated by IGMP and MLD snooping in the bridge driver automatically. It
607 commands manually too.
611 the interface only whose entries should be listed. Default is to list all
617 option, the command becomes verbose. It prints out the ports known to have
623 option, the command displays timer values for mdb and router port entries.
625 .SH bridge vlan - VLAN filter list
628 objects contain known VLAN IDs for a link.
631 The corresponding commands display vlan filter entries, add new entries,
634 .SS bridge vlan add - add a new vlan filter entry
636 This command creates a new vlan filter entry.
640 the interface with which this vlan is associated.
644 the VLAN ID that identifies the vlan.
647 .BI tunnel_info " TUNNEL_ID"
648 the TUNNEL ID that maps to this vlan. The tunnel id is set in
649 dst_metadata for every packet that belongs to this vlan (applicable to
650 bridge ports with vlan_tunnel flag set).
654 the vlan specified is to be considered a PVID at ingress.
655 Any untagged frames will be assigned to this VLAN.
659 the vlan specified is to be treated as untagged on egress.
663 the vlan is configured on the specified physical device. Required if the
664 device is the bridge device.
668 the vlan is configured on the software bridge (default).
670 .SS bridge vlan delete - delete a vlan filter entry
671 This command removes an existing vlan filter entry.
674 The arguments are the same as with
675 .BR "bridge vlan add".
677 .BR "pvid " and " untagged"
680 .SS bridge vlan show - list vlan configuration.
682 This command displays the current VLAN filter table.
687 option, the command displays per-vlan traffic statistics.
689 .SS bridge vlan tunnelshow - list vlan tunnel mapping.
691 This command displays the current vlan tunnel info mapping.
693 .SH bridge monitor - state monitoring
697 utility can monitor the state of devices and addresses
698 continuously. This option has a slightly different format.
701 command is the first in the command line and then the object list follows:
703 .BR "bridge monitor" " [ " all " |"
707 is the list of object types that we want to monitor.
709 .BR link ", " fdb ", and " mdb "."
714 opens RTNETLINK, listens on it and dumps state changes in the format
715 described in previous sections.
718 If a file name is given, it does not listen on RTNETLINK,
719 but opens the file containing RTNETLINK messages saved in binary format
723 This command uses facilities added in Linux 3.0.
725 Although the forwarding table is maintained on a per-bridge device basis
726 the bridge device is not part of the syntax. This is a limitation of the
727 underlying netlink neighbour message protocol. When displaying the
728 forwarding table, entries for all bridges are displayed.
729 Add/delete/modify commands determine the underlying bridge device
730 based on the bridge to which the corresponding ethernet device is attached.
736 .RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org>
739 Original Manpage by Stephen Hemminger