Date: Thu, 5 Nov 2015 08:33:23 +0600 From: Victor Sudakov <vas@mpeks.tomsk.su> To: John Nielsen <lists@jnielsen.net> Cc: freebsd-net@freebsd.org Subject: Re: tap(4) and host-only networking between host and guest Message-ID: <20151105023323.GB10139@admin.sibptus.tomsk.ru> In-Reply-To: <C3B51AB9-3964-49D9-90F6-E56AF2FF57B2@jnielsen.net> References: <20151104075454.GA99850@admin.sibptus.tomsk.ru> <5639FF12.1020109@freebsd.org> <20151104131230.GA1117@admin.sibptus.tomsk.ru> <20151104184503.GC1117@admin.sibptus.tomsk.ru> <C3B51AB9-3964-49D9-90F6-E56AF2FF57B2@jnielsen.net>
next in thread | previous in thread | raw e-mail | index | archive | help
John Nielsen wrote: > >>>> > >>>> I am experimenting with bhyve which uses tap(4) for network access. > >>>> > >>>> I don't want to bridge tap0 with any of the hosts's real NICs. How can > >>>> I create a private network just between the host and the guest? > >>> you are thinking too hard! > >>> > >>> tap IS the interface.. > >>> > >>> ifconfig tap0 $address... > >>> and in the VM, ifconfig vtnet0 ${some_other_address} > >> > >> Thank you, Julian! It works. I felt I was missing something obvious. > > > > For some reason, after a guest is shutdown or rebooted, the IP address > > on the host's tap0 interface is deleted. > > > > It's kind of inconvenient. > > What I have done in this scenario is create a bridge interface, > assign the host???s IP to the bridge, and add the tap as a member to > the bridge. That's what I have eventually done too. This way several guests can share a LAN emulation, and a DHCP server can listen on bridge0. -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN sip:sudakov@sibptus.tomsk.ru
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151105023323.GB10139>