xref: /freebsd/share/man/man4/bridge.4 (revision 9207b4cff7b8d483f4dd3c62266c2b58819eb7f9)
1.\"
2.\" $FreeBSD$
3.\"
4.Dd September 28, 1998
5.Dt BRIDGE 4
6.Os
7.Sh NAME
8.Nm bridge
9.Nd bridging support
10.Sh SYNOPSIS
11.Cd "options BRIDGE"
12.Sh DESCRIPTION
13.Fx
14supports bridging on Ethernet-type interfaces.
15.Pp
16Runtime operation of the
17.Nm
18is controlled by several
19.Xr sysctl 8
20variables.
21The
22.Va net.link.ether.bridge
23variable can be set to
24.Li 1
25to enable bridging, or set to
26.Li 0
27to disable it.
28.Pp
29The
30.Va net.link.ether.bridge_ipfw
31variable can be set to
32.Li 1
33to enable
34.Xr ipfw 8
35filtering on bridged packets.
36Note that
37.Xr ipfw 8
38rules only apply
39to IP packets.
40Non-IP packets are subject to the default
41.Xr ipfw 8
42rule
43(number 65535)
44which must be an
45.Cm allow
46rule if ARP and other non-IP packets need to flow through the
47.Nm .
48.Pp
49The
50.Nm
51configuration is controlled by the
52.Va net.link.ether.bridge_cfg
53variable.
54It consists of a comma-separated list of
55.Ar interface : Ns Ar cluster
56pairs, where all interfaces with the same
57.Ar cluster
58number will
59be bridged together.
60.Pp
61Another
62variable reinitializes the
63.Nm ;
64this is required if bridged
65configurations include loadable interfaces.
66After loading new interface drivers, setting the
67.Va net.link.ether.bridge_refresh
68variable to
69.Li 1
70will cause the
71.Nm
72to reinitialize itself.
73.Sh EXAMPLES
74The following command will cause the
75.Li ep0
76and
77.Li fxp0
78interfaces to be bridged together, and the
79.Li fxp1
80and
81.Li de0
82interfaces to be bridged together:
83.Pp
84.Dl "sysctl net.link.ether.bridge_cfg ep0:0,fxp0:0,fxp1:1,de0:1"
85.Sh BUGS
86Care must be taken not to construct loops in the
87.Nm
88topology.
89The kernel supports only a primitive form of loop detection, by disabling
90some interfaces when a loop is detected.
91No support for a daemon running the
92spanning tree algorithm is currently provided.
93.Pp
94With bridging active, interfaces are in promiscuous mode,
95thus causing some load on the system to receive and filter
96out undesired traffic.
97.Pp
98Extended functionality to enable bridging selectively on clusters
99of interfaces is still in the works.
100.Pp
101Interfaces that cannot be put into promiscuous mode or that don't
102support sending packets with arbitrary Ethernet source addresses
103are not compatible with bridging.
104.Sh SEE ALSO
105.Xr ip 4 ,
106.Xr ng_bridge 4 ,
107.Xr ipfw 8 ,
108.Xr sysctl 8
109.Sh HISTORY
110.Nm
111bridging was introduced in
112.Fx 2.2.8
113by
114.An Luigi Rizzo Aq luigi@iet.unipi.it .
115