From owner-freebsd-net@freebsd.org Thu Nov 5 10:22:46 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FA67A27455 for ; Thu, 5 Nov 2015 10:22:46 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51FE41AE8 for ; Thu, 5 Nov 2015 10:22:45 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-229-78.lns20.per1.internode.on.net [121.45.229.78]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id tA5AMXHe050970 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 5 Nov 2015 02:22:36 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: tap(4) and host-only networking between host and guest To: Victor Sudakov , Neel Natu References: <20151104075454.GA99850@admin.sibptus.tomsk.ru> <5639FF12.1020109@freebsd.org> <20151104131230.GA1117@admin.sibptus.tomsk.ru> <20151104184503.GC1117@admin.sibptus.tomsk.ru> <20151105023115.GA10139@admin.sibptus.tomsk.ru> Cc: freebsd-net From: Julian Elischer Message-ID: <563B2DE4.2060307@freebsd.org> Date: Thu, 5 Nov 2015 18:22:28 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151105023115.GA10139@admin.sibptus.tomsk.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 10:22:46 -0000 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? ;-) >