Changeset View
Changeset View
Standalone View
Standalone View
share/man/man4/bridge.4
Show All 29 Lines | |||||
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
.\" POSSIBILITY OF SUCH DAMAGE. | .\" POSSIBILITY OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd September 7, 2022 | .Dd March 6, 2023 | ||||
.Dt IF_BRIDGE 4 | .Dt IF_BRIDGE 4 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm if_bridge | .Nm if_bridge | ||||
.Nd network bridge device | .Nd network bridge device | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
To compile this driver into the kernel, | To compile this driver into the kernel, | ||||
place the following line in your | place the following line in your | ||||
▲ Show 20 Lines • Show All 360 Lines • ▼ Show 20 Lines | |||||
The described situation will appear at least on the filtering bridges | The described situation will appear at least on the filtering bridges | ||||
that are doing IP-forwarding; in some of such cases it is better | that are doing IP-forwarding; in some of such cases it is better | ||||
to assign the IP address only to the | to assign the IP address only to the | ||||
.Nm | .Nm | ||||
interface and not to the bridge members. | interface and not to the bridge members. | ||||
Enabling | Enabling | ||||
.Va net.link.bridge.pfil_local_phys | .Va net.link.bridge.pfil_local_phys | ||||
will let you do the additional filtering on the physical interface. | will let you do the additional filtering on the physical interface. | ||||
.Sh NETMAP | |||||
.Xr netmap 4 | |||||
applications may open a bridge interface in emulated mode. | |||||
The netmap application will receive all packets which arrive from member | |||||
interfaces. | |||||
In particular, packets which would otherwise be forwarded to another | |||||
member interface will be received by the netmap application. | |||||
.Pp | |||||
When the | |||||
.Xr netmap 4 | |||||
application transmits a packet to the host stack via the bridge interface, | |||||
.Nm | |||||
receive it and attempts to determine its | |||||
.Ql source | |||||
interface by looking up the source MAC address in the interface's learning | |||||
tables. | |||||
Packets for which no matching source interface is found are dropped and the | |||||
input error counter is incremented. | |||||
If a matching source interface is found, | |||||
.Nm | |||||
treats the packet as though it was received from the corresponding interface | |||||
and handles it normally without passing the packet back to | |||||
.Xr netmap 4 . | |||||
.Sh EXAMPLES | .Sh EXAMPLES | ||||
The following when placed in the file | The following when placed in the file | ||||
.Pa /etc/rc.conf | .Pa /etc/rc.conf | ||||
will cause a bridge called | will cause a bridge called | ||||
.Dq Li bridge0 | .Dq Li bridge0 | ||||
to be created, and will add the interfaces | to be created, and will add the interfaces | ||||
.Dq Li wlan0 | .Dq Li wlan0 | ||||
and | and | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
ifconfig gif0 tunnel 1.2.3.4 5.6.7.8 up | ifconfig gif0 tunnel 1.2.3.4 5.6.7.8 up | ||||
ifconfig bridge0 create | ifconfig bridge0 create | ||||
ifconfig bridge0 addm fxp0 addm gif0 up | ifconfig bridge0 addm fxp0 addm gif0 up | ||||
.Ed | .Ed | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr gif 4 , | .Xr gif 4 , | ||||
.Xr ipf 4 , | .Xr ipf 4 , | ||||
.Xr ipfw 4 , | .Xr ipfw 4 , | ||||
.Xr netmap 4 , | |||||
.Xr pf 4 , | .Xr pf 4 , | ||||
.Xr ifconfig 8 | .Xr ifconfig 8 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
driver first appeared in | driver first appeared in | ||||
.Fx 6.0 . | .Fx 6.0 . | ||||
.Sh AUTHORS | .Sh AUTHORS | ||||
Show All 21 Lines |