xref: /netbsd/share/man/man4/bridge.4 (revision 6550d01e)
1.\"	$NetBSD: bridge.4,v 1.9 2010/01/09 09:44:29 mbalmer Exp $
2.\"
3.\" Copyright 2001 Wasabi Systems, Inc.
4.\" All rights reserved.
5.\"
6.\" Written by Jason R. Thorpe for Wasabi Systems, Inc.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\" 3. All advertising materials mentioning features or use of this software
17.\"    must display the following acknowledgement:
18.\"	This product includes software developed for the NetBSD Project by
19.\"	Wasabi Systems, Inc.
20.\" 4. The name of Wasabi Systems, Inc. may not be used to endorse
21.\"    or promote products derived from this software without specific prior
22.\"    written permission.
23.\"
24.\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
25.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
28.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34.\" POSSIBILITY OF SUCH DAMAGE.
35.\"
36.Dd January 9, 2010
37.Dt BRIDGE 4
38.Os
39.Sh NAME
40.Nm bridge
41.Nd network bridge device
42.Sh SYNOPSIS
43.Cd "pseudo-device bridge"
44.Sh DESCRIPTION
45The
46.Nm
47driver creates a logical link between two or more IEEE 802 networks
48that use the same (or
49.Dq similar enough )
50framing format.
51For example, it is possible to bridge Ethernet and 802.11 networks together,
52but it is not possible to bridge Ethernet and Token Ring together.
53.Pp
54To use
55.Nm bridge ,
56the administrator must first create the interface and configure
57the bridge parameters.
58The bridge is created using the
59.Xr ifconfig 8
60.Cm create
61subcommand.
62The learning and forwarding behavior and other parameters of a
63bridge are configured by the
64.Xr brconfig 8
65utility.
66.Pp
67A bridge can be used to provide several services, such as a simple
68802.11-to-Ethernet bridge for wireless hosts, and traffic isolation.
69.Pp
70A bridge works like a switch, forwarding traffic from one interface
71to another.
72Multicast and broadcast packets are always forwarded to all
73interfaces that are part of the bridge.
74For unicast traffic, the bridge learns which MAC addresses are associated
75with which interfaces and will forward the traffic selectively.
76.Pp
77The
78.Nm
79driver implements the IEEE 802.1D Spanning Tree protocol (STP).
80Spanning Tree is used to detect and remove loops in a network topology.
81.Pp
82Transparent filtering for IP and IPv6 packets can be added with the kernel
83configuration option
84.Cd options BRIDGE_IPF .
85.Pp
86When filtering is enabled, bridged packets will pass through the filter
87inbound on the originating interface and outbound on the appropriate
88interfaces.
89ARP and REVARP packets are forwarded without being filtered and others
90that are not IP nor IPv6 packets are not forwarded when filtering is
91enabled.
92.Pp
93Note that packets to and from the bridging host will be seen by the
94filter on the interface with the appropriate address configured as well
95as on the interface on which the packet arrives or departs.
96.Sh SEE ALSO
97.Xr etherip 4 ,
98.Xr options 4 ,
99.Xr brconfig 8 ,
100.Xr ipf 8
101.Sh HISTORY
102The
103.Nm
104driver first appeared in
105.Nx 1.6 .
106.Sh AUTHORS
107.An -nosplit
108The
109.Nm bridge
110driver was originally written by
111.An Jason L. Wright
112.Aq jason@thought.net
113as part of an undergraduate independent study at the University of
114North Carolina at Greensboro.
115.Pp
116This version of the
117.Nm
118driver has been heavily modified from the original version by
119.An Jason R. Thorpe
120.Aq thorpej@wasabisystems.com .
121.Sh BUGS
122The
123.Nm
124driver currently supports only Ethernet and Ethernet-like (e.g. 802.11)
125network devices, with exactly the same interface MTU size as the bridge device.
126.Pp
127The
128.Nm
129driver currently does not support snooping via
130.Xr bpf 4 .
131