tap(4) and host-only networking between host and guest
Victor Sudakov
vas at mpeks.tomsk.su
Thu Nov 5 02:33:28 UTC 2015
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 at sibptus.tomsk.ru
More information about the freebsd-net
mailing list