1998-12-21 22:37:53 +00:00
|
|
|
.\"
|
1999-08-28 00:22:10 +00:00
|
|
|
.\" $FreeBSD$
|
1998-12-21 22:37:53 +00:00
|
|
|
.\"
|
2000-12-11 15:47:53 +00:00
|
|
|
.Dd September 28, 1998
|
1998-12-21 22:37:53 +00:00
|
|
|
.Dt BRIDGE 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm bridge
|
2001-04-18 15:54:10 +00:00
|
|
|
.Nd bridging support
|
2001-08-07 13:18:09 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Cd "options BRIDGE"
|
1998-12-21 22:37:53 +00:00
|
|
|
.Sh DESCRIPTION
|
2000-11-14 11:20:58 +00:00
|
|
|
.Fx
|
2001-08-07 13:18:09 +00:00
|
|
|
supports bridging on Ethernet-type interfaces.
|
2000-11-14 11:20:58 +00:00
|
|
|
.Pp
|
2001-08-07 13:18:09 +00:00
|
|
|
Runtime operation of the
|
|
|
|
.Nm
|
|
|
|
is controlled by several
|
2001-07-26 21:19:25 +00:00
|
|
|
.Xr sysctl 8
|
|
|
|
variables.
|
|
|
|
The
|
|
|
|
.Va net.link.ether.bridge
|
2001-08-07 13:18:09 +00:00
|
|
|
variable can be set to
|
2001-07-26 21:19:25 +00:00
|
|
|
.Li 1
|
|
|
|
to enable bridging, or set to
|
|
|
|
.Li 0
|
|
|
|
to disable it.
|
2000-11-14 11:20:58 +00:00
|
|
|
.Pp
|
2001-07-26 21:19:25 +00:00
|
|
|
The
|
|
|
|
.Va net.link.ether.bridge_ipfw
|
|
|
|
variable can be set to
|
|
|
|
.Li 1
|
|
|
|
to enable
|
|
|
|
.Xr ipfw 8
|
2000-03-01 14:50:24 +00:00
|
|
|
filtering on bridged packets.
|
|
|
|
Note that
|
2001-07-26 21:19:25 +00:00
|
|
|
.Xr ipfw 8
|
1998-12-21 22:37:53 +00:00
|
|
|
rules only apply
|
2000-03-01 14:50:24 +00:00
|
|
|
to IP packets.
|
|
|
|
Non-IP packets are subject to the default
|
2001-07-26 21:19:25 +00:00
|
|
|
.Xr ipfw 8
|
1999-04-16 02:09:38 +00:00
|
|
|
rule
|
2001-08-07 13:18:09 +00:00
|
|
|
(number 65535)
|
1999-04-16 02:09:38 +00:00
|
|
|
which must be an
|
2001-08-07 13:18:09 +00:00
|
|
|
.Cm allow
|
2001-07-26 21:19:25 +00:00
|
|
|
rule if ARP and other non-IP packets need to flow through the
|
2001-08-07 13:18:09 +00:00
|
|
|
.Nm .
|
2001-07-26 21:19:25 +00:00
|
|
|
.Pp
|
2001-08-07 13:18:09 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
configuration is controlled by the
|
2001-07-26 21:19:25 +00:00
|
|
|
.Va net.link.ether.bridge_cfg
|
|
|
|
variable.
|
|
|
|
It consists of a comma-separated list of
|
|
|
|
.Ar interface : Ns Ar cluster
|
|
|
|
pairs, where all interfaces with the same
|
2001-08-07 13:18:09 +00:00
|
|
|
.Ar cluster
|
2001-07-26 21:19:25 +00:00
|
|
|
number will
|
|
|
|
be bridged together.
|
|
|
|
.Pp
|
|
|
|
Another
|
2001-08-07 13:18:09 +00:00
|
|
|
variable reinitializes the
|
|
|
|
.Nm ;
|
|
|
|
this is required if bridged
|
2001-07-26 21:19:25 +00:00
|
|
|
configurations include loadable interfaces.
|
|
|
|
After loading new interface drivers, setting the
|
|
|
|
.Va net.link.ether.bridge_refresh
|
|
|
|
variable to
|
|
|
|
.Li 1
|
2001-08-07 13:18:09 +00:00
|
|
|
will cause the
|
|
|
|
.Nm
|
|
|
|
to reinitialize itself.
|
2001-07-26 21:19:25 +00:00
|
|
|
.Sh EXAMPLES
|
|
|
|
The following command will cause the
|
|
|
|
.Li ep0
|
|
|
|
and
|
|
|
|
.Li fxp0
|
|
|
|
interfaces to be bridged together, and the
|
|
|
|
.Li fxp1
|
|
|
|
and
|
2001-08-07 13:18:09 +00:00
|
|
|
.Li de0
|
2001-07-26 21:19:25 +00:00
|
|
|
interfaces to be bridged together:
|
|
|
|
.Pp
|
|
|
|
.Dl "sysctl -w net.link.ether.bridge_cfg ep0:0,fxp0:0,fxp1:1,de0:1"
|
1998-12-21 22:37:53 +00:00
|
|
|
.Sh BUGS
|
2001-08-07 13:18:09 +00:00
|
|
|
Care must be taken not to construct loops in the
|
|
|
|
.Nm
|
|
|
|
topology.
|
1998-12-21 22:37:53 +00:00
|
|
|
The kernel supports only a primitive form of loop detection, by disabling
|
2000-03-01 14:50:24 +00:00
|
|
|
some interfaces when a loop is detected.
|
|
|
|
No support for a daemon running the
|
1998-12-21 22:37:53 +00:00
|
|
|
spanning tree algorithm is currently provided.
|
|
|
|
.Pp
|
|
|
|
With bridging active, interfaces are in promiscuous mode,
|
|
|
|
thus causing some load on the system to receive and filter
|
|
|
|
out undesired traffic.
|
|
|
|
.Pp
|
|
|
|
Extended functionality to enable bridging selectively on clusters
|
|
|
|
of interfaces is still in the works.
|
|
|
|
.Pp
|
2000-11-10 16:58:13 +00:00
|
|
|
Interfaces that cannot be put into promiscuous mode or that don't
|
|
|
|
support sending packets with arbitrary Ethernet source addresses
|
|
|
|
are not compatible with bridging.
|
1998-12-21 22:37:53 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr ip 4 ,
|
2000-09-01 01:37:25 +00:00
|
|
|
.Xr ng_bridge 4 ,
|
1998-12-21 22:37:53 +00:00
|
|
|
.Xr ipfw 8 ,
|
2000-11-15 16:00:07 +00:00
|
|
|
.Xr sysctl 8
|
1998-12-21 22:37:53 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
.Nm
|
2000-11-14 11:20:58 +00:00
|
|
|
bridging was introduced in
|
|
|
|
.Fx 2.2.8
|
1999-04-16 02:09:38 +00:00
|
|
|
by
|
|
|
|
.An Luigi Rizzo Aq luigi@iet.unipi.it .
|