xref: /netbsd-src/share/man/man4/bridge.4 (revision ec0ebd44c46097013624467d88d580f6c93d4011)
1.\"	$NetBSD: bridge.4,v 1.14 2020/09/27 15:42:48 roy 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 September 27, 2020
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
82When filtering is enabled, bridged packets will pass through the filter
83inbound on the originating interface and outbound on the appropriate
84interfaces.
85ARP and REVARP packets are forwarded without being filtered and others
86that are not IP nor IPv6 packets are not forwarded when filtering is
87enabled.
88.Pp
89Note that packets to and from the bridging host will be seen by the
90filter on the interface with the appropriate address configured as well
91as on the interface on which the packet arrives or departs.
92.Pp
93The
94.Nm
95driver will enable passing of VLAN tagged packets automatically if the underlying
96interfaces support it.
97This is to facilitate XEN network configurations with
98.Xr xennet 4 .
99.Pp
100It is not possible to assign an IP address directly to the
101.Nm
102interface.
103Instead, assign an IP address to a
104.Xr vether 4
105interface which can be added to the bridge.
106.Sh SEE ALSO
107.Xr l2tp 4 ,
108.Xr options 4 ,
109.Xr xennet 4 ,
110.Xr vether 4 ,
111.Xr brconfig 8 ,
112.Xr ipf 8
113.Sh HISTORY
114The
115.Nm
116driver first appeared in
117.Nx 1.6 .
118.Sh AUTHORS
119.An -nosplit
120The
121.Nm bridge
122driver was originally written by
123.An Jason L. Wright
124.Aq jason@thought.net
125as part of an undergraduate independent study at the University of
126North Carolina at Greensboro.
127.Pp
128This version of the
129.Nm
130driver has been heavily modified from the original version by
131.An Jason R. Thorpe
132.Aq thorpej@wasabisystems.com .
133.Sh BUGS
134The
135.Nm
136driver currently supports only Ethernet and Ethernet-like (e.g. 802.11)
137network devices, with exactly the same interface MTU size as the bridge device.
138.Pp
139The
140.Nm
141driver currently does not support snooping via
142.Xr bpf 4 .
143