When is a switch not a switch?
Jason Tubnor
jason at tubnor.net
Thu Oct 22 03:16:14 UTC 2020
On Thu, 22 Oct 2020 at 13:47, D'Arcy Cain <darcy at druid.net> wrote:
>
> Here is what the interfaces look like:
>
> eth0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0
> mtu 1500
> options=80088<VLAN_MTU,VLAN_HWCSUM,LINKSTATE>
> ether 14:02:ec:31:60:d0
> media: Ethernet autoselect (1000baseT <full-duplex>)
> status: active
> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
> ether 02:9d:b2:b8:78:00
> inet 98.158.139.65 netmask 0xffffffe0 broadcast 98.158.139.95
> 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: eth0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 1 priority 128 path cost 55
> groups: bridge
> nd6 options=9<PERFORMNUD,IFDISABLED>
> tap0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
> description: vmnet-BASE-0-public
> options=80000<LINKSTATE>
> ether 00:bd:5f:56:f8:00
> groups: tap vm-port
> media: Ethernet autoselect
> status: active
> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> Opened by PID 3679
>
tap0 is not a member of public so has no way to get to eth0 or public.
I'd avoid creating the 'public' bridge and let vm-bhyve create it.
Something like:
vm switch create public
vm switch add public eth0
Then for the guest:
vm add -d network -s public <guestname>
If you have IPv4/v6 addresses on eth0, you will be able to ping those from
the guest.
Cheers,
Jason.
In the VM I set the IP to 71 on the same network. Here is what that looks
> like:
>
> vtnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric
> 0
> mtu 1500
> options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
> ether 22:22:22:22:22:00
> inet 98.158.139.71 netmask 0xffffffe0 broadcast 98.158.139.95
> media: Ethernet 10Gbase-T <full-duplex>
> status: active
> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>
> Everything looks correct but I can't even ping between the host and the VM.
More information about the freebsd-virtualization
mailing list