Solved Switch does not survive reboot and other network changes

In your last "host ifconfig", the bridge and ue0 have the same ip address. This cannot work. You have to choose if you put the bridge or ue0 under DHCP (or a fixed ip). It's better to set DHCP (or a fixed ip) on the bridge if you are on FreeBSD 15.

I don't know how vm-bhyve is functioning, but if you want the bridge to have DHCP at startup, you need to create it in rc.conf, addm ue0 and set SYNDHCP, like this:
Code:
cloned_interface="bridge0"
ifconfig_bridge0_name="vmpublic"
ifconfig_vmpublic="addm ue0 SYNDHCP"
I think you can't use "vm-public" as name in rc.conf because it contains a non-alphanumeric character.

Is it possible to do the same with vm-bhyve? I don't know.

You can do that with a script also ( service dhclient forcestart vmpublic).

Normally, it works also with an ip on ue0 (DHCP for instance) and no ip on the bridge. You just will get a warning if you are under FreeBSD 15.
 
For what I understood the "switch" must have the same IP of your NIC if you use the vm-switch, otherwise you can manage manually as you did, but I wouldn't trust very much what I understood… 😓
 
For what I understood the "switch" must have the same IP of your NIC if you use the vm-switch, otherwise you can manage manually as you did, but I wouldn't trust very much what I understood… 😓
You can't have the same ip on two interfaces, that's for sure. The network will work badly if not at all.

In addition, for the VM communicates with the host, its tap needs to be a member of the bridge (I imagine that vm-bhyve does this when the vm is launched).
 
This the workaround to make the switch working again on bhyve-vm:

Code:
doas vm stop [VM]
doas vm switch destroy public
doas vm switch create public
doas vm switch add public ue0
doas vm switch address public 10.10.10.10/24
doas vm start [VM]
 
Thanks. My switch isn't a bridge and I'm finding that I have to destroy the switch, recreate it, and, if it doesn't allow me to add it to my card, (which seems random) I usually can manually add
Code:
ports_public="re0"

It seems that it is a bhyve issue, but other than your posts, I've not found much on the web, so maybe it's a Just Us(TM) problem.
 
Thanks. My switch isn't a bridge and I'm finding that I have to destroy the switch, recreate it, and, if it doesn't allow me to add it to my card, (which seems random) I usually can manually add
Code:
ports_public="re0"

It seems that it is a bhyve issue, but other than your posts, I've not found much on the web, so maybe it's a Just Us(TM) problem.

I don't believe mine is a bridge either, I fixed it.

The bhyve switch doesn't survive at NIC disconnection and reboot. I use internet from a USB android tether, I am constantly unplugging and plugging my phone. It is basically flaky, but if you are on server you should be just fine.
 
Back
Top