Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2019 13:30:46 +0100
From:      Mathias Picker <Mathias.Picker@virtual-earth.de>
To:        "freebsd-virtualization\@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   vm-bhyve, routing a subnet behind the main ip, is this a good / "correct" solution?
Message-ID:  <86sgvbdtl5.fsf@virtual-earth.de>

next in thread | raw e-mail | index | archive | help
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=20
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=20
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=20
vm-bhyve wiki, usiing a bridge and adding the network card (em0)=20
to it, which didn't work.

Since I never used byhve I wasn't to sure where the error was, but=20
after asking Hetzners support and getting info about their setup I=20
guessed it was the bridge.

So I just removed the interface from the bridge and added the=20
subnet to it.

This seems to work, even without adding a static route, netstat -r=20
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=20
bhyve VMs have network connection.

I'm still a bit puzzled if using a "bridge" this way is a good=20
configuration.

And why do I not need a gateway address? Yeah, my IP knowledge is=20
a bit thin ;)

Thanks for any comments,

Mathias


--=20
Mathias Picker=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
Gesch=C3=A4ftsf=C3=BChrer
Mathias.Picker@virtual-earth.de

virtual earth Gesellschaft f=C3=BCr Wissens re/pr=C3=A4 sentation mbH
http://www.virtual-earth.de/           HRB126870
support@virtual-earth.de               Westendstr. 142
089 / 1250 3943=20=20=20=20=20=20=20=20=20=20=20=20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86sgvbdtl5.fsf>