当前位置: 首页 > OS > 正文

我们的文章会在微信公众号IT民工的龙马人生博客网站 ( www.htz.pw )同步更新 ,欢迎关注收藏,也欢迎大家转载,但是请在文章开始地方标注文章出处,谢谢!
由于博客中有大量代码,通过页面浏览效果更佳。

今天在折腾Win的WSFC集群时,在准备环境时,为了方便,于是在建虚拟机的时候直接使用cp的方式复制虚拟机,就这个复制就引起了下面这个奇怪的现象,大概现象如下:

从IP为200的服务器PING 201服务器无法PING通

 PS C:\Users\Administrator> Get-NetIPConfiguration


InterfaceAlias       : Ethernet0
InterfaceIndex       : 6
InterfaceDescription : Intel(R) 82574L Gigabit Network Connection
NetProfile.Name      : Network
IPv6Address          : fd0f:6007:9753:0:1482:dc53:49e6:1b03
                       240e:398:5f4:3f90:1482:dc53:49e6:1b03
IPv4Address          : 10.10.10.200
IPv6DefaultGateway   : fe80::11:32ff:fe29:2e5b
IPv4DefaultGateway   : 10.10.10.1
DNSServer            : 10.10.10.1
                       114.114.114.114 
                       
                       
PS C:\Users\Administrator> ping 10.10.10.201

Pinging 10.10.10.201 with 32 bytes of data:
Reply from 10.10.10.200: Destination host unreachable.

PS C:\Users\Administrator> ping 10.10.10.1

Pinging 10.10.10.1 with 32 bytes of data:
Reply from 10.10.10.1: bytes=32 time<1ms TTL=64
Reply from 10.10.10.1: bytes=32 time<1ms TTL=64 

但是从同网段其它的电脑上面可以正常PING通200

yihan:home yihan$ ping 10.10.10.201
PING 10.10.10.201 (10.10.10.201): 56 data bytes
64 bytes from 10.10.10.201: icmp_seq=0 ttl=128 time=6.305 ms
64 bytes from 10.10.10.201: icmp_seq=1 ttl=128 time=2.612 ms
64 bytes from 10.10.10.201: icmp_seq=2 ttl=128 time=2.121 ms
64 bytes from 10.10.10.201: icmp_seq=3 ttl=128 time=2.570 ms

201这台服务器是从200服务器直接复制过来的,在ESX打开201服务器前,删除老的网卡信息,新家网卡信息,MAC地址采用自动分配。其实在这里已考虑到MAC地址的原因,但是没有想到还是出问题了。

在自己的MacOS上面查看ARP信息。

yihan:home yihan$ arp -a
? (10.10.10.1) at 48:e:ec:dd:5f:7f on en0 ifscope [ethernet]
? (10.10.10.7) at 8a:5c:f2:74:a5:d8 on en0 ifscope [ethernet]
? (10.10.10.15) at 4:cf:8c:34:a2:3b on en0 ifscope [ethernet]
? (10.10.10.33) at 76:5f:4e:7d:cd:fa on en0 ifscope [ethernet]
? (10.10.10.65) at 0:11:32:8a:27:76 on en0 ifscope [ethernet]
? (10.10.10.77) at e0:98:6:f:3:d on en0 ifscope [ethernet]
? (10.10.10.93) at ce:8e:39:a9:81:7b on en0 ifscope [ethernet]
? (10.10.10.200) at 0:c:29:ef:9f:7d on en0 ifscope [ethernet]
? (10.10.10.201) at 0:c:29:ef:9f:7d on en0 ifscope [ethernet]
? (10.10.10.245) at ac:1f:6b:e8:a3:14 on en0 ifscope [ethernet]
? (10.10.10.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]
? (169.254.169.254) at (incomplete) on en0 [ethernet]

这里可以看到200和201的MAC地址一样,所以这里就知道是什么原因导致PING不同了,因为二层网络,是通过MAC来定位到服务器的。

修改MAC地址


 PS C:\Users\Administrator> Get-NetAdapter

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Ethernet0                 Intel(R) 82574L Gigabit Network Conn...       6 Up           00-0C-29-EF-9F-7D         1 Gbps



PS C:\Users\Administrator> Set-NetAdapterAdvancedProperty -Name "Ethernet0"  -DisplayValue "021A2B3C4D5E" 


Set-NetAdapterAdvancedProperty -Name "Ethernet0"  -DisplayValue "021A2B3C4D5E"


 PS C:\Users\Administrator> Get-NetAdapter

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Ethernet0                 Intel(R) 82574L Gigabit Network Conn...       6 Up           02-1A-2B-3C-4D-5E         1 Gbps 

确认最新的ARP信息

yihan:home yihan$ arp -a|grep -E "200|201"
? (10.10.10.200) at 2:1a:2b:3c:4d:5e on en0 ifscope [ethernet]
? (10.10.10.201) at 0:c:29:ef:9f:7d on en0 ifscope [ethernet]

——————作者介绍———————–
姓名:黄廷忠
现就职:Oracle中国高级服务团队
曾就职:OceanBase、云和恩墨、东方龙马等
电话、微信、QQ:18081072613
个人博客: (http://www.htz.pw)
CSDN地址: (https://blog.csdn.net/wwwhtzpw)
博客园地址: (https://www.cnblogs.com/www-htz-pw)


故障处理:Win平台无法特定机器之前无法PING通案例处理:等您坐沙发呢!

发表评论

gravatar

? razz sad evil ! smile oops grin eek shock ??? cool lol mad twisted roll wink idea arrow neutral cry mrgreen

快捷键:Ctrl+Enter