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 }
37 .BR guard " { " on " | " off " } ] [ "
38 .BR hairpin " { " on " | " off " } ] [ "
39 .BR fastleave " { " on " | " off " } ] [ "
40 .BR root_block " { " on " | " off " } ] [ "
41 .BR learning " { " on " | " off " } ] [ "
42 .BR learning_sync " { " on " | " off " } ] [ "
43 .BR flood " { " on " | " off " } ] [ "
44 .BR hwmode " { " vepa " | " veb " } ] [ "
45 .BR self " ] [ " master " ] "
48 .BR "bridge link" " [ " show " ] [ "
53 .BR "bridge fdb" " { " add " | " append " | " del " | " replace " } "
57 .BR local " | " static " | " dynamic " } [ "
58 .BR self " ] [ " master " ] [ " router " ] [ " use " ] [ "
69 .BR "bridge fdb" " [ " show " ] [ "
74 .BR "bridge mdb" " { " add " | " del " } "
81 .BR permanent " | " temp " ] [ "
86 .BR "bridge mdb show " [ "
91 .BR "bridge vlan" " { " add " | " del " } "
96 .BR pvid " ] [ " untagged " ] [ "
97 .BR self " ] [ " master " ] "
100 .BR "bridge vlan" " [ " show " ] [ "
105 .BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]"
110 .BR "\-V" , " -Version"
111 print the version of the
116 .BR "\-s" , " \-stats", " \-statistics"
117 output more information. If this option
118 is given multiple times, the amount of information increases.
119 As a rule, the information is statistics or some time values.
122 .BR "\-d" , " \-details"
123 print detailed information about MDB router ports.
126 .BR "\-n" , " \-net" , " \-netns " <NETNS>
129 to the specified network namespace
131 Actually it just simplifies executing of:
136 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
142 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
146 .BR "\-b", " \-batch " <FILENAME>
147 Read commands from provided file or standard input and invoke them.
148 First failure will cause termination of bridge command.
152 Don't terminate bridge command on errors in batch mode.
153 If there were any errors during execution of the commands, the application
154 return code will be non zero.
156 .SH BRIDGE - COMMAND SYNTAX
167 - Forwarding Database entry.
171 - Multicast group database entry.
180 Specifies the action to perform on the object.
181 The set of possible actions depends on the object type.
182 As a rule, it is possible to
183 .BR "add" , " delete"
188 ) objects, but some objects do not allow all of these operations
189 or have some additional commands. The
191 command is available for all objects. It prints
192 out a list of available commands and argument syntax conventions.
194 If no command is given, some default command is assumed.
197 or, if the objects of this class cannot be listed,
200 .SH bridge link - bridge port
203 objects correspond to the port devices of the bridge.
206 The corresponding commands set and display port status and bridge specific
209 .SS bridge link set - set bridge specific attributes on a port
213 interface name of the bridge port
217 the STP path cost of the specified port.
220 .BI priority " PRIO "
221 the STP port priority. The priority value is an unsigned 8-bit quantity
222 (number between 0 and 255). This metric is used in the designated port an
223 droot port selectio algorithms.
227 the operation state of the port. This is primarily used by user space STP/RSTP
228 implementation. One may enter a lowercased port state name, or one of the
229 numbers below. Negative inputs are ignored, and unrecognized names return an
233 - port is DISABLED. Make this port completely inactive.
237 - STP LISTENING state. Only valid if STP is enabled on the brige. In this
238 state the port for list for STP BPDUs and drop all other traffic.
242 - STP LEARNING state. Only valid if STP is enabled on the bridge. In this
243 state the port will accept traffic only for the purpose of updating MAC
248 - STP FORWARDING state. Port is fully active.
252 - STP BLOCKING state. Only valid if STP is enabled on the bridge. This state
253 is used during the STP election process. In this state, port will only process
258 .BR "guard on " or " guard off "
259 Controls whether STP BPUDs will be processed by the bridge port. By default,
260 the flag is turned off allowed BPDU processing. Turning this flag on will
261 cause the port to stop processing STP BPDUs.
264 .BR "hairpin on " or " hairpin off "
265 Controls whether traffic may be send back out of the port on which it was
266 received. By default, this flag is turned off and the bridge will not forward
267 traffic back out of the receiving port.
270 .BR "fastleave on " or " fastleave off "
271 This flag allows the bridge to immediately stop multicast traffic on a port
272 that receives IGMP Leave message. It is only used with IGMP snooping is
273 enabled on the bridge. By default the flag is off.
276 .BR "root_block on " or " root_block off "
277 Controls whether a given port is allowed to become root port or not. Only used
278 when STP is enabled on the bridge. By default the flag is off.
281 .BR "learning on " or " learning off "
282 Controls whether a given port will learn MAC addresses from received traffic or
283 not. If learning if off, the bridge will end up flooding any traffic for which
284 it has no FDB entry. By default this flag is on.
287 .BR "learning_sync on " or " learning_sync off "
288 Controls whether a given port will sync MAC addresses learned on device port to
292 .BR "flooding on " or " flooding off "
293 Controls whether a given port will flood unicast traffic for which there is no FDB entry. By default this flag is on.
297 Some network interface cards support HW bridge functionality and they may be
298 configured in different modes. Currently support modes are:
301 - Data sent between HW ports is sent on the wire to the external
305 - bridging happens in hardware.
309 link setting is configured on specified physical device
313 link setting is configured on the software bridge (default)
316 .BR "\-t" , " \-timestamp"
317 display current time when using monitor option.
319 .SS bridge link show - list bridge port configuration.
321 This command displays the current bridge port configuration and flags.
323 .SH bridge fdb - forwarding database management
326 objects contain known Ethernet addresses on a link.
329 The corresponding commands display fdb entries, add new entries,
333 .SS bridge fdb add - add a new fdb entry
335 This command creates a new fdb entry.
339 the Ethernet MAC address.
343 the interface to which this address is associated.
346 - is a local permanent fdb entry
350 - is a static (no arp) fdb entry
354 - is a dynamic reachable age-able fdb entry
358 - the address is associated with the port drivers fdb. Usually hardware.
362 - the address is associated with master devices fdb. Usually software (default).
366 - the destination address is associated with a router.
367 Valid if the referenced device is a VXLAN type device and has
368 route shortcircuit enabled.
372 - the address is in use. User space can use this option to
373 indicate to the kernel that the fdb entry is in use.
377 The next command line parameters apply only
378 when the specified device
383 the IP address of the destination
384 VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.
388 the VXLAN VNI Network Identifier (or VXLAN Segment ID)
389 to use to connect to the remote VXLAN tunnel endpoint.
390 If omitted the value specified at vxlan device creation
395 the UDP destination PORT number to use to connect to the
396 remote VXLAN tunnel endpoint.
397 If omitted the default value is used.
401 device name of the outgoing interface for the
402 VXLAN device driver to reach the
403 remote VXLAN tunnel endpoint.
405 .SS bridge fdb append - append a forwarding database entry
406 This command adds a new fdb entry with an already known
408 Valid only for multicast link layer addresses.
409 The command adds support for broadcast and multicast
410 Ethernet MAC addresses.
411 The Ethernet MAC address is added multiple times into
412 the forwarding database and the vxlan device driver
413 sends a copy of the data packet to each entry found.
416 The arguments are the same as with
417 .BR "bridge fdb add" .
419 .SS bridge fdb delete - delete a forwarding database entry
420 This command removes an existing fdb entry.
423 The arguments are the same as with
424 .BR "bridge fdb add" .
426 .SS bridge fdb replace - replace a forwarding database entry
427 If no matching entry is found, a new one will be created instead.
430 The arguments are the same as with
431 .BR "bridge fdb add" .
433 .SS bridge fdb show - list forwarding entries.
435 This command displays the current forwarding table.
440 option, the command becomes verbose. It prints out the last updated
441 and last used time for each entry.
443 .SH bridge mdb - multicast group database management
446 objects contain known IP multicast group addresses on a link.
449 The corresponding commands display mdb entries, add new entries,
452 .SS bridge mdb add - add a new multicast group database entry
454 This command creates a new mdb entry.
458 the interface where this group address is associated.
462 the port whose link is known to have members of this multicast group.
466 the IP multicast group address whose members reside on the link connected to
470 - the mdb entry is permanent
474 - the mdb entry is temporary (default)
479 the VLAN ID which is known to have members of this multicast group.
482 .SS bridge mdb delete - delete a multicast group database entry
483 This command removes an existing mdb entry.
486 The arguments are the same as with
487 .BR "bridge mdb add" .
489 .SS bridge mdb show - list multicast group database entries
491 This command displays the current multicast group membership table. The table
492 is populated by IGMP and MLD snooping in the bridge driver automatically. It
497 commands manually too.
501 the interface only whose entries should be listed. Default is to list all
507 option, the command becomes verbose. It prints out the ports known to have
513 option, the command displays timer values for mdb and router port entries.
515 .SH bridge vlan - VLAN filter list
518 objects contain known VLAN IDs for a link.
521 The corresponding commands display vlan filter entries, add new entries,
524 .SS bridge vlan add - add a new vlan filter entry
526 This command creates a new vlan filter entry.
530 the interface with which this vlan is associated.
534 the VLAN ID that identifies the vlan.
538 the vlan specified is to be considered a PVID at ingress.
539 Any untagged frames will be assigned to this VLAN.
543 the vlan specified is to be treated as untagged on egress.
547 the vlan is configured on the specified physical device. Required if the
548 device is the bridge device.
552 the vlan is configured on the software bridge (default).
554 .SS bridge vlan delete - delete a vlan filter entry
555 This command removes an existing vlan filter entry.
558 The arguments are the same as with
559 .BR "bridge vlan add".
561 .BR "pvid " and " untagged"
564 .SS bridge vlan show - list vlan configuration.
566 This command displays the current VLAN filter table.
568 .SH bridge monitor - state monitoring
572 utility can monitor the state of devices and addresses
573 continuously. This option has a slightly different format.
576 command is the first in the command line and then the object list follows:
578 .BR "bridge monitor" " [ " all " |"
582 is the list of object types that we want to monitor.
584 .BR link ", " fdb ", and " mdb "."
589 opens RTNETLINK, listens on it and dumps state changes in the format
590 described in previous sections.
593 If a file name is given, it does not listen on RTNETLINK,
594 but opens the file containing RTNETLINK messages saved in binary format
598 This command uses facilities added in Linux 3.0.
600 Although the forwarding table is maintained on a per-bridge device basis
601 the bridge device is not part of the syntax. This is a limitation of the
602 underlying netlink neighbour message protocol. When displaying the
603 forwarding table, entries for all bridges are displayed.
604 Add/delete/modify commands determine the underlying bridge device
605 based on the bridge to which the corresponding ethernet device is attached.
611 .RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org>
614 Original Manpage by Stephen Hemminger