我有两台服务器。
操作系统:Ubuntu Server 12.04
服务器1:HP Dl380
服务器2:刀片服务器(不是虚拟机)
服务器1 IP:202.xxx.xxx.11
服务器2 IP:202.xxx.xxx.25
Server1 和 Server2 处于同一网段并使用同一台交换机,但 Server1 无法连接到 Server2,Server2 也无法连接到 Server1。如何解决此问题?
服务器1 ping 服务器2
PING 202.xxx.xxx.25 (202.xxx.xxx.25) 56(84) bytes of data.
From 202.xxx.xxx.11 icmp_seq=1 Destination Host Unreachable
服务器2 ping 服务器1
PING 202.xxx.xxx.11 (202.xxx.xxx.11) 56(84) bytes of data.
From 202.xxx.xxx.25 icmp_seq=1 Destination Host Unreachable
服务器1arp -a
? (202.a.b.c) at 00:1a:64:a1:2a:22 [ether] on eth0
?......
找不到 server2
服务器2 arp -a
? (202.a.b.c) at 00:1a:64:a1:2a:22 [ether] on eth0
? (202.xxx.xxx.11) at <incomplete> on eth0
#can not get Server IP.
配置:
服务器1:
#/etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
#iface eth0 inet dhcp
#auto eth1
#iface eth1 inet dhcp
iface eth0 inet static
address 202.XXX.XXX.11
netmask 255.255.255.128
gateway 202.XXX.XXX.1
dns-nameservers 202.XXX.XXX.XXX
服务器2:
#/etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
#iface eth0 inet dhcp
#auto eth1
#iface eth1 inet dhcp
iface eth0 inet static
address 202.XXX.XXX.25
netmask 255.255.255.128
gateway 202.XXX.XXX.1
dns-nameservers 202.XXX.XXX.XXX
服务器1 ifconfig
eth0 Link encap:Ethernet HWaddr address
inet addr:202.xxx.xxx.11 Bcast:202.xxx.xxx.127 Mask:255.255.255.128
inet6 addr: address Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5528 errors:0 dropped:2352 overruns:0 frame:0
TX packets:8381 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:517812 (517.8 KB) TX bytes:1095962 (1.0 MB)
Interrupt:16 Memory:f4000000-f4012800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2377 errors:0 dropped:0 overruns:0 frame:0
TX packets:2377 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:737914 (737.9 KB) TX bytes:737914 (737.9 KB)
服务器2 ifconfig
eth0 Link encap:Ethernet HWaddr address
inet addr:202.xxx.xxx.25 Bcast:202.xxx.xxx.127 Mask:255.255.255.128
inet6 addr: address Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6057 errors:0 dropped:723 overruns:0 frame:0
TX packets:7872 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:489060 (489.0 KB) TX bytes:988220 (988.2 KB)
Interrupt:16 Memory:dfa00000-dfa20000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:285 errors:0 dropped:0 overruns:0 frame:0
TX packets:285 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:25222 (25.2 KB) TX bytes:25222 (25.2 KB)
#Manufacturer direct installation KVM, direct use default Settings, no change
virbr0 Link encap:Ethernet HWaddr 42:12:91:df:da:ac
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
服务器1 lspci -nnk | grep -iA2 净
03:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme II BCM5709 Gi
gabit Ethernet [14e4:1639] (rev 20)
Subsystem: Hewlett-Packard Company NC382i Integrated Multi-port PCI Expr
ess Gigabit Server Adapter [103c:7055]
Kernel driver in use: bnx2
--
03:00.1 Ethernet controller [0200]: Broadcom Corporation NetXtreme II BCM5709 Gi
gabit Ethernet [14e4:1639] (rev 20)
Subsystem: Hewlett-Packard Company NC382i Integrated Multi-port PCI Expr
ess Gigabit Server Adapter [103c:7055]
Kernel driver in use: bnx2
--
04:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme II BCM5709 Gi
gabit Ethernet [14e4:1639] (rev 20)
Subsystem: Hewlett-Packard Company NC382i Integrated Multi-port PCI Expr
ess Gigabit Server Adapter [103c:7055]
Kernel driver in use: bnx2
--
04:00.1 Ethernet controller [0200]: Broadcom Corporation NetXtreme II BCM5709 Gi
gabit Ethernet [14e4:1639] (rev 20)
Subsystem: Hewlett-Packard Company NC382i Integrated Multi-port PCI Expr
ess Gigabit Server Adapter [103c:7055]
Kernel driver in use: bnx2
服务器2
nection [8086:10d3]
Subsystem: Super Micro Computer Inc Device [15d9:0000]
Kernel driver in use: e1000e
--
0a:00.0 Ethernet controller [0200]: Intel Corporation 82574L Gigabit Network Con
nection [8086:10d3]
Subsystem: Super Micro Computer Inc Device [15d9:0000]
Kernel driver in use: e1000e
我可以在互联网上 ping 通 Server1 和 Server2。