From owner-freebsd-net@freebsd.org Wed Nov 4 19:20:38 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 BC595A20BC2 for ; Wed, 4 Nov 2015 19:20:38 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from webmail2.jnielsen.net (webmail2.jnielsen.net [50.114.224.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "webmail2.jnielsen.net", Issuer "freebsdsolutions.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E4421A38 for ; Wed, 4 Nov 2015 19:20:38 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from [10.10.1.196] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by webmail2.jnielsen.net (8.15.2/8.15.1) with ESMTPSA id tA4J7thT006184 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 Nov 2015 12:07:57 -0700 (MST) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail2.jnielsen.net: Host office.betterlinux.com [199.58.199.60] claimed to be [10.10.1.196] Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: tap(4) and host-only networking between host and guest From: John Nielsen In-Reply-To: <20151104184503.GC1117@admin.sibptus.tomsk.ru> Date: Wed, 4 Nov 2015 12:07:55 -0700 Cc: freebsd-net@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20151104075454.GA99850@admin.sibptus.tomsk.ru> <5639FF12.1020109@freebsd.org> <20151104131230.GA1117@admin.sibptus.tomsk.ru> <20151104184503.GC1117@admin.sibptus.tomsk.ru> To: Victor Sudakov X-Mailer: Apple Mail (2.3096.5) 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: Wed, 04 Nov 2015 19:20:38 -0000 On Nov 4, 2015, at 11:45 AM, Victor Sudakov wrote: > Victor Sudakov wrote: >> Julian Elischer wrote: >>>>=20 >>>> I am experimenting with bhyve which uses tap(4) for network access. >>>>=20 >>>> 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! >>>=20 >>> tap IS the interface.. >>>=20 >>> ifconfig tap0 $address... >>> and in the VM, ifconfig vtnet0 ${some_other_address} >>=20 >> Thank you, Julian! It works. I felt I was missing something obvious.=20= >=20 > For some reason, after a guest is shutdown or rebooted, the IP address > on the host's tap0 interface is deleted. >=20 > It's kind of inconvenient.=20 What I have done in this scenario is create a bridge interface, assign = the host=E2=80=99s IP to the bridge, and add the tap as a member to the = bridge.=