对虚拟机的 Ping 请求有时会中断,有时不会中断

对虚拟机的 Ping 请求有时会中断,有时不会中断

我们在服务器 PC 上安装了 Hyper-V Server 2019,然后安装了三台虚拟机,即 Ubuntu Server 20.04。服务器 PC 上有两个物理以太网端口。我们将其中一个配置为私有 NAT 交换机,以便与虚拟机共享互联网。此交换机直接连接到互联网,其地址为 192.168.0.xxx。这个没有问题。虚拟机可以连接互联网。第二个端口配置为无需主机访问权限的外部 NIC。它直接分配给虚拟机和不同子域中的虚拟机地址,即 192.168.6.xxx。当我们想从虚拟机 ping 0(子域/IP)个设备时,这是可以的。但是当我们想从 0(子域/IP)个设备 ping 虚拟机时,有时全部超时,有时会完成所有请求,有时一半的请求超时一半也是可以的。

这可能是什么原因造成的?以下是 ping 输出(从 Hyper-V 主机到虚拟机的第 2 个(基于 6 个)IP):

C:\> ping 192.168.6.60

Pinging 192.168.6.60 with 32 bytes of data:
Request timed out.
Reply from 192.168.6.60: bytes=32 time<1ms TTL=63
Request timed out.
Reply from 192.168.6.60: bytes=32 time<1ms TTL=63

Ping statistics for 192.168.6.60:
    Packets: Sent = 4, Received = 2, Lost = 2 (50% loss).
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\> ping 192.168.6.44

Pinging 192.168.6.60 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.6.60:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss).

C:\> ping 192.168.6.44

Pinging 192.168.6.60 with 32 bytes of data:
Reply from 192.168.6.60: bytes=32 time<1ms TTL=63
Request timed out.
Reply from 192.168.6.60: bytes=32 time<1ms TTL=63
Request timed out.

Ping statistics for 192.168.6.60:
    Packets: Sent = 4, Received = 2, Lost = 2 (50% loss).
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

谢谢。

相关内容