Solved IPv6 TCP Connection Issue with Bhyve

ScopeDog

Member

Reaction score: 1
Messages: 29

I could mange to install Windows Server 2019 on FreeBSD 12.1-R + Bhyve by following https://wiki.freebsd.org/bhyve/Windows, etc but am having problems with TCP/IPv6 connections as follows:

* All firewalls are turned off on both host FreeBSD and guest Windows.
* The guest Windows is assigned to a static IPv6 address and a DHCP'ed IPv4 address.
* Accessing the guest Windows using IPv4 is all OK including RDP, telnet, etc and vice versa.
* I can ping from the guest Windows to all IPv6 addresses, vice versa.
* However, accessing the guest Windows and accessing from the guest Windows through TCP/IPv6 all fail.

The following is the tcpdump log when I tried to access the guest Windows from host FreeBSD with RDP (host: rd05.asusa-internal.net, guest: rd05-win001.asusa.net) :

Code:
09:12:02.600455 IP6 rd05.asusa-internal.net.17960 > rd05-win001.asusa.net.rdp: Flags [S], seq 1543467612, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 139185894 ecr 0], length 0
09:12:02.600900 IP6 rd05-win001.asusa.net.rdp > rd05.asusa-internal.net.17960: Flags [S.], seq 419452327, ack 1543467613, win 64000, options [mss 1440,nop,wscale 0,nop,nop,sackOK], length 0
09:12:03.612901 IP6 rd05.asusa-internal.net.17960 > rd05-win001.asusa.net.rdp: Flags [S], seq 1543467612, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 139186906 ecr 0], length 0
09:12:05.629279 IP6 rd05-win001.asusa.net.rdp > rd05.asusa-internal.net.17960: Flags [S.], seq 419452327, ack 1543467613, win 64000, options [mss 1440,nop,wscale 0,nop,nop,sackOK], length 0
09:12:05.816236 IP6 rd05.asusa-internal.net.17960 > rd05-win001.asusa.net.rdp: Flags [S], seq 1543467612, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 139189110 ecr 0], length 0
09:12:10.017399 IP6 rd05.asusa-internal.net.17960 > rd05-win001.asusa.net.rdp: Flags [S], seq 1543467612, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 139193311 ecr 0], length 0
09:12:11.644965 IP6 rd05-win001.asusa.net.rdp > rd05.asusa-internal.net.17960: Flags [S.], seq 419452327, ack 1543467613, win 64000, options [mss 1440,nop,wscale 0,nop,nop,sackOK], length 0
09:12:18.222809 IP6 rd05.asusa-internal.net.17960 > rd05-win001.asusa.net.rdp: Flags [S], seq 1543467612, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 139201516 ecr 0], length 0
09:12:23.644905 IP6 rd05-win001.asusa.net.rdp > rd05.asusa-internal.net.17960: Flags [R], seq 419452328, win 0, length 0

As seen in the log, the host sends a SYN packet to the guest and the guest replies with SYN-ACK. However, the host doesn't seem to correctly respond to it.
Moreover, exactly the same thing is happening with CentOS 8 + KVM/QEMU as I reported at https://forums.centos.org/viewtopic.php?f=56&t=75457 .

The following is an ifconfig output on the host FreeBSD:
Code:
igb0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=a520b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6>
        ether 40:8d:5c:e6:d6:78
        inet 192.168.0.45 netmask 0xffffff00 broadcast 192.168.0.255
        inet6 fe80::428d:5cff:fee6:d678%igb0 prefixlen 64 scopeid 0x1
        inet6 2001:XXX:YYY::105 prefixlen 64
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether 00:bd:23:0e:81:00
        groups: tap
        media: Ethernet autoselect
        status: active
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        Opened by PID 22472
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 02:df:0e:4e:2e:00
        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 4 priority 128 path cost 2000000
        member: igb0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 1 priority 128 path cost 20000
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>

Guest Windows ipconfig:
Code:
   IPv6 Address. . . . . . . . . . . : 2001:XXX:YYY::105:1
   IPv6 Address. . . . . . . . . . . : 2001:XXX:YYY:0:606a:dcf6:bb94:ec57
   Link-local IPv6 Address . . . . . : fe80::606a:dcf6:bb94:ec57%4
   IPv4 Address. . . . . . . . . . . : 192.168.0.216
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 2001:XXX:YYY::1
                                       fe80::a236:9fff:fe87:68ed%4
                                       192.168.0.153

I'm new to VM stuff and would appreciate it if anybody could tell me how to fix this.
Thank you.
 
OP
S

ScopeDog

Member

Reaction score: 1
Messages: 29

I forgot to mention but got the tcpdump log by "tcpdump -i bridge0 port 3389" on the host FreeBSD.
 
Top