1 .\" Copyright 2001 Wasabi Systems, Inc.
2 .\" All rights reserved.
4 .\" Written by Jason R. Thorpe for Wasabi Systems, Inc.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed for the NetBSD Project by
17 .\" Wasabi Systems, Inc.
18 .\" 4. The name of Wasabi Systems, Inc. may not be used to endorse
19 .\" or promote products derived from this software without specific prior
20 .\" written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
26 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 .\" POSSIBILITY OF SUCH DAMAGE.
34 .\" $NetBSD: brconfig.8,v 1.11 2003/04/29 16:39:00 wiz Exp $
35 .\" $DragonFly: src/sbin/brconfig/Attic/brconfig.8,v 1.2 2006/03/21 04:24:28 swildner Exp $
42 .Nd configure network bridge parameters
55 utility is used to configure network bridge parameters and retrieve
56 network bridge parameters and status from the kernel.
57 The bridging function is implemented by the
61 A network bridge creates a logical link between two or more
62 IEEE 802 networks that use the same (or
65 For example, it is possible to bridge Ethernet
66 and 802.11 networks together, but it is not possible to bridge
67 Ethernet and Token Ring together.
69 Bridge interfaces are created using the
74 All other bridge configuration is performed using
77 The options are as follows:
78 .Bl -tag -width indent
80 Display the status of all bridge devices present on the system.
81 This flag is mutually exclusive with all other sub-commands.
84 All other operations require that a bridge be specified.
85 If a bridge is specified with no sub-commands,
86 the status of that bridge is displayed.
87 The following sub-commands are available:
89 .Bl -tag -width indent
91 Start forwarding packets on the bridge.
93 Stop forwarding packets on the bridge.
94 .It Cm add Ar interface
95 Add the interface named by
97 as a member of the bridge.
98 The interface is put into promiscuous mode
99 so that it can receive every packet sent on the network.
100 .It Cm delete Ar interface
101 Remove the interface named by
104 Promiscuous mode is disabled on the interface when
105 it is removed from the bridge.
106 .It Cm maxaddr Ar size
107 Set the size of the bridge address cache to
109 The default is 100 entries.
110 .It Cm timeout Ar seconds
111 Set the timeout of address cache entries to
116 is zero, then address cache entries will not be expired.
117 The default is 240 seconds.
118 .It Cm deladdr Ar address
121 from the address cache.
123 Delete all dynamically-learned addresses from the address cache.
125 Delete all addresses, including static addresses, from the address cache.
126 .It Cm discover Ar interface
127 Mark an interface as a
130 When the bridge has no address cache entry
131 (either dynamic or static)
132 for the destination address of a packet,
133 the bridge will forward the packet to all
134 member interfaces marked as
136 This is the default for all interfaces added to a bridge.
137 .It Cm -discover Ar interface
140 attribute on a member interface.
141 For packets without the
143 attribute, the only packets forwarded on the interface are broadcast
144 or multicast packets and packets for which the destination address
145 is known to be on the interface's segment.
146 .It Cm learn Ar interface
147 Mark an interface as a
150 When a packet arrives on such an interface, the source
151 address of the packet is entered into the address cache as being a
152 destination address on the interface's segment.
153 This is the default for all interfaces added to a bridge.
154 .It Cm -learn Ar interface
157 attribute on a member interface.
158 .It Cm stp Ar interface
159 Enable Spanning Tree protocol on
163 driver has support for the IEEE 802.1D Spanning Tree protocol (STP).
164 Spanning Tree is used to detect and remove loops in a network topology.
165 .It Cm -stp Ar interface
166 Disable Spanning Tree protocol on
168 This is the default for all interfaces added to a bridge.
169 .It Cm maxage Ar seconds
170 Set the time that a Spanning Tree protocol configuration is valid.
171 The default is 20 seconds.
172 The minimum is 1 second and the maximum is 255 seconds.
173 .It Cm fwddelay Ar seconds
174 Set the time that must pass before an interface begins forwarding
175 packets when Spanning Tree is enabled.
176 The default is 15 seconds.
177 The minimum is 1 second and the maximum is 255 seconds.
178 .It Cm hellotime Ar seconds
179 Set the time between broadcasting of Spanning Tree protocol
180 configuration messages.
181 The default is 2 seconds.
182 The minimum is 1 second and the maximum is 255 seconds.
183 .It Cm priority Ar value
184 Set the bridge priority for Spanning Tree.
185 The default is 32768.
186 The minimum is 0 and the maximum is 65536.
187 .It Cm ifpriority Ar interface Ar value
188 Set the Spanning Tree priority of
193 The minimum is 0 and the maximum is 255.
194 .It Cm ifpathcost Ar interface Ar value
195 Set the Spanning Tree path cost of
200 The minimum is 0 and the maximum is 65535.
203 The following then placed in the file
204 .Pa /etc/ifconfig.bridge0
205 will cause the a bridge called
207 to be created, and will add the interfaces
211 to the bridge, and then enable packet forwarding.
212 Such a configuration could be used to implement a simple
213 802.11-to-Ethernet bridge (assuming the 802.11 interface is
215 .Bd -literal -offset indent
217 !brconfig $int add ray0 add fxp0 up
220 Consider a system with two 4-port Ethernet boards.
221 The following placed in the file
222 .Pa /etc/ifconfig.bridge0
223 will cause a bridge consisting of all 8 ports with Spanning Tree
224 enabled to be created:
225 .Bd -literal -offset indent
245 utility first appeared in
252 utility were originally written by
254 .Aq jason@thought.net
255 as part of an undergraduate independent study at the
256 University of North Carolina at Greensboro.
260 utility was written from scratch by
262 .Aq thorpej@wasabisystems.com .