mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-04 12:52:15 +00:00
Finally document the net.link.ether.bridge_cfg and
net.link.ether.bridge_refresh variables. While I'm here, try to make some of the markup on this page more consistent with the new (markup-reviewed) content. PR: 22060 Reviewed by: ru (for markup, on an earlier version of this delta) MFC after: 2 days
This commit is contained in:
parent
371af8a555
commit
da4faae106
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=80412
@ -10,40 +10,77 @@
|
||||
.Sh DESCRIPTION
|
||||
Starting from version 2.2.8,
|
||||
.Fx
|
||||
supports bridging on ethernet-type
|
||||
supports bridging on Ethernet-type
|
||||
interfaces.
|
||||
This is achieved using the following option
|
||||
.Bd -literal
|
||||
options BRIDGE
|
||||
.Ed
|
||||
This is enabled by including the following line in the kernel configuration
|
||||
file:
|
||||
.Pp
|
||||
in the kernel config file, and is controlled by two
|
||||
.Nm sysctl
|
||||
variables:
|
||||
.Bd -literal
|
||||
net.link.ether.bridge
|
||||
.Ed
|
||||
.Dl "options BRIDGE"
|
||||
.Pp
|
||||
Set to 1 to enable bridging, set to 0 to disable it
|
||||
.Bd -literal
|
||||
net.link.ether.bridge_ipfw
|
||||
.Ed
|
||||
Runtime operation of the bridge is controlled by several
|
||||
.Xr sysctl 8
|
||||
variables.
|
||||
The
|
||||
.Va net.link.ether.bridge
|
||||
variable can be set to
|
||||
.Li 1
|
||||
to enable bridging, or set to
|
||||
.Li 0
|
||||
to disable it.
|
||||
.Pp
|
||||
Set to 1 to enable
|
||||
.Nm ipfw
|
||||
The
|
||||
.Va net.link.ether.bridge_ipfw
|
||||
.Xr sysctl 8
|
||||
variable can be set to
|
||||
.Li 1
|
||||
to enable
|
||||
.Xr ipfw 8
|
||||
filtering on bridged packets.
|
||||
Note that
|
||||
.Nm ipfw
|
||||
.Xr ipfw 8
|
||||
rules only apply
|
||||
to IP packets.
|
||||
Non-IP packets are subject to the default
|
||||
.Nm ipfw
|
||||
.Xr ipfw 8
|
||||
rule
|
||||
.Pq number 65535
|
||||
which must be an
|
||||
.Ar allow
|
||||
rule if we want ARP and other non-IP packets to flow through the
|
||||
rule if ARP and other non-IP packets need to flow through the
|
||||
bridge.
|
||||
.Pp
|
||||
The bridge configuration is controlled by the
|
||||
.Va net.link.ether.bridge_cfg
|
||||
.Xr sysctl 8
|
||||
variable.
|
||||
It consists of a comma-separated list of
|
||||
.Ar interface : Ns Ar cluster
|
||||
pairs, where all interfaces with the same
|
||||
.Ar cluster
|
||||
number will
|
||||
be bridged together.
|
||||
.Pp
|
||||
Another
|
||||
.Xr sysctl 8
|
||||
variable reinitializes the bridge; this is required if bridged
|
||||
configurations include loadable interfaces.
|
||||
After loading new interface drivers, setting the
|
||||
.Va net.link.ether.bridge_refresh
|
||||
variable to
|
||||
.Li 1
|
||||
will cause the bridge to reinitialize itself.
|
||||
.Sh EXAMPLES
|
||||
The following command will cause the
|
||||
.Li ep0
|
||||
and
|
||||
.Li fxp0
|
||||
interfaces to be bridged together, and the
|
||||
.Li fxp1
|
||||
and
|
||||
.Li de0
|
||||
interfaces to be bridged together:
|
||||
.Pp
|
||||
.Dl "sysctl -w net.link.ether.bridge_cfg ep0:0,fxp0:0,fxp1:1,de0:1"
|
||||
.Sh BUGS
|
||||
Care must be taken not to construct loops in the bridge topology.
|
||||
The kernel supports only a primitive form of loop detection, by disabling
|
||||
|
Loading…
Reference in New Issue
Block a user