Date: Wed, 4 Nov 2015 20:50:26 +0800 From: Julian Elischer <julian@freebsd.org> To: Victor Sudakov <vas@mpeks.tomsk.su>, freebsd-net@freebsd.org Subject: Re: tap(4) and host-only networking between host and guest Message-ID: <5639FF12.1020109@freebsd.org> In-Reply-To: <20151104075454.GA99850@admin.sibptus.tomsk.ru> References: <20151104075454.GA99850@admin.sibptus.tomsk.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/4/15 3:54 PM, Victor Sudakov wrote: > Colleagues, > > 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} > > I even tried to create a lo1 interface on the host and bridge it with > tap0 but lo1 would not add as a bridge member even if I adjust its MTU. > > > root@vas:/etc # ifconfig bridge0 create > root@vas:/etc # ifconfig lo1 mtu 1500 up > root@vas:/etc # ifconfig bridge0 addm tap0 > root@vas:/etc # ifconfig bridge0 addm lo1 > ifconfig: BRDGADD lo1: Invalid argument > root@vas:/etc # > root@vas:/etc # ifconfig bridge0 > bridge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 > ether 02:8f:fd:16:50:00 > nd6 options=9<PERFORMNUD,IFDISABLED> > id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 > maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 > root id 00:00:00:00:00:00 priority 0 ifcost 0 port 0 > member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> > ifmaxaddr 0 port 5 priority 128 path cost 2000000 > root@vas:/etc # > > Any help is appreciated. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5639FF12.1020109>