Linux 網路不通先檢查 ARP
通常是將實體網路更換 switch PORT 或是更換 IP 後,發現網路不通的狀況..
- 可以先用 arping <gateway ip> 讓 switch 更新 arp table
[root@pd920 ~]# arping 192.168.11.254 ARPING 192.168.11.254 from 220.130.131.239 eth0 Unicast reply from 192.168.11.254 [00:90:1A:82:83:FE] 41.405ms Unicast reply from 192.168.11.254 [00:90:1A:82:83:FE] 41.848ms Unicast reply from 192.168.11.254 [00:90:1A:82:83:FE] 41.642ms Unicast reply from 192.168.11.254 [00:90:1A:82:83:FE] 38.575ms Unicast reply from 192.168.11.254 [00:90:1A:82:83:FE] 39.111ms Sent 5 probes (1 broadcast(s)) Received 5 response(s)
- 用 arp -a 看看本身的 arp table 是否正確
[root@pd920 ~]# arp -a 220-130-131-254.HINET-IP.hinet.net (220.130.131.254) at 00:90:1A:82:83:FE [ether] on eth0 ? (192.168.11.254) at 00:90:1A:82:83:FE [ether] on eth0 www.ichiayi.com (220.130.131.240) at 00:13:74:00:5C:xx [ether] on eth0 vm-mail.ichiayi.com (192.168.11.236) at 00:0C:29:48:E8:13 [ether] on eth1
如果發現本身的 arp table 錯亂 ..
Exp. 出現兩筆相同 ip 不同 mac
就使用 server network restart 清除 arp table 重新自動建立
Exp. 出現兩筆相同 ip 不同 mac
就使用 server network restart 清除 arp table 重新自動建立