1*db37145fSSimon Schubert.\" Copyright 2001 Wasabi Systems, Inc. 2*db37145fSSimon Schubert.\" All rights reserved. 3*db37145fSSimon Schubert.\" 4*db37145fSSimon Schubert.\" Written by Jason R. Thorpe for Wasabi Systems, Inc. 5*db37145fSSimon Schubert.\" 6*db37145fSSimon Schubert.\" Redistribution and use in source and binary forms, with or without 7*db37145fSSimon Schubert.\" modification, are permitted provided that the following conditions 8*db37145fSSimon Schubert.\" are met: 9*db37145fSSimon Schubert.\" 1. Redistributions of source code must retain the above copyright 10*db37145fSSimon Schubert.\" notice, this list of conditions and the following disclaimer. 11*db37145fSSimon Schubert.\" 2. Redistributions in binary form must reproduce the above copyright 12*db37145fSSimon Schubert.\" notice, this list of conditions and the following disclaimer in the 13*db37145fSSimon Schubert.\" documentation and/or other materials provided with the distribution. 14*db37145fSSimon Schubert.\" 3. All advertising materials mentioning features or use of this software 15*db37145fSSimon Schubert.\" must display the following acknowledgement: 16*db37145fSSimon Schubert.\" This product includes software developed for the NetBSD Project by 17*db37145fSSimon Schubert.\" Wasabi Systems, Inc. 18*db37145fSSimon Schubert.\" 4. The name of Wasabi Systems, Inc. may not be used to endorse 19*db37145fSSimon Schubert.\" or promote products derived from this software without specific prior 20*db37145fSSimon Schubert.\" written permission. 21*db37145fSSimon Schubert.\" 22*db37145fSSimon Schubert.\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 23*db37145fSSimon Schubert.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 24*db37145fSSimon Schubert.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 25*db37145fSSimon Schubert.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 26*db37145fSSimon Schubert.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27*db37145fSSimon Schubert.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28*db37145fSSimon Schubert.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29*db37145fSSimon Schubert.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30*db37145fSSimon Schubert.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31*db37145fSSimon Schubert.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32*db37145fSSimon Schubert.\" POSSIBILITY OF SUCH DAMAGE. 33*db37145fSSimon Schubert.\" 34*db37145fSSimon Schubert.\" $NetBSD: bridge.4,v 1.7 2005/06/23 12:47:38 peter Exp $ 35*db37145fSSimon Schubert.\" $DragonFly: src/share/man/man4/bridge.4,v 1.6 2005/12/21 16:37:15 corecode Exp $ 36*db37145fSSimon Schubert.\" 37*db37145fSSimon Schubert.Dd January 4, 2004 38*db37145fSSimon Schubert.Dt BRIDGE 4 39*db37145fSSimon Schubert.Os 40*db37145fSSimon Schubert.Sh NAME 41*db37145fSSimon Schubert.Nm bridge 42*db37145fSSimon Schubert.Nd network bridge device 43*db37145fSSimon Schubert.Sh SYNOPSIS 44*db37145fSSimon Schubert.Cd "pseudo-device bridge" 45*db37145fSSimon Schubert.Sh DESCRIPTION 46*db37145fSSimon SchubertThe 47*db37145fSSimon Schubert.Nm 48*db37145fSSimon Schubertdriver creates a logical link between two or more IEEE 802 networks 49*db37145fSSimon Schubertthat use the same (or 50*db37145fSSimon Schubert.Dq similar enough ) 51*db37145fSSimon Schubertframing format. 52*db37145fSSimon SchubertFor example, it is possible to bridge Ethernet and 802.11 networks together, 53*db37145fSSimon Schubertbut it is not possible to bridge Ethernet and Token Ring together. 54*db37145fSSimon Schubert.Pp 55*db37145fSSimon SchubertTo use 56*db37145fSSimon Schubert.Nm bridge , 57*db37145fSSimon Schubertthe administrator must first create the interface and configure 58*db37145fSSimon Schubertthe bridge parameters. 59*db37145fSSimon SchubertThe bridge is created using the 60*db37145fSSimon Schubert.Xr ifconfig 8 61*db37145fSSimon Schubert.Cm create 62*db37145fSSimon Schubertsubcommand. 63*db37145fSSimon SchubertThe learning and forwarding behavior and other parameters of a 64*db37145fSSimon Schubertbridge are configured by the 65*db37145fSSimon Schubert.Xr brconfig 8 66*db37145fSSimon Schubertutility. 67*db37145fSSimon Schubert.Pp 68*db37145fSSimon SchubertA bridge can be used to provide several services, such as a simple 69*db37145fSSimon Schubert802.11-to-Ethernet bridge for wireless hosts, and traffic isolation. 70*db37145fSSimon Schubert.Pp 71*db37145fSSimon SchubertA bridge works like a hub, forwarding traffic from one interface 72*db37145fSSimon Schubertto another. 73*db37145fSSimon SchubertMulticast and broadcast packets are always forwarded to all 74*db37145fSSimon Schubertinterfaces that are part of the bridge. 75*db37145fSSimon SchubertFor unicast traffic, the bridge learns which MAC addresses are associated 76*db37145fSSimon Schubertwith which interfaces and will forward the traffic selectively. 77*db37145fSSimon Schubert.Pp 78*db37145fSSimon SchubertThe 79*db37145fSSimon Schubert.Nm 80*db37145fSSimon Schubertdriver implements the IEEE 802.1D Spanning Tree protocol (STP). 81*db37145fSSimon SchubertSpanning Tree is used to detect and remove loops in a network topology. 82*db37145fSSimon Schubert.Pp 83*db37145fSSimon SchubertPacket filtering can be used with any firewall package that hooks in via the 84*db37145fSSimon Schubert.Xr pfil 9 85*db37145fSSimon Schubertframework. 86*db37145fSSimon SchubertWhen filtering is enabled, bridged packets will pass through the filter 87*db37145fSSimon Schubertinbound on the originating interface, on the bridge interface and outbound on 88*db37145fSSimon Schubertthe appropriate interfaces. 89*db37145fSSimon SchubertEither stage can be disabled, this behaviour can be controlled using 90*db37145fSSimon Schubert.Xr sysctl 8 : 91*db37145fSSimon SchubertSet 92*db37145fSSimon Schubert.Va net.link.bridge.pfil_member 93*db37145fSSimon Schubertto 94*db37145fSSimon Schubert.Li 1 95*db37145fSSimon Schubertto enable filtering on the incoming and outgoing member interfaces 96*db37145fSSimon Schubertand set 97*db37145fSSimon Schubert.Va net.link.bridge.pfil_bridge 98*db37145fSSimon Schubertto 99*db37145fSSimon Schubert.Li 1 100*db37145fSSimon Schubertto enable filtering on the bridge interface. 101*db37145fSSimon Schubert.Pp 102*db37145fSSimon SchubertARP and REVARP packets are forwarded without being filtered and others 103*db37145fSSimon Schubertthat are not IP nor IPv6 packets are not forwarded when filtering is 104*db37145fSSimon Schubertenabled. 105*db37145fSSimon Schubert.Pp 106*db37145fSSimon SchubertNote that packets to and from the bridging host will be seen by the 107*db37145fSSimon Schubertfilter on the interface with the appropriate address configured as well 108*db37145fSSimon Schubertas on the interface on which the packet arrives or departs. 109*db37145fSSimon Schubert.Pp 110*db37145fSSimon SchubertThe MTU of the first member interface to be added is used as the bridge MTU, 111*db37145fSSimon Schubertall additional members are required to have exactly the same value. 112*db37145fSSimon Schubert.Sh SEE ALSO 113*db37145fSSimon Schubert.Xr brconfig 8 , 114*db37145fSSimon Schubert.Xr pf 4 115*db37145fSSimon Schubert.Sh HISTORY 116*db37145fSSimon SchubertThe 117*db37145fSSimon Schubert.Nm 118*db37145fSSimon Schubertdriver first appeared in 119*db37145fSSimon Schubert.Ox 2.5 120*db37145fSSimon Schubertand found its way into 121*db37145fSSimon Schubert.Dx 1.3.7 . 122*db37145fSSimon Schubert.Sh AUTHORS 123*db37145fSSimon Schubert.An -nosplit 124*db37145fSSimon SchubertThe 125*db37145fSSimon Schubert.Nm bridge 126*db37145fSSimon Schubertdriver was originally written by 127*db37145fSSimon Schubert.An Jason L. Wright 128*db37145fSSimon Schubert.Aq jason@thought.net 129*db37145fSSimon Schubertas part of an undergraduate independent study at the University of 130*db37145fSSimon SchubertNorth Carolina at Greensboro. 131*db37145fSSimon Schubert.Pp 132*db37145fSSimon SchubertThis version of the 133*db37145fSSimon Schubert.Nm 134*db37145fSSimon Schubertdriver has been heavily modified from the original version by 135*db37145fSSimon Schubert.An Jason R. Thorpe 136*db37145fSSimon Schubert.Aq thorpej@wasabisystems.com . 137*db37145fSSimon Schubert.Sh BUGS 138*db37145fSSimon SchubertThe 139*db37145fSSimon Schubert.Nm 140*db37145fSSimon Schubertdriver currently supports only Ethernet and Ethernet-like (e.g. 802.11) 141*db37145fSSimon Schubertnetwork devices, with exactly the same interface MTU size as the bridge device. 142