Solved Bhyve bridge networking troubleshoot

Heyo everyone,

I'm messing with bhyve for the first time and doing all the configuratioin through vm-bhyve.
So after following the simple setup instructions I managed to install an ubuntu guest. It seems though I have not grasped the networking part quite as much. So here is the current state

On the Host, with VM Running. As I can see there's a bridge vm-public and tap0 as well as the external interface wlan0 are both attached to it. My goal is obviously to try and connect tap0 to the internet through the bridge. Do I need to manually assign an address to the bridge ? I've tried to dhclient vm-public but it did not work. PF is not running

Code:
archer@laptop:~ % uname -a
FreeBSD laptop 12.1-RELEASE-p2 FreeBSD 12.1-RELEASE-p2 GENERIC  amd64

archer@laptop:~ % ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
        ether 28:d2:44:59:23:35
        media: Ethernet autoselect (none)
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
wlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 28:e3:47:11:5c:fb
        inet 192.168.1.35 netmask 0xffffff00 broadcast 192.168.1.255
        groups: wlan
        ssid Homenet channel 11 (2462 MHz 11g ht/20) bssid 10:7b:ef:c7:62:e8
        regdomain ETSI country DK indoor ecm authmode WPA2/802.11i privacy ON
        deftxkey UNDEF AES-CCM 2:128-bit txpower 30 bmiss 7 scanvalid 60
        protmode CTS ampdulimit 64k ampdudensity 4 shortgi -stbctx stbcrx
        -ldpc wme burst roaming MANUAL
        media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
        status: associated
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
vm-public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 7e:a3:80:de:55:75
        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=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 5 priority 128 path cost 2000000
        member: wlan0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 3 priority 128 path cost 66666
        groups: bridge vm-switch viid-4c918@
        nd6 options=1<PERFORMNUD>
tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: vmnet-solusvm-0-public
        options=80000<LINKSTATE>
        ether 00:bd:70:b9:f8:00
        inet6 fe80::2bd:70ff:feb9:f800%tap0 prefixlen 64 tentative scopeid 0x5
        groups: tap vm-port
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        Opened by PID 1854

archer@laptop:~ % doas vm switch list

NAME    TYPE      IFACE      ADDRESS  PRIVATE  MTU  VLAN  PORTS
public  standard  vm-public  -        no       -    -     wlan0

archer@laptop:~ % doas vm list
NAME     DATASTORE  LOADER  CPU  MEMORY  VNC           AUTOSTART  STATE
solusvm  default    uefi    2    2G      0.0.0.0:5900  No         Running (1854)

Any insight is greatly appreciated. Thanks!
 
Bridging on the wlan interface is going to be problematic. In essence the wireless card needs to spoof MAC addresses and not all wireless cards accept this. I'm fairly certain if you switch it to the re0 interface everything will suddenly work.
 
I see, thank you very much SirDice! So I'll try with re0 wired then, to confirm that. If that's the case, I try NATing with wlan0.

Will report back with anything significant for future reference to anyone :)
 
Ok, wireless card was the issue. Bridge worked fine with wired networking. Nat is probably the solution if someone wants to still use wireless interface that does not support spoofing MACs.

Marked as solved!
 
Back
Top