Section: Linux (8)
Updated: 1 August 2012
Index?action=index Return to Main Contents
bridge - show / manipulate bridge addresses and devices
bridge [ OPTIONS ] OBJECT { COMMAND | help }
OBJECT := { link | fdb | mdb | vlan | monitor }
OPTIONS := { -V[ersion] | -s[tatistics] }
bridge link set dev DEV [ cost COST ] [ priority PRIO ] [ state STATE] [ guard { on | off } ] [ hairpin { on | off } ] [ fastleave { on | off } ] [ root_block { on | off } ] [ learning { on | off } ] [ flood { on | off } ] [ hwmode { vepa | veb } ]
bridge link [ show ] [ dev DEV ]
bridge fdb { add | append | del } LLADDR dev DEV { local | temp } { self } { embedded } { router } [ dst IPADDR ] [ vni VNI ] [ port PORT ] [ via DEVICE ]
bridge fdb [ show ] [ dev DEV ]
bridge mdb { add | del } dev DEV port PORT grp GROUP [ permanent | temp ]
bridge mdb show [ dev DEV ]
bridge vlan { add | del } dev DEV vid VID [ pvid ] [ untagged ] [ self ] [ master ]
bridge vlan [ show ] [ dev DEV ]
bridge monitor [ all | neigh | link | mdb ]
<H3 CLASS="c1|OBJECT
<H3 CLASS="c1|COMMAND
Specifies the action to perform on the object. The set of possible actions depends on the object type. As a rule, it is possible to add, delete and show (or list ) objects, but some objects do not allow all of these operations or have some additional commands. The help command is available for all objects. It prints out a list of available commands and argument syntax conventions.
If no command is given, some default command is assumed. Usually it is list or, if the objects of this class cannot be listed, help.
link objects correspond to the port devices of the bridge.
The corresponding commands set and display port status and bridge specific attributes.
0 - port is DISABLED. Make this port completely inactive.
1 - STP LISTENING state. Only valid if STP is enabled on the brige. In this state the port for list for STP BPDUs and drop all other traffic.
2 - STP LEARNING state. Only valid if STP is enabled on the bridge. In this state the port will accept traffic only for the purpose of updating MAC adress tables.
3 - STP FORWARDING state. Port is fully active.
4 - STP BLOCKING state. Only valid if STP is enabled on the bridge. This state is used during the STP election process. In this state, port will only process STP BPDUs.
:
vepa - Data sent between HW ports is sent on the wire to the external switch.
veb - bridging happens in hardware.
:
This command displays the current bridge port configuration and flags.
fdb objects contain known Ethernet addresses on a link.
The corresponding commands display fdb entries, add new entries, append entries, and delete old ones.
This command creates a new fdb entry.
self - the address is associated with a software fdb (default)
embedded - the address is associated with an offloaded fdb
router - the destination address is associated with a router. Valid if the referenced device is a VXLAN type device and has route shortcircuit enabled.
The next command line parameters apply only when the specified device DEV is of type VXLAN.
:
This command adds a new fdb entry with an already known LLADDR. Valid only for multicast link layer addresses. The command adds support for broadcast and multicast Ethernet MAC addresses. The Ethernet MAC address is added multiple times into the forwarding database and the vxlan device driver sends a copy of the data packet to each entry found.
The arguments are the same as with bridge fdb add,
This command removes an existing fdb entry.
The arguments are the same as with bridge fdb add,
This command displays the current forwarding table.
With the -statistics option, the command becomes verbose. It prints out the last updated and last used time for each entry.
mdb objects contain known IP multicast group addresses on a link.
The corresponding commands display mdb entries, add new entries, and delete old ones.
This command creates a new mdb entry.
permanent - the mdb entry is permanent
temp - the mdb entry is temporary (default)
:
This command removes an existing mdb entry.
The arguments are the same as with bridge mdb add.
This command displays the current multicast group membership table. The table is populated by IGMP and MLD snooping in the bridge driver automatically. It can be altered by bridge mdb add and bridge mdb del commands manually too.
With the -details option, the command becomes verbose. It prints out the ports known to have a connected router.
vlan objects contain known VLAN IDs for a link.
The corresponding commands display vlan filter entries, add new entries, and delete old ones.
This command creates a new vlan filter entry.
This command removes an existing fdb entry.
The arguments are the same as with bridge vlan add. The pvid and untagged flags are ignored.
This command displays the current VLAN filter table.
The bridge utility can monitor the state of devices and addresses continuously. This option has a slightly different format. Namely, the monitor command is the first in the command line and then the object list follows:
bridge monitor [ all | OBJECT-LIST ]
OBJECT-LIST is the list of object types that we want to monitor. It may contain link, fdb, and mdb. If no file argument is given, bridge opens RTNETLINK, listens on it and dumps state changes in the format described in previous sections.
If a file name is given, it does not listen on RTNETLINK, but opens the file containing RTNETLINK messages saved in binary format and dumps them. Such a history file can be generated with the
This command uses facilities added in Linux 3.0.
Although the forwarding table is maintained on a per-bridge device basis the bridge device is not part of the syntax. This is a limitation of the underlying netlink neighbour message protocol. When displaying the forwarding table, entries for all bridges are displayed. Add/delete/modify commands determine the underlying bridge device based on the bridge to which the corresponding ethernet device is attached.
Please direct bugreports and patches to: <netdev@vger.kernel.org>
Original Manpage by Stephen Hemminger
:<A CLASS="c3" HREF="#lbAF|OBJECT]]
:<A CLASS="c3" HREF="#lbAG|COMMAND]]
bridge link set - set bridge specific attributes on a port
bridge link show - list bridge port configuration.
bridge fdb - forwarding database management
bridge fdb add - add a new fdb entry
bridge fdb append - append a forwarding database entry
bridge fdb delete - delete a forwarding database entry
bridge fdb show - list forwarding entries.
bridge mdb - multicast group database management
bridge mdb add - add a new multicast group database entry
bridge mdb delete - delete a multicast group database entry
bridge mdb show - list multicast group database entries
bridge vlan - VLAN filter list
bridge vlan add - add a new vlan filter entry
bridge vlan delete - delete a forwarding database entry
bridge vlan show - list vlan configuration.
bridge monitor - state monitoring
Menu
Tutoriais de Tecnologia Web
Áreas
Blogs
Sites Sociais