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\-j\fR[\fIson\fR] }
38 .BR guard " { " on " | " off " } ] [ "
39 .BR hairpin " { " on " | " off " } ] [ "
40 .BR fastleave " { " on " | " off " } ] [ "
41 .BR root_block " { " on " | " off " } ] [ "
42 .BR learning " { " on " | " off " } ] [ "
43 .BR learning_sync " { " on " | " off " } ] [ "
44 .BR flood " { " on " | " off " } ] [ "
45 .BR hwmode " { " vepa " | " veb " } ] [ "
46 .BR self " ] [ " master " ] "
49 .BR "bridge link" " [ " show " ] [ "
54 .BR "bridge fdb" " { " add " | " append " | " del " | " replace " } "
58 .BR local " | " static " | " dynamic " } [ "
59 .BR self " ] [ " master " ] [ " router " ] [ " use " ] [ "
70 .BR "bridge fdb" " [ " show " ] [ "
75 .BR "bridge mdb" " { " add " | " del " } "
82 .BR permanent " | " temp " ] [ "
87 .BR "bridge mdb show " [ "
92 .BR "bridge vlan" " { " add " | " del " } "
97 .BR pvid " ] [ " untagged " ] [ "
98 .BR self " ] [ " master " ] "
101 .BR "bridge vlan" " [ " show " ] [ "
106 .BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]"
111 .BR "\-V" , " -Version"
112 print the version of the
117 .BR "\-s" , " \-stats", " \-statistics"
118 output more information. If this option
119 is given multiple times, the amount of information increases.
120 As a rule, the information is statistics or some time values.
123 .BR "\-d" , " \-details"
124 print detailed information about MDB router ports.
127 .BR "\-n" , " \-net" , " \-netns " <NETNS>
130 to the specified network namespace
132 Actually it just simplifies executing of:
137 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
143 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
147 .BR "\-b", " \-batch " <FILENAME>
148 Read commands from provided file or standard input and invoke them.
149 First failure will cause termination of bridge command.
153 Don't terminate bridge command on errors in batch mode.
154 If there were any errors during execution of the commands, the application
155 return code will be non zero.
159 Display results in JSON format. Currently available for vlan and fdb.
161 .SH BRIDGE - COMMAND SYNTAX
172 - Forwarding Database entry.
176 - Multicast group database entry.
185 Specifies the action to perform on the object.
186 The set of possible actions depends on the object type.
187 As a rule, it is possible to
188 .BR "add" , " delete"
193 ) objects, but some objects do not allow all of these operations
194 or have some additional commands. The
196 command is available for all objects. It prints
197 out a list of available commands and argument syntax conventions.
199 If no command is given, some default command is assumed.
202 or, if the objects of this class cannot be listed,
205 .SH bridge link - bridge port
208 objects correspond to the port devices of the bridge.
211 The corresponding commands set and display port status and bridge specific
214 .SS bridge link set - set bridge specific attributes on a port
218 interface name of the bridge port
222 the STP path cost of the specified port.
225 .BI priority " PRIO "
226 the STP port priority. The priority value is an unsigned 8-bit quantity
227 (number between 0 and 255). This metric is used in the designated port an
228 droot port selectio algorithms.
232 the operation state of the port. This is primarily used by user space STP/RSTP
233 implementation. One may enter a lowercased port state name, or one of the
234 numbers below. Negative inputs are ignored, and unrecognized names return an
238 - port is DISABLED. Make this port completely inactive.
242 - STP LISTENING state. Only valid if STP is enabled on the bridge. In this
243 state the port listens for STP BPDUs and drops all other traffic frames.
247 - STP LEARNING state. Only valid if STP is enabled on the bridge. In this
248 state the port will accept traffic only for the purpose of updating MAC
253 - STP FORWARDING state. Port is fully active.
257 - STP BLOCKING state. Only valid if STP is enabled on the bridge. This state
258 is used during the STP election process. In this state, port will only process
263 .BR "guard on " or " guard off "
264 Controls whether STP BPDUs will be processed by the bridge port. By default,
265 the flag is turned off allowed BPDU processing. Turning this flag on will
266 cause the port to stop processing STP BPDUs.
269 .BR "hairpin on " or " hairpin off "
270 Controls whether traffic may be send back out of the port on which it was
271 received. By default, this flag is turned off and the bridge will not forward
272 traffic back out of the receiving port.
275 .BR "fastleave on " or " fastleave off "
276 This flag allows the bridge to immediately stop multicast traffic on a port
277 that receives IGMP Leave message. It is only used with IGMP snooping is
278 enabled on the bridge. By default the flag is off.
281 .BR "root_block on " or " root_block off "
282 Controls whether a given port is allowed to become root port or not. Only used
283 when STP is enabled on the bridge. By default the flag is off.
286 .BR "learning on " or " learning off "
287 Controls whether a given port will learn MAC addresses from received traffic or
288 not. If learning if off, the bridge will end up flooding any traffic for which
289 it has no FDB entry. By default this flag is on.
292 .BR "learning_sync on " or " learning_sync off "
293 Controls whether a given port will sync MAC addresses learned on device port to
297 .BR "flooding on " or " flooding off "
298 Controls whether a given port will flood unicast traffic for which there is no FDB entry. By default this flag is on.
302 Some network interface cards support HW bridge functionality and they may be
303 configured in different modes. Currently support modes are:
306 - Data sent between HW ports is sent on the wire to the external
310 - bridging happens in hardware.
314 link setting is configured on specified physical device
318 link setting is configured on the software bridge (default)
321 .BR "\-t" , " \-timestamp"
322 display current time when using monitor option.
324 .SS bridge link show - list bridge port configuration.
326 This command displays the current bridge port configuration and flags.
328 .SH bridge fdb - forwarding database management
331 objects contain known Ethernet addresses on a link.
334 The corresponding commands display fdb entries, add new entries,
338 .SS bridge fdb add - add a new fdb entry
340 This command creates a new fdb entry.
344 the Ethernet MAC address.
348 the interface to which this address is associated.
351 - is a local permanent fdb entry
355 - is a static (no arp) fdb entry
359 - is a dynamic reachable age-able fdb entry
363 - the address is associated with the port drivers fdb. Usually hardware.
367 - the address is associated with master devices fdb. Usually software (default).
371 - the destination address is associated with a router.
372 Valid if the referenced device is a VXLAN type device and has
373 route shortcircuit enabled.
377 - the address is in use. User space can use this option to
378 indicate to the kernel that the fdb entry is in use.
382 The next command line parameters apply only
383 when the specified device
388 the IP address of the destination
389 VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.
393 the VXLAN VNI Network Identifier (or VXLAN Segment ID)
394 to use to connect to the remote VXLAN tunnel endpoint.
395 If omitted the value specified at vxlan device creation
400 the UDP destination PORT number to use to connect to the
401 remote VXLAN tunnel endpoint.
402 If omitted the default value is used.
406 device name of the outgoing interface for the
407 VXLAN device driver to reach the
408 remote VXLAN tunnel endpoint.
410 .SS bridge fdb append - append a forwarding database entry
411 This command adds a new fdb entry with an already known
413 Valid only for multicast link layer addresses.
414 The command adds support for broadcast and multicast
415 Ethernet MAC addresses.
416 The Ethernet MAC address is added multiple times into
417 the forwarding database and the vxlan device driver
418 sends a copy of the data packet to each entry found.
421 The arguments are the same as with
422 .BR "bridge fdb add" .
424 .SS bridge fdb delete - delete a forwarding database entry
425 This command removes an existing fdb entry.
428 The arguments are the same as with
429 .BR "bridge fdb add" .
431 .SS bridge fdb replace - replace a forwarding database entry
432 If no matching entry is found, a new one will be created instead.
435 The arguments are the same as with
436 .BR "bridge fdb add" .
438 .SS bridge fdb show - list forwarding entries.
440 This command displays the current forwarding table.
445 option, the command becomes verbose. It prints out the last updated
446 and last used time for each entry.
448 .SH bridge mdb - multicast group database management
451 objects contain known IP multicast group addresses on a link.
454 The corresponding commands display mdb entries, add new entries,
457 .SS bridge mdb add - add a new multicast group database entry
459 This command creates a new mdb entry.
463 the interface where this group address is associated.
467 the port whose link is known to have members of this multicast group.
471 the IP multicast group address whose members reside on the link connected to
475 - the mdb entry is permanent
479 - the mdb entry is temporary (default)
484 the VLAN ID which is known to have members of this multicast group.
487 .SS bridge mdb delete - delete a multicast group database entry
488 This command removes an existing mdb entry.
491 The arguments are the same as with
492 .BR "bridge mdb add" .
494 .SS bridge mdb show - list multicast group database entries
496 This command displays the current multicast group membership table. The table
497 is populated by IGMP and MLD snooping in the bridge driver automatically. It
502 commands manually too.
506 the interface only whose entries should be listed. Default is to list all
512 option, the command becomes verbose. It prints out the ports known to have
518 option, the command displays timer values for mdb and router port entries.
520 .SH bridge vlan - VLAN filter list
523 objects contain known VLAN IDs for a link.
526 The corresponding commands display vlan filter entries, add new entries,
529 .SS bridge vlan add - add a new vlan filter entry
531 This command creates a new vlan filter entry.
535 the interface with which this vlan is associated.
539 the VLAN ID that identifies the vlan.
543 the vlan specified is to be considered a PVID at ingress.
544 Any untagged frames will be assigned to this VLAN.
548 the vlan specified is to be treated as untagged on egress.
552 the vlan is configured on the specified physical device. Required if the
553 device is the bridge device.
557 the vlan is configured on the software bridge (default).
559 .SS bridge vlan delete - delete a vlan filter entry
560 This command removes an existing vlan filter entry.
563 The arguments are the same as with
564 .BR "bridge vlan add".
566 .BR "pvid " and " untagged"
569 .SS bridge vlan show - list vlan configuration.
571 This command displays the current VLAN filter table.
576 option, the command displays per-vlan traffic statistics.
578 .SH bridge monitor - state monitoring
582 utility can monitor the state of devices and addresses
583 continuously. This option has a slightly different format.
586 command is the first in the command line and then the object list follows:
588 .BR "bridge monitor" " [ " all " |"
592 is the list of object types that we want to monitor.
594 .BR link ", " fdb ", and " mdb "."
599 opens RTNETLINK, listens on it and dumps state changes in the format
600 described in previous sections.
603 If a file name is given, it does not listen on RTNETLINK,
604 but opens the file containing RTNETLINK messages saved in binary format
608 This command uses facilities added in Linux 3.0.
610 Although the forwarding table is maintained on a per-bridge device basis
611 the bridge device is not part of the syntax. This is a limitation of the
612 underlying netlink neighbour message protocol. When displaying the
613 forwarding table, entries for all bridges are displayed.
614 Add/delete/modify commands determine the underlying bridge device
615 based on the bridge to which the corresponding ethernet device is attached.
621 .RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org>
624 Original Manpage by Stephen Hemminger