1 .\" Copyright 2001 Wasabi Systems, Inc.
2 .\" All rights reserved.
4 .\" Written by Jason R. Thorpe for Wasabi Systems, Inc.
5 .\" Spanning tree modifications by Matthew Dillon
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
15 .\" 3. All advertising materials mentioning features or use of this software
16 .\" must display the following acknowledgement:
17 .\" This product includes software developed for the NetBSD Project by
18 .\" Wasabi Systems, Inc.
19 .\" 4. The name of Wasabi Systems, Inc. may not be used to endorse
20 .\" or promote products derived from this software without specific prior
21 .\" written permission.
23 .\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
24 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
27 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 .\" POSSIBILITY OF SUCH DAMAGE.
41 .Nd network bridge device
43 .Cd "pseudo-device bridge"
47 driver creates a logical link between two or more IEEE 802 networks
51 For example, it is possible to bridge Ethernet and 802.11 networks together,
52 but it is not possible to bridge Ethernet and Token Ring together.
56 the administrator must first create the interface and configure
57 the bridge parameters.
58 The bridge is created using the
64 manual page for further information on configuring bridges.
66 A bridge can be used to provide several services, such as a simple
67 802.11-to-Ethernet bridge for wireless hosts, and traffic isolation.
69 A bridge works like a hub, forwarding traffic from one interface
71 Multicast and broadcast packets are always forwarded to all
72 interfaces that are part of the bridge.
73 For unicast traffic, the bridge learns which MAC addresses are associated
74 with which interfaces and will forward the traffic selectively.
76 The bridge operates in a safe mode by default, setting the MAC source in
77 the link header on outgoing packets to the outgoing interface MAC.
78 This reduces the chance that the layer-2 switching in your switches
81 The bridge supports various special features via
84 .Bl -tag -width indent
86 The link0 option enables transparent bridging mode.
87 The bridge will make every effort to retain the ethernet header
88 when forwarding packets between interfaces, making the bridging
89 function work more like a hardware bridge device.
91 The link1 option enables keepalive transmission and automatically
92 places a member into a special blocked mode if no keepalive reception
94 If either sides of the link uses this option then both sides must use
96 This option is impemented by sending CFG updates on the hello interval
98 The link is considered lost after 10 intervals (typically 20 seconds).
100 The link2 option enables channel bonding (see also ifbondweight).
101 All member interfaces with the same mac address are considered to
102 be in a bonding group.
105 is used, you can manually control or copy the mac to create bonding groups.
106 When interface bonding is enabled normally blocked interfaces belonging
107 to the same bonding group as an active forwarding interface will be
108 changed to the bonding state.
109 Both sides of link the member represents must operate in bonding mode
110 for this to work, otherwise the remote end may decide to throw away
114 If your network becomes glitchy, with long pauses in tcp sessions, then
115 transparent bridging mode is likely the cause. This mode should only be
116 used when you are bridging networks with devices that do MAC-based security
117 or firewalling (for example, the supremely braindead at&t uverse router),
118 or which impose severe limitations on MAC:IP assignments.
120 If member interfaces constantly enter a 'blocked (link1)' state then the
121 other end of those interfaces is not implementing the link1 keepalive.
122 Both sides must implement the keepalive.
124 If you get an enormous amount of packet loss and are using link2-based
125 bonding, then the other side of those member interfaces are probably
126 not implementing link2-based bonding.
130 driver implements the IEEE 802.1D Spanning Tree protocol (STP).
131 Spanning Tree is used to detect and remove loops in a network topology.
133 Packet filtering can be used with any firewall package that hooks in via the
136 When filtering is enabled, bridged packets will pass through the filter
137 inbound on the originating interface, on the bridge interface and outbound on
138 the appropriate interfaces.
139 Either stage can be disabled, this behaviour can be controlled using
142 .Va net.link.bridge.pfil_member
145 to enable filtering on the incoming and outgoing member interfaces
147 .Va net.link.bridge.pfil_bridge
150 to enable filtering on the bridge interface.
152 ARP and REVARP packets are forwarded without being filtered and others
153 that are not IP nor IPv6 packets are not forwarded when filtering is
156 Note that packets to and from the bridging host will be seen by the
157 filter on the interface with the appropriate address configured as well
158 as on the interface on which the packet arrives or departs.
160 The MTU of the first member interface to be added is used as the bridge MTU,
161 all additional members are required to have exactly the same value.
164 implements two additional features to make spanning tree operation more
169 on the bridge interface places the bridge in transparent bridging mode.
170 The bridge will make every attempt to retain the original source MAC in
171 the ethernet link header.
175 on the bridge interface forces the bridge to generate a 802.11d CFG
176 message on every hello interval for all interfaces participating
178 Normally CFG messages are only generated by the root bridge interface
179 or during topology changes.
180 In addition the bridge code expects to receive 802.11d frames from
181 all interface participating in the STP protocol.
183 An interface which fails to receive a 802.11d frame within 10 times
184 the hello interval (usually 20 seconds) automatically goes into
185 l1blocking mode, which can be observed in the ifconfig output for
186 the bridge. This removes the interface from consideration and the
187 bridge code automatically routes around it.
195 boxes allows you to maintain multiple parallel vpns between those
196 boxes via different networks (if you happen to be on more than one
197 with internet access).
198 Use separate openvpn instances and tap devices for each vpn link
199 to accomplish this, placing them in the same bridge interface on
201 The tap devices do not need any IP configuration when bridged and
202 can be assigned the same ether MAC (in fact they have to be
203 if you want the failover to work nicely).
210 driver first appeared in
212 and found its way into
214 Transparent bridging (link0) was added in
221 driver was originally written by
223 .Aq jason@thought.net
224 as part of an undergraduate independent study at the University of
225 North Carolina at Greensboro.
229 driver has been heavily modified from the original version by
231 .Aq thorpej@wasabisystems.com .
235 driver currently supports only Ethernet and Ethernet-like (e.g. 802.11)
236 network devices, with exactly the same interface MTU size as the bridge device.