bhyve The host and bhyve guest cannot ping each other

I've set up a Windows 10 guest in bhyve. I used to be able to remote desktop to the Windows via freerdp. But it cannot now. The host and the guest are not able to ping each other now. I don't actually realize what I have done. This must be something happening on the host, because I also have Linux guest and there is the same issue between the host and Linux guest.

So I would ask this forum if anybody can shed a light what may be happening.

The problem is that the host and guest cannot ping each other. But both can access the local network and the Internet without any issues.

Here is how I set up the switch for the guests. I don't use NAT.

Bash:
vm switch create public
vm switch add public ue0

Bash:
~ $ vm switch info public
local: _netgraph,: bad variable name
------------------------
Virtual Switch: public
------------------------
  type: standard
  ident: vm-public
  vlan: -
  physical-ports: ue0
  bytes-in: 17404456 (16.598M)
  bytes-out: 26749967 (25.510M)

  virtual-port
    device: tap0
    vm: win

All my network interfaces
Bash:
~ $ ifconfig 
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 0x1
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ue0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=280099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE,RXCSUM_IPV6>
        ether a0:ce:c8:07:29:d6
        inet 192.168.0.4 netmask 0xffffff00 broadcast 192.168.0.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether 9c:eb:e8:92:16:c2
        inet 192.168.0.5 netmask 0xffffff00 broadcast 192.168.0.255
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
vm-public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether f6:23:81:8c:41:7c
        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: ue0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 2 priority 128 path cost 20000
        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/win/0/public
        options=80000<LINKSTATE>
        ether 58:9c:fc:10:3a:0c
        groups: tap vm-port
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        Opened by PID 76313

If there is any change I can recall that is remotely connected, that may the change from the on-board NIC to the usb NIC. The on-board NIC stopped working so I started to use the USB nic ue0.

Other than that, I don't recall I change anything about the networking on the host.

If you have any direction I can continue, please let me know. Thanks so much.
 
You have two interfaces (ue0 and ue1) on the same subnet.
 
As far as I know, any modern windows has blocked "ping requests" by default.
You should enable something like ICMP echo request/reply on windows firewall.
Try to ping any freshly-installed non-virtual windows on non-virtual network.
 
As far as I know, any modern windows has blocked "ping requests" by default.
You should enable something like ICMP echo request/reply on windows firewall.
Try to ping any freshly-installed non-virtual windows on non-virtual network.
Though I use Windows here, the point the host and the guest don't connect. As i mentioned in the original post, the same thing happens to a Linux guest.
 
You have two interfaces (ue0 and ue1) on the same subnet.
Can you please elaborate why that is an issue? Sorry that I don't understand that from my little knoeledge about subnet and routing.

Both ue0 and ue1 are using static ip addresses now. I didn't configure ue1 (static or dhcp) before. It's set that way when I was experimenting which one to use (after the onboard nic broke) . Now only ue0 connects to an ethernet cable and ue1 does not. It doesn't seem to affect anything so I didn't revert the change.

The guest also has its own ip address like 192.168.0.140 (dhcp) It can connect to other local network device except the host. So now from my understanding about routing, the guest can connect to other devices in the local network (using dhcp or static ip), the route from the guest to the local network probably is ok.

The host can aslo reach other devices in the same local network too. And other devices in the local network can aslo connect to the host. So the routing from or to the host is probably ok too.

If the same routing mechanism is used in the local network, it shouldn't block the connection between the host and the guest. I do not do that or know how to do it.

That is what I know about the routing. I don't know where to go from it.
 
As far as I know, any modern windows has blocked "ping requests" by default.
You should enable something like ICMP echo request/reply on windows firewall.
Try to ping any freshly-installed non-virtual windows on non-virtual network.
I do not know that Windows blocks ping. Thanks for that. I will not test using ping. My question is not ping Windows. My question is that the host and the guest cannot connect.
 
I remove the configuration for `ue1`, and recreate the vm switch. Here is what it is now.
Bash:
~ $ sudo vm switch destroy public
~ $ sudo vm switch create public
~ $ sudo vm switch add public ue0
~ $ sudo vm switch info public
local: _netgraph,: bad variable name
------------------------
Virtual Switch: public
------------------------
  type: standard
  ident: vm-public
  vlan: -
  physical-ports: ue0
  bytes-in: 11356 (11.089K)
  bytes-out: 105097 (102.633K)

Bash:
~ $ ifconfig
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 0x1
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ue1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether 9c:eb:e8:92:16:c2
        media: Ethernet autoselect
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=280099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE,RXCSUM_IPV6>
        ether a0:ce:c8:07:29:d6
        inet 192.168.0.4 netmask 0xffffff00 broadcast 192.168.0.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
vm-public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether fe:4d:4e:61:c3:ea
        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: ue0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 2 priority 128 path cost 20000
        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/xubuntu/0/public
        options=80000<LINKSTATE>
        ether 58:9c:fc:10:3a:0c
        groups: tap vm-port
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        Opened by PID 30571

In a Linux guest, it has its own ip address
Bash:
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 58:9c:fc:0a:f4:57 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.179/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0s5
       valid_lft 7186sec preferred_lft 7186sec
    inet6 fe80::b44f:4488:c30a:32af/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

The Linux guest can ping/ssh other devices in the local network. Just it cannot ping/ssh to the host. Other devices in the network can ping/ssh to the guest.

The same to the host. It can ping/ssh to other devices in the local network, just not the guest. Other devices in the network can ping/ssh to the host.
 
Can you please elaborate why that is an issue? Sorry that I don't understand that from my little knoeledge about subnet and routing.
Routing will be ambiguous. Both interfaces have the same 'directly connected' network and thus it's not clear which of the interfaces should be used to contact another system within that network. Packets may be received on ue1 and the responses might be sent out on eu0, that's usually not what you want to happen.
 
Routing will be ambiguous. Both interfaces have the same 'directly connected' network and thus it's not clear which of the interfaces should be used to contact another system within that network. Packets may be received on ue1 and the responses might be sent out on eu0, that's usually not what you want to happen.
Thanks for clarification. I replied before yours with an update of my configuration. `ue1` never connects to an Ethernet cable. In my previous reply, it's not configured.

And now, I disconnect the usb for `ue1` from the host so there is no `ue1`. I recreate the vm switch and I still cannot have the host and the guest to communicate.
 
Back
Top