From owner-freebsd-current@freebsd.org Fri Jul 29 19:10:33 2016 Return-Path: Delivered-To: freebsd-current@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 14F12BA854C for ; Fri, 29 Jul 2016 19:10:33 +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 E61511802 for ; Fri, 29 Jul 2016 19:10:32 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from [10.3.129.92] (50-207-240-162-static.hfc.comcastbusiness.net [50.207.240.162]) (authenticated bits=0) by webmail2.jnielsen.NET (8.15.2/8.15.2) with ESMTPSA id u6TJ6qPx047223 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Jul 2016 13:06:55 -0600 (MDT) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail2.jnielsen.NET: Host 50-207-240-162-static.hfc.comcastbusiness.net [50.207.240.162] claimed to be [10.3.129.92] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: bhyve with lagg failover doesn't work on wifi From: John Nielsen In-Reply-To: <20160729045652.GJ26793@gmail.com> Date: Fri, 29 Jul 2016 13:06:52 -0600 Cc: freebsd-current@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <14F7DC55-3072-452F-AA70-1EA8701327E7@jnielsen.net> References: <20160729045652.GJ26793@gmail.com> To: Randy Westlund X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 19:10:33 -0000 Generally speaking, you can't bridge the station side of a wireless = link. The access point will only accept frames with the station's MAC = address. So what you are seeing is expected, unfortunately. Your best bet is probably to do NAT. Take lagg0 out of the bridge and = use it as your "public" interface. Assign a local IP to the bridge. Run = a DHCP server on your host (or in another VM on the bridge if you like) = or just use static internal IPs on your VMs. Enable IP forwarding = (gateway_enable=3Dyes in rc.conf). Configure your firewall to NAT your = private range out lagg0. You can do other things with tunneling, etc. but you'll need a remote = endpoint for the tunnel. (If your access point runs FreeBSD you can use = either vxlan or gif+EtherIP and just use the wireless link to carry the = tunnel traffic, but I suspect that you want to roam between arbitrary = access points.) > On Jul 28, 2016, at 10:56 PM, Randy Westlund = wrote: >=20 > I'm using bhyve on 11.0-BETA2, bridging tap0 to lagg0, a failover > between wifi and ethernet. The bhyve VM's networking only works I'm > using ethernet. >=20 >> # Lagg config. >> ifconfig_em0=3D"up" >> create_args_wlan0=3D"wlanaddr 3c:97:0e:46:70:ca" >> wlans_iwn0=3D"wlan0" >> ifconfig_wlan0=3D"WPA" >> cloned_interfaces=3D"lagg0 bridge0 tap0" >> ifconfig_lagg0=3D"laggproto failover laggport em0 laggport wlan0 = DHCP" >> # tap0 and bridge0 are for bhyve. >> ifconfig_bridge0=3D"addm lagg0 addm tap0" >=20 > With the ethernet cable connected, the VM's networking works. But = when > I remove the ethernet cable and lagg0 fails over to wifi, the VM can = no > longer use the network. >=20 > I can use tcpdump to see the DHCP packets going along this path: > vtnet0 -> tap0 -> bridge0 -> lagg0 -> wlan0 >=20 > The DHCP requests appear on wlan0. But the router never sees them. >=20 > Here's the ifconfig output when wlan0 is active: >=20 >> em0: flags=3D8943 = metric 0 mtu 1500 >> = options=3D4219b >> ether 3c:97:0e:46:70:ca >> nd6 options=3D29 >> media: Ethernet autoselect >> status: no carrier >> lo0: flags=3D8049 metric 0 mtu 16384 >> options=3D600003 >> inet6 ::1 prefixlen 128 >> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 >> inet 127.0.0.1 netmask 0xff000000 >> nd6 options=3D21 >> groups: lo >> wlan0: flags=3D8943 = metric 0 mtu 1500 >> ether 3c:97:0e:46:70:ca >> nd6 options=3D29 >> media: IEEE 802.11 Wireless Ethernet MCS mode 11ng >> status: associated >> ssid neural_network channel 1 (2412 MHz 11g ht/40+) bssid = c4:04:15:90:f5:fd >> regdomain FCC country US authmode WPA2/802.11i privacy ON >> deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 = bmiss 10 >> scanvalid 60 protmode CTS ampdulimit 64k ampdudensity 8 >> -amsdutx amsdurx shortgi -stbc wme roaming MANUAL >> groups: wlan >> lagg0: flags=3D8943 = metric 0 mtu 1500 >> ether 3c:97:0e:46:70:ca >> inet 192.168.1.17 netmask 0xffffff00 broadcast 192.168.1.255 >> nd6 options=3D29 >> media: Ethernet autoselect >> status: active >> groups: lagg >> laggproto failover lagghash l2,l3,l4 >> laggport: em0 flags=3D1 >> laggport: wlan0 flags=3D4 >> bridge0: flags=3D8843 metric = 0 mtu 1500 >> ether 02:4a:6b:6e:fc:00 >> nd6 options=3D9 >> groups: bridge >> 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 >> member: lagg0 flags=3D143 >> ifmaxaddr 0 port 4 priority 128 path cost 55 >> tap0: flags=3D8943 = metric 0 mtu 1500 >> options=3D80000 >> ether 00:bd:ea:f0:f6:00 >> nd6 options=3D29 >> media: Ethernet autoselect >> status: active >> groups: tap >> Opened by PID 1322 >=20