bhyve No network on guest when bridged from wi-fi interface

Hey guys, well, here is the whole tale:

And here is the tl;dr:
  • Got into freebsd these days, freshinstall
  • I dont know much about networking
  • No firewall (pf) and anything
  • No nat
  • Followed up the vm-bhyve guide to run my vm in addition of other tutorials
  • Looks like the public network is getting in and out:
  • Code:
    local: _netgraph,: bad variable name
    Virtual Switch: public
      type: standard
      ident: vm-public
      vlan: -
      physical-ports: wlan0
      bytes-in: 201656 (196.929K)
      bytes-out: 5270992 (5.026M)
        device: tap0
        vm: arch
  • But ping to external urls or pacman install dosent work
  • ping localhost inside guest works
  • but if I ping the inet address of my host inside guest it says ping: Connect: Network is unreachable
  • Some can-be relevant output:
  • Code:
    ~ > ifconfig                                                                             
    vm-public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 36:ae:c9:d3:39:68
        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 2 priority 128 path cost 138888
        groups: bridge vm-switch viid-4c918@
        nd6 options=9<PERFORMNUD,IFDISABLED>
    tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: vmnet/arch/0/public
        ether 58:9c:fc:10:e5:0c
        groups: tap vm-port
        media: Ethernet autoselect
        status: active
        Opened by PID 42985
So, you have a bridge over some wlan interface. I only recently learned myself, but this won't work, at least not with the "normal" wifi mode of operation.

A bridge will just forward any traffic from any connected interface to any other (a network hub/switch in software, basically). The infrastructure wifi mode requires stations to "associate" with the access point, the access point will then only accept frames received from the hardware address (MAC) of the interface associated with it. Via the bridge, frames originating from your virtual machine will be sent (with the MAC of its virtual network interface), the AP will just ignore them.

It seems there is a wifi mode to solve this issue (which has separate fields for the "sender" and the "station" MAC), but I found very little information about it, and of course, the AP and all stations would need support for it in order to work. So, when trying to have more than one (virtual) interface "behind" wifi, it's probably best to take the routing/nat approach instead.
zirias@ I very thank you for your comment. Since you told me that I moved to make a bridge with Ethernet, first gotting in some troubles activating the driver, but from night to day, the driver started to work and I got network on my vm through that. About the issue that generate this thread in forum, I changed the post title to "No network on guest when bridged from wi-fi interface" since I think will help other people trying to bridge from wlan interfaces as me to at least know that will be a harder path.
The issue itself is not solved, but circumvented, so I dont know if I can mark as solved, or just let it here for other people who want to try and develop a solution for this path. Because of that, can I leave the decision of close/solve the issues to ADM? IDK how the best way to judge that.