From owner-freebsd-virtualization@FreeBSD.ORG Mon Jan 12 16:54:42 2015 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 6FCCC28F for ; Mon, 12 Jan 2015 16:54:42 +0000 (UTC) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id 489EE871 for ; Mon, 12 Jan 2015 16:54:41 +0000 (UTC) Received: from [192.168.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 705CF8DD5C for ; Mon, 12 Jan 2015 16:54:39 +0000 (UTC) Message-ID: <54B3FC53.3080900@freebsd.org> Date: Mon, 12 Jan 2015 11:54:43 -0500 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: ipv4 routing from bhyve References: <20150111213203.60018E00B1@smtp.hushmail.com> In-Reply-To: <20150111213203.60018E00B1@smtp.hushmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GpLfWkt1VkxDEghiGsKD4BimKimlghjeW" 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: Mon, 12 Jan 2015 16:54:42 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GpLfWkt1VkxDEghiGsKD4BimKimlghjeW Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2015-01-11 16:32, williamecowell@hush.ai wrote: > Hello, I hope I can have some assistance. >=20 > I am trying to get networking via wlan0 but without NAT or bridging (do= esn't work on wifi unless WDS). >=20 > say my my main network is 10.10.2.0/24, gateway/internet is 10.10.2.1, = my ip is 10.10.2.252. >=20 > I started to config my bhyve network on 172.16.32.0/24 >=20 > I added a bridge interface with an ip of 172.16.32.1 >=20 > enable forwarding and fastforwarding. from my understanding of the hand= book chapter things should work when I type: >=20 > # route add -net 172.16.32.0/24 10.10.2.252 > route: writing to routing socket: File exists > add net 172.16.32.0: gateway 10.10.2.252 fib 0: route already in table > #=20 >=20 > # netstat -4nr > Routing tables >=20 > Internet: > Destination Gateway Flags Netif Expire > default 10.10.2.1 UGS lagg0 > 127.0.0.1 link#3 UH lo0 > 10.10.2.0/24 link#5 U lagg0 > 10.10.2.252 link#5 UHS lo0 > 172.16.32.0/24 link#4 U bridge0 > 172.16.32.1 link#4 UHS lo0 > #=20 >=20 > bridge0: flags=3D8843 metric 0 = mtu 1500 > ether 00:bd:0f:fc:01:10 > inet 172.16.32.1 netmask 0xffffff00 broadcast 172.16.32.255=20 > nd6 options=3D9 > 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 32768 ifcost 0 port 0 > member: tap0 flags=3D143 > ifmaxaddr 0 port 6 priority 128 path cost 2000000 > lagg0: flags=3D8843 metric 0 mt= u 1500 > ... > inet 10.10.2.252 netmask 0xffffff00 broadcast 10.10.2.255=20 > nd6 options=3D9 > media: Ethernet autoselect > status: active > laggproto failover lagghash l2,l3,l4 > laggport: alc0 flags=3D1 > laggport: wlan0 flags=3D4 > tap0: flags=3D8903 metric 0 mtu= 1500 > options=3D80000 > ether 00:bd:8f:62:67:10 > nd6 options=3D9 > media: Ethernet autoselect > status: no carrier > wlan0: flags=3D8843 metric 0 mt= u 1500 > ... > pflog0: flags=3D141 metric 0 mtu 33160 > tap9: flags=3D8802 metric 0 mtu 1500 > options=3D80000 > ether 00:bd:cb:46:02:09 > nd6 options=3D1 > media: Ethernet autoselect > status: no carrier > tap1: flags=3D8802 metric 0 mtu 1500 > options=3D80000 > ether 00:bd:58:61:02:01 > nd6 options=3D1 > media: Ethernet autoselect > status: no carrier >=20 > Willy, >=20 > PS. sorry for the x post as wasn't sure which list.. >=20 > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@fr= eebsd.org" >=20 You can use ip forwarding (or fast forwarding) to send traffic generated on the new subnet (172.16.32.0/24) out to your network. But unless you configure a static route (or setup a routing protocol like RIP), the other hosts on your network will not know how to reach 172.16.32.0/24 to reply. So the static route you were trying to add, would need to be added to every machine EXCEPT the VM Host, which already has an IP in that subnet. --=20 Allan Jude --GpLfWkt1VkxDEghiGsKD4BimKimlghjeW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJUs/xWAAoJEJrBFpNRJZKfeMkP/irmCtZPYndktcNBrmpsTcYB iaDzLOy+k1+hk3POyBYTgeqhtu2ttEcuRvO4szPTQ4uwNQDMFqYlKO73iwy/tgTn uRZwenP9yE4IJfwC+fUKvKs2puUA/U8Aay1FOptC5/4xZH/m/f8IbsO+dI7ql1si OLTaN0q1vikECp8mZsbImojRRYMvHIF3VqLshByYWRDSNxG+m9NVJXNPkpm9YLZW Vlo2+0EhdLKSPyqRCh4lLT/QhIUMsg2u4ISBN6kLXt9qzvdNR1xZC8JaP9JttxRN poJt3St48oWAEmPlmT2OWl3bLcw1RXHg/GOcN/JBnJ33ZiGBv+72nHYCv65YVE/r 3YQM3rGtG8+W3qhmUZpnV9lCZjZxd4NcrxvvQ2hVa90YYZhKfMmkM/BSVTln0t1g 2JuHgYV9V13tlItXbaboxq3HyLdS/2Za/5ROi8748MutjH2dvZXa+g90Ld/wYBCT fL1q3XJ2sNCNPCNtNkj2G++dASdKtReqLJ9iseutd7c4UVpIkpUcBbRnHD6M8w6d MYrw8f6VRODjPCpVQlqZFfCL7yLikDicL0qgI1xUgd4fU+4LRxoY/LAz8L+nXhM2 9p9bZIZBrUewxIm7JmXNfhXJSXkCSHxaEW/q+W61HkWJU1IQ2di57xWHVqPbNxGG zudWQK0rK0QP7b3olAlG =HhdC -----END PGP SIGNATURE----- --GpLfWkt1VkxDEghiGsKD4BimKimlghjeW--