tap(4) and host-only networking between host and guest

Julian Elischer julian at freebsd.org
Thu Nov 5 10:22:46 UTC 2015


On 11/5/15 10:31 AM, Victor Sudakov wrote:
> Neel Natu wrote:
>>>> Julian Elischer 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.
>>>
>> Try using 'vmnet0' instead of 'tap0'. It will retain the IP address
>> even after a guest reboot/shutdown.
> Thanks, I see now vmnet is documented in tap(4).
I didn't know that...
Ok, so now you are an expert, can we count on you to answer all future 
questions on this topic?  ;-)


>



More information about the freebsd-net mailing list