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] }
40 .BR guard " { " on " | " off " } ] [ "
41 .BR hairpin " { " on " | " off " } ] [ "
42 .BR fastleave " { " on " | " off " } ] [ "
43 .BR root_block " { " on " | " off " } ] [ "
44 .BR learning " { " on " | " off " } ] [ "
45 .BR learning_sync " { " on " | " off " } ] [ "
46 .BR flood " { " on " | " off " } ] [ "
47 .BR hwmode " { " vepa " | " veb " } ] [ "
48 .BR mcast_flood " { " on " | " off " } ] [ "
49 .BR mcast_to_unicast " { " on " | " off " } ] [ "
50 .BR neigh_suppress " { " on " | " off " } ] [ "
51 .BR vlan_tunnel " { " on " | " off " } ] [ "
52 .BR isolated " { " on " | " off " } ] [ "
55 .BR nobackup_port " ] [ "
56 .BR self " ] [ " master " ]"
59 .BR "bridge link" " [ " show " ] [ "
64 .BR "bridge fdb" " { " add " | " append " | " del " | " replace " } "
68 .BR local " | " static " | " dynamic " } [ "
69 .BR self " ] [ " master " ] [ " router " ] [ " use " ] [ " extern_learn " ] [ " sticky " ] [ "
84 .BR "bridge fdb" " [ [ " show " ] [ "
97 .BR "bridge fdb get" " ["
109 .BR self " ] [ " master " ] [ " dynamic " ]"
112 .BR "bridge mdb" " { " add " | " del " } "
119 .BR permanent " | " temp " ] [ "
124 .BR "bridge mdb show " [ "
129 .BR "bridge vlan" " { " add " | " del " } "
135 .IR TUNNEL_ID " ] [ "
136 .BR pvid " ] [ " untagged " ] [ "
137 .BR self " ] [ " master " ] "
140 .BR "bridge vlan" " [ " show " | " tunnelshow " ] [ "
145 .BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]"
150 .BR "\-V" , " -Version"
151 print the version of the
156 .BR "\-s" , " \-stats", " \-statistics"
157 output more information. If this option
158 is given multiple times, the amount of information increases.
159 As a rule, the information is statistics or some time values.
162 .BR "\-d" , " \-details"
163 print detailed information about MDB router ports.
166 .BR "\-n" , " \-net" , " \-netns " <NETNS>
169 to the specified network namespace
171 Actually it just simplifies executing of:
176 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
182 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
186 .BR "\-b", " \-batch " <FILENAME>
187 Read commands from provided file or standard input and invoke them.
188 First failure will cause termination of bridge command.
192 Don't terminate bridge command on errors in batch mode.
193 If there were any errors during execution of the commands, the application
194 return code will be non zero.
197 .BR \-c [ color ][ = { always | auto | never }
198 Configure color output. If parameter is omitted or
200 color output is enabled regardless of stdout state. If parameter is
202 stdout is checked to be a terminal before enabling color output. If parameter is
204 color output is disabled. If specified multiple times, the last one takes
205 precedence. This flag is ignored if
211 Output results in JavaScript Object Notation (JSON).
214 .BR "\-p", " \-pretty"
215 When combined with -j generate a pretty JSON output.
218 .BR "\-o", " \-oneline"
219 output each record on a single line, replacing line feeds
222 character. This is convenient when you want to count records
230 .SH BRIDGE - COMMAND SYNTAX
241 - Forwarding Database entry.
245 - Multicast group database entry.
254 Specifies the action to perform on the object.
255 The set of possible actions depends on the object type.
256 As a rule, it is possible to
257 .BR "add" , " delete"
262 ) objects, but some objects do not allow all of these operations
263 or have some additional commands. The
265 command is available for all objects. It prints
266 out a list of available commands and argument syntax conventions.
268 If no command is given, some default command is assumed.
271 or, if the objects of this class cannot be listed,
274 .SH bridge link - bridge port
277 objects correspond to the port devices of the bridge.
280 The corresponding commands set and display port status and bridge specific
283 .SS bridge link set - set bridge specific attributes on a port
287 interface name of the bridge port
291 the STP path cost of the specified port.
294 .BI priority " PRIO "
295 the STP port priority. The priority value is an unsigned 8-bit quantity
296 (number between 0 and 255). This metric is used in the designated port an
297 droot port selection algorithms.
301 the operation state of the port. Except state 0 (disable STP or BPDU filter feature),
302 this is primarily used by user space STP/RSTP
303 implementation. One may enter port state name (case insensitive), or one of the
304 numbers below. Negative inputs are ignored, and unrecognized names return an
310 state. Make this port completely inactive for STP. This is also called
311 BPDU filter and could be used to disable STP on an untrusted port, like
312 a leaf virtual devices.
318 state. Only valid if STP is enabled on the bridge. In this
319 state the port listens for STP BPDUs and drops all other traffic frames.
325 state. Only valid if STP is enabled on the bridge. In this
326 state the port will accept traffic only for the purpose of updating MAC
333 state. Port is fully active.
339 state. Only valid if STP is enabled on the bridge. This state
340 is used during the STP election process. In this state, port will only process
345 .BR "guard on " or " guard off "
346 Controls whether STP BPDUs will be processed by the bridge port. By default,
347 the flag is turned off allowed BPDU processing. Turning this flag on will
349 the bridge port if a STP BPDU packet is received.
351 If running Spanning Tree on bridge, hostile devices on the network
352 may send BPDU on a port and cause network failure. Setting
354 will detect and stop this by disabling the port.
355 The port will be restarted if link is brought down, or
356 removed and reattached. For example if guard is enable on
359 .B ip link set dev eth0 down; ip link set dev eth0 up
362 .BR "hairpin on " or " hairpin off "
363 Controls whether traffic may be send back out of the port on which it was
364 received. This option is also called reflective relay mode, and is used to support
365 basic VEPA (Virtual Ethernet Port Aggregator) capabilities.
366 By default, this flag is turned off and the bridge will not forward
367 traffic back out of the receiving port.
370 .BR "fastleave on " or " fastleave off "
371 This flag allows the bridge to immediately stop multicast traffic on a port
372 that receives IGMP Leave message. It is only used with IGMP snooping is
373 enabled on the bridge. By default the flag is off.
376 .BR "root_block on " or " root_block off "
377 Controls whether a given port is allowed to become root port or not. Only used
378 when STP is enabled on the bridge. By default the flag is off.
380 This feature is also called root port guard.
381 If BPDU is received from a leaf (edge) port, it should not
382 be elected as root port. This could be used if using STP on a bridge and the downstream bridges are not fully
383 trusted; this prevents a hostile guest from rerouting traffic.
386 .BR "learning on " or " learning off "
387 Controls whether a given port will learn MAC addresses from received traffic or
388 not. If learning if off, the bridge will end up flooding any traffic for which
389 it has no FDB entry. By default this flag is on.
392 .BR "learning_sync on " or " learning_sync off "
393 Controls whether a given port will sync MAC addresses learned on device port to
397 .BR "flood on " or " flood off "
398 Controls whether a given port will flood unicast traffic for which there is no FDB entry. By default this flag is on.
402 Some network interface cards support HW bridge functionality and they may be
403 configured in different modes. Currently support modes are:
406 - Data sent between HW ports is sent on the wire to the external
410 - bridging happens in hardware.
413 .BR "mcast_flood on " or " mcast_flood off "
414 Controls whether a given port will flood multicast traffic for which
415 there is no MDB entry. By default this flag is on.
418 .BR "mcast_to_unicast on " or " mcast_to_unicast off "
419 Controls whether a given port will replicate packets using unicast
420 instead of multicast. By default this flag is off.
422 This is done by copying the packet per host and
423 changing the multicast destination MAC to a unicast one accordingly.
426 works on top of the multicast snooping feature of
427 the bridge. Which means unicast copies are only delivered to hosts which
428 are interested in it and signalized this via IGMP/MLD reports
431 This feature is intended for interface types which have a more reliable
432 and/or efficient way to deliver unicast packets than broadcast ones
435 However, it should only be enabled on interfaces where no IGMPv2/MLDv1
436 report suppression takes place. IGMP/MLD report suppression issue is usually
437 overcome by the network daemon (supplicant) enabling AP isolation and
438 by that separating all STAs.
440 Delivery of STA-to-STA IP multicast is made possible again by
441 enabling and utilizing the bridge hairpin mode, which considers the
442 incoming port as a potential outgoing port, too (see
445 Hairpin mode is performed after multicast snooping, therefore leading to
446 only deliver reports to STAs running a multicast router.
449 .BR "neigh_suppress on " or " neigh_suppress off "
450 Controls whether neigh discovery (arp and nd) proxy and suppression is
451 enabled on the port. By default this flag is off.
454 .BR "vlan_tunnel on " or " vlan_tunnel off "
455 Controls whether vlan to tunnel mapping is enabled on the port. By
456 default this flag is off.
459 .BR "isolated on " or " isolated off "
460 Controls whether a given port will be isolated, which means it will be
461 able to communicate with non-isolated ports only. By default this
465 .BI backup_port " DEVICE"
466 If the port loses carrier all traffic will be redirected to the
467 configured backup port
471 Removes the currently configured backup port
475 link setting is configured on specified physical device
479 link setting is configured on the software bridge (default)
482 .BR "\-t" , " \-timestamp"
483 display current time when using monitor option.
485 .SS bridge link show - list ports configuration for all bridges.
487 This command displays port configuration and flags for all bridges.
489 To display port configuration and flags for a specific bridge, use the
490 "ip link show master <bridge_device>" command.
492 .SH bridge fdb - forwarding database management
495 objects contain known Ethernet addresses on a link.
498 The corresponding commands display fdb entries, add new entries,
502 .SS bridge fdb add - add a new fdb entry
504 This command creates a new fdb entry.
508 the Ethernet MAC address.
512 the interface to which this address is associated.
515 - is a local permanent fdb entry
519 - is a static (no arp) fdb entry
523 - is a dynamic reachable age-able fdb entry
527 - the address is associated with the port drivers fdb. Usually hardware.
531 - the address is associated with master devices fdb. Usually software (default).
535 - the destination address is associated with a router.
536 Valid if the referenced device is a VXLAN type device and has
537 route short circuit enabled.
541 - the address is in use. User space can use this option to
542 indicate to the kernel that the fdb entry is in use.
546 - this entry was learned externally. This option can be used to
547 indicate to the kernel that an entry was hardware or user-space
548 controller learnt dynamic entry. Kernel will not age such an entry.
552 - this entry will not change its port due to learning.
556 The next command line parameters apply only
557 when the specified device
562 the IP address of the destination
563 VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.
567 the src VNI Network Identifier (or VXLAN Segment ID)
568 this entry belongs to. Used only when the vxlan device is in
569 external or collect metadata mode. If omitted the value specified at
570 vxlan device creation will be used.
574 the VXLAN VNI Network Identifier (or VXLAN Segment ID)
575 to use to connect to the remote VXLAN tunnel endpoint.
576 If omitted the value specified at vxlan device creation
581 the UDP destination PORT number to use to connect to the
582 remote VXLAN tunnel endpoint.
583 If omitted the default value is used.
587 device name of the outgoing interface for the
588 VXLAN device driver to reach the
589 remote VXLAN tunnel endpoint.
593 ecmp nexthop group for the VXLAN device driver
594 to reach remote VXLAN tunnel endpoints.
596 .SS bridge fdb append - append a forwarding database entry
597 This command adds a new fdb entry with an already known
599 Valid only for multicast link layer addresses.
600 The command adds support for broadcast and multicast
601 Ethernet MAC addresses.
602 The Ethernet MAC address is added multiple times into
603 the forwarding database and the vxlan device driver
604 sends a copy of the data packet to each entry found.
607 The arguments are the same as with
608 .BR "bridge fdb add" .
610 .SS bridge fdb delete - delete a forwarding database entry
611 This command removes an existing fdb entry.
614 The arguments are the same as with
615 .BR "bridge fdb add" .
617 .SS bridge fdb replace - replace a forwarding database entry
618 If no matching entry is found, a new one will be created instead.
621 The arguments are the same as with
622 .BR "bridge fdb add" .
624 .SS bridge fdb show - list forwarding entries.
626 This command displays the current forwarding table.
631 option, the command becomes verbose. It prints out the last updated
632 and last used time for each entry.
634 .SS bridge fdb get - get bridge forwarding entry.
636 lookup a bridge forwarding table entry.
640 the Ethernet MAC address.
644 the interface to which this address is associated.
648 the bridge port to which this address is associated. same as dev above.
652 the bridge to which this address is associated.
656 - the address is associated with the port drivers fdb. Usually hardware.
660 - the address is associated with master devices fdb. Usually software (default).
663 .SH bridge mdb - multicast group database management
666 objects contain known IP multicast group addresses on a link.
669 The corresponding commands display mdb entries, add new entries,
672 .SS bridge mdb add - add a new multicast group database entry
674 This command creates a new mdb entry.
678 the interface where this group address is associated.
682 the port whose link is known to have members of this multicast group.
686 the IP multicast group address whose members reside on the link connected to
690 - the mdb entry is permanent
694 - the mdb entry is temporary (default)
699 the VLAN ID which is known to have members of this multicast group.
702 .SS bridge mdb delete - delete a multicast group database entry
703 This command removes an existing mdb entry.
706 The arguments are the same as with
707 .BR "bridge mdb add" .
709 .SS bridge mdb show - list multicast group database entries
711 This command displays the current multicast group membership table. The table
712 is populated by IGMP and MLD snooping in the bridge driver automatically. It
717 commands manually too.
721 the interface only whose entries should be listed. Default is to list all
727 option, the command becomes verbose. It prints out the ports known to have
733 option, the command displays timer values for mdb and router port entries.
735 .SH bridge vlan - VLAN filter list
738 objects contain known VLAN IDs for a link.
741 The corresponding commands display vlan filter entries, add new entries,
744 .SS bridge vlan add - add a new vlan filter entry
746 This command creates a new vlan filter entry.
750 the interface with which this vlan is associated.
754 the VLAN ID that identifies the vlan.
757 .BI tunnel_info " TUNNEL_ID"
758 the TUNNEL ID that maps to this vlan. The tunnel id is set in
759 dst_metadata for every packet that belongs to this vlan (applicable to
760 bridge ports with vlan_tunnel flag set).
764 the vlan specified is to be considered a PVID at ingress.
765 Any untagged frames will be assigned to this VLAN.
769 the vlan specified is to be treated as untagged on egress.
773 the vlan is configured on the specified physical device. Required if the
774 device is the bridge device.
778 the vlan is configured on the software bridge (default).
780 .SS bridge vlan delete - delete a vlan filter entry
781 This command removes an existing vlan filter entry.
784 The arguments are the same as with
785 .BR "bridge vlan add".
787 .BR "pvid " and " untagged"
790 .SS bridge vlan show - list vlan configuration.
792 This command displays the current VLAN filter table.
797 option, the command displays per-vlan traffic statistics.
799 .SS bridge vlan tunnelshow - list vlan tunnel mapping.
801 This command displays the current vlan tunnel info mapping.
803 .SH bridge monitor - state monitoring
807 utility can monitor the state of devices and addresses
808 continuously. This option has a slightly different format.
811 command is the first in the command line and then the object list follows:
813 .BR "bridge monitor" " [ " all " |"
817 is the list of object types that we want to monitor.
819 .BR link ", " fdb ", and " mdb "."
824 opens RTNETLINK, listens on it and dumps state changes in the format
825 described in previous sections.
828 If a file name is given, it does not listen on RTNETLINK,
829 but opens the file containing RTNETLINK messages saved in binary format
833 This command uses facilities added in Linux 3.0.
835 Although the forwarding table is maintained on a per-bridge device basis
836 the bridge device is not part of the syntax. This is a limitation of the
837 underlying netlink neighbour message protocol. When displaying the
838 forwarding table, entries for all bridges are displayed.
839 Add/delete/modify commands determine the underlying bridge device
840 based on the bridge to which the corresponding ethernet device is attached.
846 .RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org>
849 Original Manpage by Stephen Hemminger