为什么会出现 ping 重复现象,怎么解决。不过在 Windows 虚拟机上进行 ping 操作就没问题,来个大佬帮帮忙看看哪里配置有问题
在虚拟机 Rocky Linux (192.168.137.158) 上进行 ping
Last login: Sun Feb 16 09:30:16 2025 from 192.168.137.1
[microcharon@localhost ~]$ ping bing.com
PING bing.com (13.107.21.200) 56(84) 比特的数据。
64 比特,来自 13.107.21.200 (13.107.21.200): icmp_seq=1 ttl=110 时间=36.6 毫秒
64 比特,来自 13.107.21.200 (13.107.21.200): icmp_seq=1 ttl=110 时间=36.6 毫秒 (DUP!)
64 比特,来自 13.107.21.200 (13.107.21.200): icmp_seq=2 ttl=110 时间=36.5 毫秒
64 比特,来自 13.107.21.200 (13.107.21.200): icmp_seq=2 ttl=110 时间=36.5 毫秒 (DUP!)
64 比特,来自 13.107.21.200 (13.107.21.200): icmp_seq=3 ttl=110 时间=36.4 毫秒
64 比特,来自 13.107.21.200 (13.107.21.200): icmp_seq=3 ttl=110 时间=36.4 毫秒 (DUP!)
64 比特,来自 13.107.21.200 (13.107.21.200): icmp_seq=4 ttl=110 时间=36.5 毫秒
64 比特,来自 13.107.21.200 (13.107.21.200): icmp_seq=4 ttl=110 时间=36.5 毫秒 (DUP!)
^C
--- bing.com ping 统计 ---
已发送 4 个包, 已接收 4 个包, +4 重复, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 36.445/36.516/36.645/0.076 ms
[microcharon@localhost ~]$ cat /etc/resolv.conf
# Generated by NetworkManager
search mshome.net
nameserver 192.168.137.1
[microcharon@localhost ~]$ ip addr show
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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:20:83:16 brd ff:ff:ff:ff:ff:ff
inet 192.168.137.158/24 brd 192.168.137.255 scope global dynamic noprefixroute eth0
valid_lft 649695sec preferred_lft 649695sec
inet6 fe80::215:5dff:fe20:8316/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:20:83:29 brd ff:ff:ff:ff:ff:ff
inet 192.168.138.3/24 brd 192.168.138.255 scope global noprefixroute eth1
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fe20:8329/64 scope link noprefixroute
valid_lft forever preferred_lft forever
在 Windows Server 2025 (192.168.137.2) 上进行 ping
PS C:\Users\Administrator> ping bing.com
正在 Ping bing.com [13.107.21.200] 具有 32 字节的数据:
来自 13.107.21.200 的回复: 字节=32 时间=38ms TTL=110
来自 13.107.21.200 的回复: 字节=32 时间=36ms TTL=110
来自 13.107.21.200 的回复: 字节=32 时间=37ms TTL=110
来自 13.107.21.200 的回复: 字节=32 时间=36ms TTL=110
13.107.21.200 的 Ping 统计信息:
数据包: 已发送 = 4 ,已接收 = 4 ,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 36ms ,最长 = 38ms ,平均 = 36ms
PS C:\Users\Administrator> ipconfig
Windows IP 配置
以太网适配器 以太网 4:
连接特定的 DNS 后缀 . . . . . . . :
本地链接 IPv6 地址. . . . . . . . : fe80::ff1f:adde:ba03:6d42%18
IPv4 地址 . . . . . . . . . . . . : 192.168.137.2
子网掩码 . . . . . . . . . . . . : 255.255.255.0
默认网关. . . . . . . . . . . . . : 192.168.137.1
Hyper-V 创建的内部虚拟交换机“Internal Virtual Switch”,其网络适配器 IP 配置
PS C:\Users\Administrator> Get-NetIPAddress -InterfaceAlias "vEthernet (Internal Virtual Switch)"
IPAddress : fe80::1d6f:a2ca:16b:bafb%4
InterfaceIndex : 4
InterfaceAlias : vEthernet (Internal Virtual Switch)
AddressFamily : IPv6
Type : Unicast
PrefixLength : 64
PrefixOrigin : WellKnown
SuffixOrigin : Link
AddressState : Preferred
ValidLifetime : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource : False
PolicyStore : ActiveStore
IPAddress : 192.168.137.1
InterfaceIndex : 4
InterfaceAlias : vEthernet (Internal Virtual Switch)
AddressFamily : IPv4
Type : Unicast
PrefixLength : 24
PrefixOrigin : Manual
SuffixOrigin : Manual
AddressState : Preferred
ValidLifetime : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource : False
PolicyStore : ActiveStore
PS C:\Users\Administrator> Get-VMNetworkAdapter -VMName "Rocky Linux 9" | Select VMName,Name,MacAddress,IPAddresses
VMName Name MacAddress IPAddresses
------ ---- ---------- -----------
Rocky Linux 9 网络适配器 00155D208316 {192.168.137.158, fe80::215:5dff:fe20:8316}
Rocky Linux 9 网络适配器 00155D208329 {192.168.138.3, fe80::215:5dff:fe20:8329}
DHCP 相关配置
PS C:\Users\Administrator> Get-DhcpServerv4Scope
ScopeId SubnetMask Name State StartRange EndRange LeaseDuration
------- ---------- ---- ----- ---------- -------- -------------
192.168.137.0 255.255.255.0 Internal Vi... Active 192.168.137.2 192.168.137.254 8.00:00:00
PS C:\Users\Administrator> Get-DhcpServerv4Lease -ScopeId 192.168.137.0
IPAddress ScopeId ClientId HostName AddressState LeaseExpiryTime
--------- ------- -------- -------- ------------ ---------------
192.168.137.2 192.168.137.0 00-15-5d-20-83-09 WIN-LBFVIUCFGHO Active 2025/2/23 23:06:34
192.168.137.3 192.168.137.0 5d-20-83-1d-00-01... Active 2025/2/23 23:06:31
192.168.137.89 192.168.137.0 00-15-5d-20-83-0b Active 2025/2/23 23:06:34
192.168.137.133 192.168.137.0 00-15-5d-20-83-05 debian Active 2025/2/23 23:06:31
192.168.137.158 192.168.137.0 00-15-5d-20-83-16 Active 2025/2/23 23:06:29
192.168.137.167 192.168.137.0 00-15-5d-20-83-0d localhost Active 2025/2/23 23:06:49
192.168.137.227 192.168.137.0 00-15-5d-20-83-0c Active 2025/2/23 23:06:34
PS C:\Users\Administrator> Get-DhcpServerv4OptionValue -ScopeId 192.168.137.0
OptionId Name Type Value VendorClass UserClass PolicyName
-------- ---- ---- ----- ----------- --------- ----------
51 租约 DWord {691200}
3 路由器 IPv4Add... {192.168.137.1}
6 DNS 服务器 IPv4Add... {192.168.137.1}
DNS 转发器设置
PS C:\Users\Administrator> Get-DnsServerForwarder
UseRootHint : True
Timeout(s) : 3
EnableReordering : True
IPAddress : {119.29.29.29, 223.5.5.5}
ReorderedIPAddress : {119.29.29.29, 223.5.5.5}
NAT 网络配置
PS C:\Users\Administrator> Get-NetNat
Name : Primary-NAT
ExternalIPInterfaceAddressPrefix :
InternalIPInterfaceAddressPrefix : 192.168.137.0/24
IcmpQueryTimeout : 30
TcpEstablishedConnectionTimeout : 1800
TcpTransientConnectionTimeout : 120
TcpFilteringBehavior : AddressDependentFiltering
UdpFilteringBehavior : AddressDependentFiltering
UdpIdleSessionTimeout : 120
UdpInboundRefresh : False
Store : Local
Active : True
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.