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] }
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 neigh_suppress " { " on " | " off " } ] [ "
50 .BR vlan_tunnel " { " on " | " off " } ] [ "
51 .BR isolated " { " on " | " off " } ] [ "
52 .BR self " ] [ " master " ]"
55 .BR "bridge link" " [ " show " ] [ "
60 .BR "bridge fdb" " { " add " | " append " | " del " | " replace " } "
64 .BR local " | " static " | " dynamic " } [ "
65 .BR self " ] [ " master " ] [ " router " ] [ " use " ] [ " extern_learn " ] [ "
76 .BR "bridge fdb" " [ " show " ] [ "
89 .BR "bridge mdb" " { " add " | " del " } "
96 .BR permanent " | " temp " ] [ "
101 .BR "bridge mdb show " [ "
106 .BR "bridge vlan" " { " add " | " del " } "
112 .IR TUNNEL_ID " ] [ "
113 .BR pvid " ] [ " untagged " ] [ "
114 .BR self " ] [ " master " ] "
117 .BR "bridge vlan" " [ " show " | " tunnelshow " ] [ "
122 .BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]"
127 .BR "\-V" , " -Version"
128 print the version of the
133 .BR "\-s" , " \-stats", " \-statistics"
134 output more information. If this option
135 is given multiple times, the amount of information increases.
136 As a rule, the information is statistics or some time values.
139 .BR "\-d" , " \-details"
140 print detailed information about MDB router ports.
143 .BR "\-n" , " \-net" , " \-netns " <NETNS>
146 to the specified network namespace
148 Actually it just simplifies executing of:
153 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
159 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
163 .BR "\-b", " \-batch " <FILENAME>
164 Read commands from provided file or standard input and invoke them.
165 First failure will cause termination of bridge command.
169 Don't terminate bridge command on errors in batch mode.
170 If there were any errors during execution of the commands, the application
171 return code will be non zero.
174 .BR "\-c" , " -color"
179 Output results in JavaScript Object Notation (JSON).
182 .BR "\-p", " \-pretty"
183 When combined with -j generate a pretty JSON output.
186 .SH BRIDGE - COMMAND SYNTAX
197 - Forwarding Database entry.
201 - Multicast group database entry.
210 Specifies the action to perform on the object.
211 The set of possible actions depends on the object type.
212 As a rule, it is possible to
213 .BR "add" , " delete"
218 ) objects, but some objects do not allow all of these operations
219 or have some additional commands. The
221 command is available for all objects. It prints
222 out a list of available commands and argument syntax conventions.
224 If no command is given, some default command is assumed.
227 or, if the objects of this class cannot be listed,
230 .SH bridge link - bridge port
233 objects correspond to the port devices of the bridge.
236 The corresponding commands set and display port status and bridge specific
239 .SS bridge link set - set bridge specific attributes on a port
243 interface name of the bridge port
247 the STP path cost of the specified port.
250 .BI priority " PRIO "
251 the STP port priority. The priority value is an unsigned 8-bit quantity
252 (number between 0 and 255). This metric is used in the designated port an
253 droot port selectio algorithms.
257 the operation state of the port. This is primarily used by user space STP/RSTP
258 implementation. One may enter a lowercased port state name, or one of the
259 numbers below. Negative inputs are ignored, and unrecognized names return an
263 - port is DISABLED. Make this port completely inactive.
267 - STP LISTENING state. Only valid if STP is enabled on the bridge. In this
268 state the port listens for STP BPDUs and drops all other traffic frames.
272 - STP LEARNING state. Only valid if STP is enabled on the bridge. In this
273 state the port will accept traffic only for the purpose of updating MAC
278 - STP FORWARDING state. Port is fully active.
282 - STP BLOCKING state. Only valid if STP is enabled on the bridge. This state
283 is used during the STP election process. In this state, port will only process
288 .BR "guard on " or " guard off "
289 Controls whether STP BPDUs will be processed by the bridge port. By default,
290 the flag is turned off allowed BPDU processing. Turning this flag on will
291 cause the port to stop processing STP BPDUs.
294 .BR "hairpin on " or " hairpin off "
295 Controls whether traffic may be send back out of the port on which it was
296 received. By default, this flag is turned off and the bridge will not forward
297 traffic back out of the receiving port.
300 .BR "fastleave on " or " fastleave off "
301 This flag allows the bridge to immediately stop multicast traffic on a port
302 that receives IGMP Leave message. It is only used with IGMP snooping is
303 enabled on the bridge. By default the flag is off.
306 .BR "root_block on " or " root_block off "
307 Controls whether a given port is allowed to become root port or not. Only used
308 when STP is enabled on the bridge. By default the flag is off.
311 .BR "learning on " or " learning off "
312 Controls whether a given port will learn MAC addresses from received traffic or
313 not. If learning if off, the bridge will end up flooding any traffic for which
314 it has no FDB entry. By default this flag is on.
317 .BR "learning_sync on " or " learning_sync off "
318 Controls whether a given port will sync MAC addresses learned on device port to
322 .BR "flooding on " or " flooding off "
323 Controls whether a given port will flood unicast traffic for which there is no FDB entry. By default this flag is on.
327 Some network interface cards support HW bridge functionality and they may be
328 configured in different modes. Currently support modes are:
331 - Data sent between HW ports is sent on the wire to the external
335 - bridging happens in hardware.
338 .BR "mcast_flood on " or " mcast_flood off "
339 Controls whether a given port will be flooded with multicast traffic for which there is no MDB entry. By default this flag is on.
342 .BR "neigh_suppress on " or " neigh_suppress off "
343 Controls whether neigh discovery (arp and nd) proxy and suppression is enabled on the port. By default this flag is off.
346 .BR "vlan_tunnel on " or " vlan_tunnel off "
347 Controls whether vlan to tunnel mapping is enabled on the port. By default this flag is off.
350 .BR "isolated on " or " isolated off "
351 Controls whether a given port will be isolated, which means it will be able to communicate with non-isolated ports only.
352 By default this flag is off.
356 link setting is configured on specified physical device
360 link setting is configured on the software bridge (default)
363 .BR "\-t" , " \-timestamp"
364 display current time when using monitor option.
366 .SS bridge link show - list bridge port configuration.
368 This command displays the current bridge port configuration and flags.
370 .SH bridge fdb - forwarding database management
373 objects contain known Ethernet addresses on a link.
376 The corresponding commands display fdb entries, add new entries,
380 .SS bridge fdb add - add a new fdb entry
382 This command creates a new fdb entry.
386 the Ethernet MAC address.
390 the interface to which this address is associated.
393 - is a local permanent fdb entry
397 - is a static (no arp) fdb entry
401 - is a dynamic reachable age-able fdb entry
405 - the address is associated with the port drivers fdb. Usually hardware.
409 - the address is associated with master devices fdb. Usually software (default).
413 - the destination address is associated with a router.
414 Valid if the referenced device is a VXLAN type device and has
415 route shortcircuit enabled.
419 - the address is in use. User space can use this option to
420 indicate to the kernel that the fdb entry is in use.
424 - this entry was learned externally. This option can be used to
425 indicate to the kernel that an entry was hardware or user-space
426 controller learnt dynamic entry. Kernel will not age such an entry.
430 The next command line parameters apply only
431 when the specified device
436 the IP address of the destination
437 VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.
441 the VXLAN VNI Network Identifier (or VXLAN Segment ID)
442 to use to connect to the remote VXLAN tunnel endpoint.
443 If omitted the value specified at vxlan device creation
448 the UDP destination PORT number to use to connect to the
449 remote VXLAN tunnel endpoint.
450 If omitted the default value is used.
454 device name of the outgoing interface for the
455 VXLAN device driver to reach the
456 remote VXLAN tunnel endpoint.
458 .SS bridge fdb append - append a forwarding database entry
459 This command adds a new fdb entry with an already known
461 Valid only for multicast link layer addresses.
462 The command adds support for broadcast and multicast
463 Ethernet MAC addresses.
464 The Ethernet MAC address is added multiple times into
465 the forwarding database and the vxlan device driver
466 sends a copy of the data packet to each entry found.
469 The arguments are the same as with
470 .BR "bridge fdb add" .
472 .SS bridge fdb delete - delete a forwarding database entry
473 This command removes an existing fdb entry.
476 The arguments are the same as with
477 .BR "bridge fdb add" .
479 .SS bridge fdb replace - replace a forwarding database entry
480 If no matching entry is found, a new one will be created instead.
483 The arguments are the same as with
484 .BR "bridge fdb add" .
486 .SS bridge fdb show - list forwarding entries.
488 This command displays the current forwarding table.
493 option, the command becomes verbose. It prints out the last updated
494 and last used time for each entry.
496 .SH bridge mdb - multicast group database management
499 objects contain known IP multicast group addresses on a link.
502 The corresponding commands display mdb entries, add new entries,
505 .SS bridge mdb add - add a new multicast group database entry
507 This command creates a new mdb entry.
511 the interface where this group address is associated.
515 the port whose link is known to have members of this multicast group.
519 the IP multicast group address whose members reside on the link connected to
523 - the mdb entry is permanent
527 - the mdb entry is temporary (default)
532 the VLAN ID which is known to have members of this multicast group.
535 .SS bridge mdb delete - delete a multicast group database entry
536 This command removes an existing mdb entry.
539 The arguments are the same as with
540 .BR "bridge mdb add" .
542 .SS bridge mdb show - list multicast group database entries
544 This command displays the current multicast group membership table. The table
545 is populated by IGMP and MLD snooping in the bridge driver automatically. It
550 commands manually too.
554 the interface only whose entries should be listed. Default is to list all
560 option, the command becomes verbose. It prints out the ports known to have
566 option, the command displays timer values for mdb and router port entries.
568 .SH bridge vlan - VLAN filter list
571 objects contain known VLAN IDs for a link.
574 The corresponding commands display vlan filter entries, add new entries,
577 .SS bridge vlan add - add a new vlan filter entry
579 This command creates a new vlan filter entry.
583 the interface with which this vlan is associated.
587 the VLAN ID that identifies the vlan.
590 .BI tunnel_info " TUNNEL_ID"
591 the TUNNEL ID that maps to this vlan. The tunnel id is set in dst_metadata for
592 every packet that belongs to this vlan (applicable to bridge ports with vlan_tunnel
597 the vlan specified is to be considered a PVID at ingress.
598 Any untagged frames will be assigned to this VLAN.
602 the vlan specified is to be treated as untagged on egress.
606 the vlan is configured on the specified physical device. Required if the
607 device is the bridge device.
611 the vlan is configured on the software bridge (default).
613 .SS bridge vlan delete - delete a vlan filter entry
614 This command removes an existing vlan filter entry.
617 The arguments are the same as with
618 .BR "bridge vlan add".
620 .BR "pvid " and " untagged"
623 .SS bridge vlan show - list vlan configuration.
625 This command displays the current VLAN filter table.
630 option, the command displays per-vlan traffic statistics.
632 .SS bridge vlan tunnelshow - list vlan tunnel mapping.
634 This command displays the current vlan tunnel info mapping.
636 .SH bridge monitor - state monitoring
640 utility can monitor the state of devices and addresses
641 continuously. This option has a slightly different format.
644 command is the first in the command line and then the object list follows:
646 .BR "bridge monitor" " [ " all " |"
650 is the list of object types that we want to monitor.
652 .BR link ", " fdb ", and " mdb "."
657 opens RTNETLINK, listens on it and dumps state changes in the format
658 described in previous sections.
661 If a file name is given, it does not listen on RTNETLINK,
662 but opens the file containing RTNETLINK messages saved in binary format
666 This command uses facilities added in Linux 3.0.
668 Although the forwarding table is maintained on a per-bridge device basis
669 the bridge device is not part of the syntax. This is a limitation of the
670 underlying netlink neighbour message protocol. When displaying the
671 forwarding table, entries for all bridges are displayed.
672 Add/delete/modify commands determine the underlying bridge device
673 based on the bridge to which the corresponding ethernet device is attached.
679 .RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org>
682 Original Manpage by Stephen Hemminger