Date: Thu, 21 Jan 2010 02:14:16 +1030 From: Wayne Sierke <ws@au.dyndns.ws> To: freebsd-emulation <freebsd-emulation@freebsd.org> Subject: Re: vbox (and qemu) tap/vboxnetflt networking; bridging vs wifi Message-ID: <1264002256.1862.29662.camel@predator-ii.buffyverse> In-Reply-To: <1263998913.1862.29543.camel@predator-ii.buffyverse> References: <20100107185808.GA16577@triton8.kn-bremen.de> <1263998913.1862.29543.camel@predator-ii.buffyverse>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2010-01-21 at 01:18 +1030, Wayne Sierke wrote:
> On Thu, 2010-01-07 at 19:58 +0100, Juergen Lock wrote:
>
> ...
>
> > The only downside of doing it this way is the tap interface loses
> > its IP when vbox closes it and the ifup/down script feature has been
> > removed from vbox so you need to rerun the `ifconfig tap0 ...' each
> > time before you start the guest again. (Maybe that can be avoided
> > if you set net.link.tap.up_on_open=1, put only the tap interface on
> > an if_bridge and give that bridge interface the IP instead, I haven't
> > tried.)
>
> FYI, I just tried this and it appears to work. That is, with the
> following:
>
> ==> /boot/loader.conf <==
> if_tap_load="YES"
> vboxdrv_load="YES"
>
> ==> /etc/sysctl.conf <==
> net.link.tap.user_open=1
> net.link.tap.up_on_open=1
> net.link.ether.inet.proxyall=1
>
> ==> /etc/rc.conf <==
> cloned_interfaces="bridge0 tap0 tap1"
> ifconfig_bridge0="addm tap0 addm tap1 192.168.1.121/29"
> gateway_enable="YES"
>
> and with the VM network adapters configured as bridged to the tapX
> devices, the guest em0 interfaces configured with IP addresses in the
> bridge0's subnet and with default routes to the bridge0 ip, networking
> seems to come up fine in the guests. (I'm still starting the VMs
> manually so it hasn't been verified in fully autonomous startup.)
And just for completeness, for anyone looking for help in getting this
set up, also with this:
==> /etc/devfs.conf <==
own tap0 root:vboxusers
perm tap0 0660
own tap1 root:vboxusers
perm tap1 0660
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1264002256.1862.29662.camel>
