When is a switch not a switch?

Patrick M. Hausen hausen at punkt.de
Tue Oct 20 09:37:14 UTC 2020


Hi all,

> Am 20.10.2020 um 11:28 schrieb D'Arcy Cain <darcy at druid.net>:
> 
> On 10/20/20 4:36 AM, Patrick M. Hausen wrote:
>> It's officially documented here:
>> https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-bridging.html
> 
> I did see that.  Does that mean that I don't even need to create switches at all?

What is a switch in this context? I use bridge interfaces to connect jails via epair
and VMs via tap.

>> "If the bridge host needs an IP address, set it on the bridge interface, not on the member interfaces."
> 
> But I don't necessarily need an IP on the bridge itself, right?

Depends ;-)

If the host has got e.g. em0 with an IP address and you want to make
that physical interface part of e.g. bridge0 as well as all the VMs so they
can communicate on the wire ...

you *must* move the IP address config from em0 to bridge0 and
configure em0 "up".

If em0 does not have an IP address on the host and should be used
exclusively for VMs, then the bridge does not need an IP address, either.
Still you need to configure em0 "up".

And additionally ...

- you should disable all hardware acceleration features on the physical interface
- if you are using pf you should move the rule processing from the members to the bridge like so:

sysctl net.link.bridge.pfil_member=0
sysctl net.link.bridge.pfil_bridge=1


HTH,
Patrick
--
punkt.de GmbH
Patrick M. Hausen
.infrastructure

Kaiserallee 13a
76133 Karlsruhe

Tel. +49 721 9109500

https://infrastructure.punkt.de
info at punkt.de

AG Mannheim 108285
Geschäftsführer: Jürgen Egeling, Daniel Lienert, Fabian Stein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-virtualization/attachments/20201020/e9776583/attachment.sig>


More information about the freebsd-virtualization mailing list