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 " ] [ "
104 .BR self " ] [ " master " ]"
107 .BR "bridge mdb" " { " add " | " del " } "
114 .BR permanent " | " temp " ] [ "
119 .BR "bridge mdb show " [ "
124 .BR "bridge vlan" " { " add " | " del " } "
130 .IR TUNNEL_ID " ] [ "
131 .BR pvid " ] [ " untagged " ] [ "
132 .BR self " ] [ " master " ] "
135 .BR "bridge vlan" " [ " show " | " tunnelshow " ] [ "
140 .BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]"
145 .BR "\-V" , " -Version"
146 print the version of the
151 .BR "\-s" , " \-stats", " \-statistics"
152 output more information. If this option
153 is given multiple times, the amount of information increases.
154 As a rule, the information is statistics or some time values.
157 .BR "\-d" , " \-details"
158 print detailed information about MDB router ports.
161 .BR "\-n" , " \-net" , " \-netns " <NETNS>
164 to the specified network namespace
166 Actually it just simplifies executing of:
171 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
177 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
181 .BR "\-b", " \-batch " <FILENAME>
182 Read commands from provided file or standard input and invoke them.
183 First failure will cause termination of bridge command.
187 Don't terminate bridge command on errors in batch mode.
188 If there were any errors during execution of the commands, the application
189 return code will be non zero.
192 .BR \-c [ color ][ = { always | auto | never }
193 Configure color output. If parameter is omitted or
195 color output is enabled regardless of stdout state. If parameter is
197 stdout is checked to be a terminal before enabling color output. If parameter is
199 color output is disabled. If specified multiple times, the last one takes
200 precedence. This flag is ignored if
206 Output results in JavaScript Object Notation (JSON).
209 .BR "\-p", " \-pretty"
210 When combined with -j generate a pretty JSON output.
213 .BR "\-o", " \-oneline"
214 output each record on a single line, replacing line feeds
217 character. This is convenient when you want to count records
225 .SH BRIDGE - COMMAND SYNTAX
236 - Forwarding Database entry.
240 - Multicast group database entry.
249 Specifies the action to perform on the object.
250 The set of possible actions depends on the object type.
251 As a rule, it is possible to
252 .BR "add" , " delete"
257 ) objects, but some objects do not allow all of these operations
258 or have some additional commands. The
260 command is available for all objects. It prints
261 out a list of available commands and argument syntax conventions.
263 If no command is given, some default command is assumed.
266 or, if the objects of this class cannot be listed,
269 .SH bridge link - bridge port
272 objects correspond to the port devices of the bridge.
275 The corresponding commands set and display port status and bridge specific
278 .SS bridge link set - set bridge specific attributes on a port
282 interface name of the bridge port
286 the STP path cost of the specified port.
289 .BI priority " PRIO "
290 the STP port priority. The priority value is an unsigned 8-bit quantity
291 (number between 0 and 255). This metric is used in the designated port an
292 droot port selectio algorithms.
296 the operation state of the port. Except state 0 (disabled),
297 this is primarily used by user space STP/RSTP
298 implementation. One may enter a lowercased port state name, or one of the
299 numbers below. Negative inputs are ignored, and unrecognized names return an
305 state. Make this port completely inactive. This is also called
306 BPDU filter and could be used to disable STP on an untrusted port, like
307 a leaf virtual devices.
313 state. Only valid if STP is enabled on the bridge. In this
314 state the port listens for STP BPDUs and drops all other traffic frames.
320 state. Only valid if STP is enabled on the bridge. In this
321 state the port will accept traffic only for the purpose of updating MAC
328 state. Port is fully active.
334 state. Only valid if STP is enabled on the bridge. This state
335 is used during the STP election process. In this state, port will only process
340 .BR "guard on " or " guard off "
341 Controls whether STP BPDUs will be processed by the bridge port. By default,
342 the flag is turned off allowed BPDU processing. Turning this flag on will
344 the bridge port if a STP BPDU packet is received.
346 If running Spanning Tree on bridge, hostile devices on the network
347 may send BPDU on a port and cause network failure. Setting
349 will detect and stop this by disabling the port.
350 The port will be restarted if link is brought down, or
351 removed and reattached. For example if guard is enable on
354 .B ip link set dev eth0 down; ip link set dev eth0 up
357 .BR "hairpin on " or " hairpin off "
358 Controls whether traffic may be send back out of the port on which it was
359 received. This option is also called reflective relay mode, and is used to support
360 basic VEPA (Virtual Ethernet Port Aggregator) capabilities.
361 By default, this flag is turned off and the bridge will not forward
362 traffic back out of the receiving port.
365 .BR "fastleave on " or " fastleave off "
366 This flag allows the bridge to immediately stop multicast traffic on a port
367 that receives IGMP Leave message. It is only used with IGMP snooping is
368 enabled on the bridge. By default the flag is off.
371 .BR "root_block on " or " root_block off "
372 Controls whether a given port is allowed to become root port or not. Only used
373 when STP is enabled on the bridge. By default the flag is off.
375 This feature is also called root port guard.
376 If BPDU is received from a leaf (edge) port, it should not
377 be elected as root port. This could be used if using STP on a bridge and the downstream bridges are not fully
378 trusted; this prevents a hostile guest from rerouting traffic.
381 .BR "learning on " or " learning off "
382 Controls whether a given port will learn MAC addresses from received traffic or
383 not. If learning if off, the bridge will end up flooding any traffic for which
384 it has no FDB entry. By default this flag is on.
387 .BR "learning_sync on " or " learning_sync off "
388 Controls whether a given port will sync MAC addresses learned on device port to
392 .BR "flood on " or " flood off "
393 Controls whether a given port will flood unicast traffic for which there is no FDB entry. By default this flag is on.
397 Some network interface cards support HW bridge functionality and they may be
398 configured in different modes. Currently support modes are:
401 - Data sent between HW ports is sent on the wire to the external
405 - bridging happens in hardware.
408 .BR "mcast_flood on " or " mcast_flood off "
409 Controls whether a given port will flood multicast traffic for which
410 there is no MDB entry. By default this flag is on.
413 .BR "mcast_to_unicast on " or " mcast_to_unicast off "
414 Controls whether a given port will replicate packets using unicast
415 instead of multicast. By default this flag is off.
417 This is done by copying the packet per host and
418 changing the multicast destination MAC to a unicast one accordingly.
421 works on top of the multicast snooping feature of
422 the bridge. Which means unicast copies are only delivered to hosts which
423 are interested in it and signalized this via IGMP/MLD reports
426 This feature is intended for interface types which have a more reliable
427 and/or efficient way to deliver unicast packets than broadcast ones
430 However, it should only be enabled on interfaces where no IGMPv2/MLDv1
431 report suppression takes place. IGMP/MLD report suppression issue is usually
432 overcome by the network daemon (supplicant) enabling AP isolation and
433 by that separating all STAs.
435 Delivery of STA-to-STA IP mulitcast is made possible again by
436 enabling and utilizing the bridge hairpin mode, which considers the
437 incoming port as a potential outgoing port, too (see
440 Hairpin mode is performed after multicast snooping, therefore leading to
441 only deliver reports to STAs running a multicast router.
444 .BR "neigh_suppress on " or " neigh_suppress off "
445 Controls whether neigh discovery (arp and nd) proxy and suppression is
446 enabled on the port. By default this flag is off.
449 .BR "vlan_tunnel on " or " vlan_tunnel off "
450 Controls whether vlan to tunnel mapping is enabled on the port. By
451 default this flag is off.
454 .BR "isolated on " or " isolated off "
455 Controls whether a given port will be isolated, which means it will be
456 able to communicate with non-isolated ports only. By default this
460 .BI backup_port " DEVICE"
461 If the port loses carrier all traffic will be redirected to the
462 configured backup port
466 Removes the currently configured backup port
470 link setting is configured on specified physical device
474 link setting is configured on the software bridge (default)
477 .BR "\-t" , " \-timestamp"
478 display current time when using monitor option.
480 .SS bridge link show - list ports configuration for all bridges.
482 This command displays port configuration and flags for all bridges.
484 To display port configuration and flags for a specific bridge, use the
485 "ip link show master <bridge_device>" command.
487 .SH bridge fdb - forwarding database management
490 objects contain known Ethernet addresses on a link.
493 The corresponding commands display fdb entries, add new entries,
497 .SS bridge fdb add - add a new fdb entry
499 This command creates a new fdb entry.
503 the Ethernet MAC address.
507 the interface to which this address is associated.
510 - is a local permanent fdb entry
514 - is a static (no arp) fdb entry
518 - is a dynamic reachable age-able fdb entry
522 - the address is associated with the port drivers fdb. Usually hardware.
526 - the address is associated with master devices fdb. Usually software (default).
530 - the destination address is associated with a router.
531 Valid if the referenced device is a VXLAN type device and has
532 route shortcircuit enabled.
536 - the address is in use. User space can use this option to
537 indicate to the kernel that the fdb entry is in use.
541 - this entry was learned externally. This option can be used to
542 indicate to the kernel that an entry was hardware or user-space
543 controller learnt dynamic entry. Kernel will not age such an entry.
547 - this entry will not change its port due to learning.
551 The next command line parameters apply only
552 when the specified device
557 the IP address of the destination
558 VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.
562 the src VNI Network Identifier (or VXLAN Segment ID)
563 this entry belongs to. Used only when the vxlan device is in
564 external or collect metadata mode. If omitted the value specified at
565 vxlan device creation will be used.
569 the VXLAN VNI Network Identifier (or VXLAN Segment ID)
570 to use to connect to the remote VXLAN tunnel endpoint.
571 If omitted the value specified at vxlan device creation
576 the UDP destination PORT number to use to connect to the
577 remote VXLAN tunnel endpoint.
578 If omitted the default value is used.
582 device name of the outgoing interface for the
583 VXLAN device driver to reach the
584 remote VXLAN tunnel endpoint.
586 .SS bridge fdb append - append a forwarding database entry
587 This command adds a new fdb entry with an already known
589 Valid only for multicast link layer addresses.
590 The command adds support for broadcast and multicast
591 Ethernet MAC addresses.
592 The Ethernet MAC address is added multiple times into
593 the forwarding database and the vxlan device driver
594 sends a copy of the data packet to each entry found.
597 The arguments are the same as with
598 .BR "bridge fdb add" .
600 .SS bridge fdb delete - delete a forwarding database entry
601 This command removes an existing fdb entry.
604 The arguments are the same as with
605 .BR "bridge fdb add" .
607 .SS bridge fdb replace - replace a forwarding database entry
608 If no matching entry is found, a new one will be created instead.
611 The arguments are the same as with
612 .BR "bridge fdb add" .
614 .SS bridge fdb show - list forwarding entries.
616 This command displays the current forwarding table.
621 option, the command becomes verbose. It prints out the last updated
622 and last used time for each entry.
624 .SS bridge fdb get - get bridge forwarding entry.
626 lookup a bridge forwarding table entry.
630 the Ethernet MAC address.
634 the interface to which this address is associated.
638 the bridge port to which this address is associated. same as dev above.
642 the bridge to which this address is associated.
646 - the address is associated with the port drivers fdb. Usually hardware.
650 - the address is associated with master devices fdb. Usually software (default).
653 .SH bridge mdb - multicast group database management
656 objects contain known IP multicast group addresses on a link.
659 The corresponding commands display mdb entries, add new entries,
662 .SS bridge mdb add - add a new multicast group database entry
664 This command creates a new mdb entry.
668 the interface where this group address is associated.
672 the port whose link is known to have members of this multicast group.
676 the IP multicast group address whose members reside on the link connected to
680 - the mdb entry is permanent
684 - the mdb entry is temporary (default)
689 the VLAN ID which is known to have members of this multicast group.
692 .SS bridge mdb delete - delete a multicast group database entry
693 This command removes an existing mdb entry.
696 The arguments are the same as with
697 .BR "bridge mdb add" .
699 .SS bridge mdb show - list multicast group database entries
701 This command displays the current multicast group membership table. The table
702 is populated by IGMP and MLD snooping in the bridge driver automatically. It
707 commands manually too.
711 the interface only whose entries should be listed. Default is to list all
717 option, the command becomes verbose. It prints out the ports known to have
723 option, the command displays timer values for mdb and router port entries.
725 .SH bridge vlan - VLAN filter list
728 objects contain known VLAN IDs for a link.
731 The corresponding commands display vlan filter entries, add new entries,
734 .SS bridge vlan add - add a new vlan filter entry
736 This command creates a new vlan filter entry.
740 the interface with which this vlan is associated.
744 the VLAN ID that identifies the vlan.
747 .BI tunnel_info " TUNNEL_ID"
748 the TUNNEL ID that maps to this vlan. The tunnel id is set in
749 dst_metadata for every packet that belongs to this vlan (applicable to
750 bridge ports with vlan_tunnel flag set).
754 the vlan specified is to be considered a PVID at ingress.
755 Any untagged frames will be assigned to this VLAN.
759 the vlan specified is to be treated as untagged on egress.
763 the vlan is configured on the specified physical device. Required if the
764 device is the bridge device.
768 the vlan is configured on the software bridge (default).
770 .SS bridge vlan delete - delete a vlan filter entry
771 This command removes an existing vlan filter entry.
774 The arguments are the same as with
775 .BR "bridge vlan add".
777 .BR "pvid " and " untagged"
780 .SS bridge vlan show - list vlan configuration.
782 This command displays the current VLAN filter table.
787 option, the command displays per-vlan traffic statistics.
789 .SS bridge vlan tunnelshow - list vlan tunnel mapping.
791 This command displays the current vlan tunnel info mapping.
793 .SH bridge monitor - state monitoring
797 utility can monitor the state of devices and addresses
798 continuously. This option has a slightly different format.
801 command is the first in the command line and then the object list follows:
803 .BR "bridge monitor" " [ " all " |"
807 is the list of object types that we want to monitor.
809 .BR link ", " fdb ", and " mdb "."
814 opens RTNETLINK, listens on it and dumps state changes in the format
815 described in previous sections.
818 If a file name is given, it does not listen on RTNETLINK,
819 but opens the file containing RTNETLINK messages saved in binary format
823 This command uses facilities added in Linux 3.0.
825 Although the forwarding table is maintained on a per-bridge device basis
826 the bridge device is not part of the syntax. This is a limitation of the
827 underlying netlink neighbour message protocol. When displaying the
828 forwarding table, entries for all bridges are displayed.
829 Add/delete/modify commands determine the underlying bridge device
830 based on the bridge to which the corresponding ethernet device is attached.
836 .RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org>
839 Original Manpage by Stephen Hemminger