From owner-freebsd-virtualization@FreeBSD.ORG Sat Oct 25 03:01:57 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 273CBC43 for ; Sat, 25 Oct 2014 03:01:57 +0000 (UTC) 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 CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EF3E2342 for ; Sat, 25 Oct 2014 03:01:56 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-234-114.lns20.per1.internode.on.net [121.45.234.114]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id s9P31pB9077613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 24 Oct 2014 20:01:53 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <544B1298.60000@freebsd.org> Date: Sat, 25 Oct 2014 11:01:44 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: John Nielsen , Pete Wright Subject: Re: NATed or Private Network Setups References: <544ADBEB.2030907@nomadlogic.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2014 03:01:57 -0000 On 10/25/14, 8:01 AM, John Nielsen wrote: >> On Oct 24, 2014, at 5:08 PM, Pete Wright wrote: >> >> Hi All, >> Has anyone deployed bhyve using NAT'd or private network setups? I've >> been able to deploy bridged interfaces, but I was wondering if anyone >> has done other network topologies. Is there anything preventing this >> from happening code wise? I reckon it could be achieved by creating a >> pseudo interface? > Rather than supporting something like epair(4) directly, I believe the plan is to allow connecting a bhyve VM to a user-space virtual switch on the host. Neither is currently available to my knowledge. > > For a NAT setup today you should be able to add your VM's tap(4) interface as the only member of a bridge on the host and assign an IP address to the bridge interface. Services like DHCP for this virtual subnet would need to also be configured on the host in addition to whatever NAT you want to use. > > For an internal-only network between two or more VMs on the host you could also just use a bridge containing only the VM tap adapters. If you don't want the host to participate in the network then don't put an IP on the bridge. I disciovered you can also use netgraph to hook to the tap interfaces, which means that you can use the whole netgraph library of functions.. I did find out that it occasionally loses packets or something so I need to investigate more but it did work. > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org" >