1BRCTL(8) BRCTL(8)
2
3
4
6 brctl - ethernet bridge administration
7
9 brctl [command]
10
12 brctl is used to set up, maintain, and inspect the ethernet bridge con‐
13 figuration in the Linux kernel.
14
15 An ethernet bridge is a device commonly used to connect different net‐
16 works of ethernets together, so that these ethernets will appear as one
17 ethernet to the participants.
18
19 Each of the ethernets being connected corresponds to one physical in‐
20 terface in the bridge. These individual ethernets are bundled into one
21 bigger ('logical') ethernet, this bigger ethernet corresponds to the
22 bridge network interface.
23
24
25
27 The command brctl addbr <name> creates a new instance of the ethernet
28 bridge. The network interface corresponding to the bridge will be
29 called <name>.
30
31 The command brctl delbr <name> deletes the instance <name> of the eth‐
32 ernet bridge. The network interface corresponding to the bridge must be
33 down before it can be deleted!
34
35 The command brctl show shows all current instances of the ethernet
36 bridge.
37
38
39
41 Each bridge has a number of ports attached to it. Network traffic com‐
42 ing in on any of these ports will be forwarded to the other ports
43 transparently, so that the bridge is invisible to the rest of the net‐
44 work (i.e. it will not show up in traceroute(8) ).
45
46 The command brctl addif <brname> <ifname> will make the interface <if‐
47 name> a port of the bridge <brname>. This means that all frames re‐
48 ceived on <ifname> will be processed as if destined for the bridge.
49 Also, when sending frames on <brname>, <ifname> will be considered as a
50 potential output interface.
51
52 The command brctl delif <brname> <ifname> will detach the interface
53 <ifname> from the bridge <brname>.
54
55 The command brctl show <brname> will show some information on the
56 bridge and its attached ports.
57
58
59
61 The bridge keeps track of ethernet addresses seen on each port. When it
62 needs to forward a frame, and it happens to know on which port the des‐
63 tination ethernet address (specified in the frame) is located, it can
64 'cheat' by forwarding the frame to that port only, thus saving a lot of
65 redundant copies and transmits.
66
67 However, the ethernet address location data is not static data. Ma‐
68 chines can move to other ports, network cards can be replaced (which
69 changes the machine's ethernet address), etc.
70
71 brctl showmacs <brname> shows a list of learned MAC addresses for this
72 bridge.
73
74 brctl setageing <brname> <time> sets the ethernet (MAC) address ageing
75 time, in seconds. After <time> seconds of not having seen a frame com‐
76 ing from a certain address, the bridge will time out (delete) that ad‐
77 dress from the Forwarding DataBase (fdb).
78
79 brctl setgcint <brname> <time> sets the garbage collection interval for
80 the bridge <brname> to <time> seconds. This means that the bridge will
81 check the forwarding database for timed out entries every <time> sec‐
82 onds.
83
84
85
87 Multiple ethernet bridges can work together to create even larger net‐
88 works of ethernets using the IEEE 802.1d spanning tree protocol. This
89 protocol is used for finding the shortest path between two ethernets,
90 and for eliminating loops from the topology. As this protocol is a
91 standard, Linux bridges will interwork properly with other third party
92 bridge products. Bridges communicate with each other by sending and re‐
93 ceiving BPDUs (Bridge Protocol Data Units). These BPDUs can be recog‐
94 nized by an ethernet destination address of 01:80:c2:00:00:00.
95
96 The spanning tree protocol can also be turned off (for those situations
97 where it just doesn't make sense, for example when this Linux box is
98 the only bridge on the LAN, or when you know that there are no loops in
99 the topology.)
100
101 brctl(8) can be used for configuring certain spanning tree protocol pa‐
102 rameters. For an explanation of these parameters, see the IEEE 802.1d
103 specification (or send me an email). The default values should be just
104 fine. If you don't know what these parameters mean, you probably won't
105 feel the desire to tweak them.
106
107 brctl stp <bridge> <state> controls this bridge instance's participa‐
108 tion in the spanning tree protocol. If <state> is "on" or "yes" the STP
109 will be turned on, otherwise it will be turned off. When turned off,
110 the bridge will not send or receive BPDUs, and will thus not partici‐
111 pate in the spanning tree protocol. If your bridge isn't the only
112 bridge on the LAN, or if there are loops in the LAN's topology, DO NOT
113 turn this option off. If you turn this option off, please know what you
114 are doing.
115
116
117 brctl setbridgeprio <bridge> <priority> sets the bridge's priority to
118 <priority>. The priority value is an unsigned 16-bit quantity (a number
119 between 0 and 65535), and has no dimension. Lower priority values are
120 'better'. The bridge with the lowest priority will be elected 'root
121 bridge'.
122
123 brctl setfd <bridge> <time> sets the bridge's 'bridge forward delay' to
124 <time> seconds.
125
126 brctl sethello <bridge> <time> sets the bridge's 'bridge hello time' to
127 <time> seconds.
128
129 brctl setmaxage <bridge> <time> sets the bridge's 'maximum message age'
130 to <time> seconds.
131
132 brctl setpathcost <bridge> <port> <cost> sets the port cost of the port
133 <port> to <cost>. This is a dimensionless metric.
134
135 brctl setportprio <bridge> <port> <priority> sets the port <port>'s
136 priority to <priority>. The priority value is an unsigned 8-bit quan‐
137 tity (a number between 0 and 255), and has no dimension. This metric is
138 used in the designated port and root port selection algorithms.
139
140
142 brctl(8) is obsolete. Some features such as STP guard, hairpin mode,
143 fast leave and root block are intentionally not implemented in this
144 command. Instead use bridge command from iproute2 package for a more
145 full set of features.
146
147
149 iptables(8)
150
151
153 Lennert Buytenhek <buytenh@gnu.org> Stephen Hemminger <stephen@network‐
154 plumber.org>
155
156
157
158 November 7, 2001 BRCTL(8)