Deleted Added
full compact
bridge.4 (147205) bridge.4 (147432)
1.\" $NetBSD: bridge.4,v 1.5 2004/01/31 20:14:11 jdc 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

--- 19 unchanged lines hidden (view full) ---

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.\"
1.\" $NetBSD: bridge.4,v 1.5 2004/01/31 20:14:11 jdc 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

--- 19 unchanged lines hidden (view full) ---

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.\" $FreeBSD: head/share/man/man4/if_bridge.4 147205 2005-06-10 01:25:22Z thompsa $
37.Dd January 4, 2004
36.\" $FreeBSD: head/share/man/man4/if_bridge.4 147432 2005-06-16 18:46:17Z ru $
37.\"
38.Dd June 10, 2005
38.Dt IF_BRIDGE 4
39.Os
40.Sh NAME
41.Nm if_bridge
42.Nd network bridge device
43.Sh SYNOPSIS
39.Dt IF_BRIDGE 4
40.Os
41.Sh NAME
42.Nm if_bridge
43.Nd network bridge device
44.Sh SYNOPSIS
44.Cd device if_bridge
45.Cd "device if_bridge"
45.Sh DESCRIPTION
46The
47.Nm
48driver creates a logical link between two or more IEEE 802 networks
49that use the same (or
46.Sh DESCRIPTION
47The
48.Nm
49driver creates a logical link between two or more IEEE 802 networks
50that use the same (or
50.Dq similar enough )
51.Dq "similar enough" )
51framing format.
52For example, it is possible to bridge Ethernet and 802.11 networks together,
53but it is not possible to bridge Ethernet and Token Ring together.
54.Pp
55Each
56.Nm
57interface is created at runtime using interface cloning.
58This is

--- 18 unchanged lines hidden (view full) ---

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, on the bridge interface and outbound on
84the appropriate interfaces.
52framing format.
53For example, it is possible to bridge Ethernet and 802.11 networks together,
54but it is not possible to bridge Ethernet and Token Ring together.
55.Pp
56Each
57.Nm
58interface is created at runtime using interface cloning.
59This is

--- 18 unchanged lines hidden (view full) ---

78The
79.Nm
80driver implements the IEEE 802.1D Spanning Tree protocol (STP).
81Spanning Tree is used to detect and remove loops in a network topology.
82.Pp
83When filtering is enabled, bridged packets will pass through the filter
84inbound on the originating interface, on the bridge interface and outbound on
85the appropriate interfaces.
85Either stage can be disabled, this behaviour can be controlled using
86Either stage can be disabled, this behaviour can be controlled using
86.Xr sysctl 8 :
87.Bl -tag -width ".Va net.link.bridge.pfil_member"
88.It Va net.link.bridge.pfil_member
89Set to
90.Li 1
87.Xr sysctl 8 :
88.Bl -tag -width ".Va net.link.bridge.pfil_member"
89.It Va net.link.bridge.pfil_member
90Set to
91.Li 1
91to enable enable filtering on the incoming and outgoing member interfaces, set
92to
92to enable filtering on the incoming and outgoing member interfaces, set
93to
93.Li 0
94to disable it.
95.It Va net.link.bridge.pfil_bridge
96Set to
97.Li 1
94.Li 0
95to disable it.
96.It Va net.link.bridge.pfil_bridge
97Set to
98.Li 1
98to enable enable filtering on the bridge interface, set
99to
99to enable filtering on the bridge interface, set
100to
100.Li 0
101to disable it.
102.It Va net.link.bridge.ipfw
103Set to
104.Li 1
101.Li 0
102to disable it.
103.It Va net.link.bridge.ipfw
104Set to
105.Li 1
105to enable enable layer2 filtering with
106.Xr ipfirewall 4
107, set to
106to enable layer2 filtering with
107.Xr ipfirewall 4 ,
108set to
108.Li 0
109to disable it.
110This needs to be enabled for
111.Xr dummynet 4
112support.
109.Li 0
110to disable it.
111This needs to be enabled for
112.Xr dummynet 4
113support.
113When ipfw is enabled pfil_bridge and pfil_member will be disabled so that IPFW
114is not run twice, these can be re-enabled if desired.
114When
115.Va ipfw
116is enabled,
117.Va pfil_bridge
118and
119.Va pfil_member
120will be disabled so that IPFW
121is not run twice; these can be re-enabled if desired.
115.El
116.Pp
117ARP and REVARP packets are forwarded without being filtered and others
122.El
123.Pp
124ARP and REVARP packets are forwarded without being filtered and others
118that are not IP nor IPv6 packets are not forwarded when
125that are not IP nor IPv6 packets are not forwarded when
119.Xr pfil 9
120filtering is enabled.
126.Xr pfil 9
127filtering is enabled.
121IPFW can filter Ethernet types using 'mac-type' so all packets are passed to
128IPFW can filter Ethernet types using
129.Cm mac-type
130so all packets are passed to
122the filter for processing.
123.Pp
124Note that packets to and from the bridging host will be seen by the
125filter on the interface with the appropriate address configured as well
126as on the interface on which the packet arrives or departs.
127.Sh EXAMPLES
131the filter for processing.
132.Pp
133Note that packets to and from the bridging host will be seen by the
134filter on the interface with the appropriate address configured as well
135as on the interface on which the packet arrives or departs.
136.Sh EXAMPLES
128The following then placed in the file
137The following when placed in the file
129.Pa /etc/rc.conf
138.Pa /etc/rc.conf
130will cause the a bridge called
131.Sq bridge0
139will cause a bridge called
140.Dq Li bridge0
132to be created, and will add the interfaces
141to be created, and will add the interfaces
133.Sq wi0
142.Dq Li wi0
134and
143and
135.Sq fxp0
144.Dq Li fxp0
136to the bridge, and then enable packet forwarding.
137Such a configuration could be used to implement a simple
138802.11-to-Ethernet bridge (assuming the 802.11 interface is
139in ad-hoc mode).
140.Bd -literal -offset indent
141cloned_interfaces="bridge0"
142ifconfig_bridge0="addm wi0 addm fxp0 up"
143.Ed

--- 33 unchanged lines hidden (view full) ---

177This version of the
178.Nm
179driver has been heavily modified from the original version by
180.An Jason R. Thorpe
181.Aq thorpej@wasabisystems.com .
182.Sh BUGS
183The
184.Nm
145to the bridge, and then enable packet forwarding.
146Such a configuration could be used to implement a simple
147802.11-to-Ethernet bridge (assuming the 802.11 interface is
148in ad-hoc mode).
149.Bd -literal -offset indent
150cloned_interfaces="bridge0"
151ifconfig_bridge0="addm wi0 addm fxp0 up"
152.Ed

--- 33 unchanged lines hidden (view full) ---

186This version of the
187.Nm
188driver has been heavily modified from the original version by
189.An Jason R. Thorpe
190.Aq thorpej@wasabisystems.com .
191.Sh BUGS
192The
193.Nm
185driver currently supports only Ethernet and Ethernet-like (e.g. 802.11)
194driver currently supports only Ethernet and Ethernet-like (e.g., 802.11)
186network devices, with exactly the same interface MTU size as the bridge device.
195network devices, with exactly the same interface MTU size as the bridge device.