vm-bhyve, routing a subnet behind the main ip, is this a good / "correct" solution?
Mathias Picker
Mathias.Picker at virtual-earth.de
Mon Mar 25 12:31:00 UTC 2019
Hi all,
this is the first time I tried to use bhyve.
This is 12.0-RELEASEp3 and vm-bhyve 1.2.3.
My hosting provider hetzner.de is giving out subnets which are
routed through the main ip of the server,
so if my main IP is xxx.xxx.xxx.63 the subnet yyy.yyy.yyy.224/28
is routed as if it was "behind" the main ip xxx.xxx.xxx.xxx.
I first didn't know that and tried the solution mentioned in the
vm-bhyve wiki, usiing a bridge and adding the network card (em0)
to it, which didn't work.
Since I never used byhve I wasn't to sure where the error was, but
after asking Hetzners support and getting info about their setup I
guessed it was the bridge.
So I just removed the interface from the bridge and added the
subnet to it.
This seems to work, even without adding a static route, netstat -r
gives
yyy.yyy.yyy.224/28 link#3 U vm-public
after a reboot (vm-public is the name of the bridge), and now the
bhyve VMs have network connection.
I'm still a bit puzzled if using a "bridge" this way is a good
configuration.
And why do I not need a gateway address? Yeah, my IP knowledge is
a bit thin ;)
Thanks for any comments,
Mathias
--
Mathias Picker
Geschäftsführer
Mathias.Picker at virtual-earth.de
virtual earth Gesellschaft für Wissens re/prä sentation mbH
http://www.virtual-earth.de/ HRB126870
support at virtual-earth.de Westendstr. 142
089 / 1250 3943
More information about the freebsd-virtualization
mailing list