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

Victor Sudakov vas at mpeks.tomsk.su
Wed Nov 4 07:55:01 UTC 2015


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?

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 at vas:/etc # ifconfig bridge0 create
root at vas:/etc # ifconfig lo1 mtu 1500 up
root at vas:/etc # ifconfig bridge0 addm tap0 
root at vas:/etc # ifconfig bridge0 addm lo1
ifconfig: BRDGADD lo1: Invalid argument
root at vas:/etc # 
root at 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 at vas:/etc # 

Any help is appreciated.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:sudakov at sibptus.tomsk.ru


More information about the freebsd-net mailing list