CentOS_5配置XEN虚拟网络后的问题
资料简介:
在虚拟系统管理器中配置XEN虚拟机的虚拟网络后,重启发现SSH上不去了!冒汗若干小时。。。
可以PING通网关:
[root@localhost xen]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.778 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.066 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.051 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.051 ms
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.051/0.236/0.778/0.313 ms
也可以PING通外网:
[root@localhost xen]# ping 126.com
PING 126.com (220.181.12.218) 56(84) bytes of data.
64 bytes from m12-218.163.com (220.181.12.218): icmp_seq=1 ttl=54 time=44.6 ms
64 bytes from m12-218.163.com (220.181.12.218): icmp_seq=2 ttl=54 time=42.9 ms
64 bytes from m12-218.163.com (220.181.12.218): icmp_seq=3 ttl=54 time=42.5 ms
--- 126.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 42.500/43.388/44.694/0.958 ms
但是PING不通内网的其它机器:
[root@localhost xen]# ping 192.168.1.166
PING 192.168.1.166 (192.168.1.166) 56(84) bytes of data.
From 192.168.1.1 icmp_seq=1 Destination Host Unreachable
From 192.168.1.1 icmp_seq=2 Destination Host Unreachable
From 192.168.1.1 icmp_seq=3 Destination Host Unreachable
--- 192.168.1.166 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5035ms
, pipe 3
查看网卡状态,没有问题:
[root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:7E:80:0F
inet addr:192.168.1.81 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe7e:800f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:83044 errors:0 dropped:0 overruns:0 frame:0
TX packets:2631 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7819591 (7.4 MiB) TX bytes:204902 (200.0 KiB)
重启网络服务,发现有点情况:
[root@localhost xen]# service network restart
正在关闭接口 eth0: [确定]
关闭环回接口: [确定]
[确定]
弹出环回接口: [确定]
弹出界面 eth0:
正在决定 eth0 的 IP 信息...完成。
[确定]
正常的话,重启显示的信息应该如下:
[root@localhost xen]# service network restart
正在关闭接口 eth0: [确定]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth0:
正在决定 eth0 的 IP 信息...完成。
[确定]
打开虚拟系统管理器:
单击“编辑”-->“主机详情”,发现虚拟网络中的“test”是处于活跃状态的(这是之前新添加的一个虚拟网络),于是把它删除,状态变为“不活跃”:
OK,重启服务器网络:
[root@localhost xen]# service network restart
正在关闭接口 eth0: [确定]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth0:
正在决定 eth0 的 IP 信息...完成。
[确定]
这回貌似正常了,赶紧PING下本机:
[root@localhost xen]# ping 192.168.1.166
PING 192.168.1.166 (192.168.1.166) 56(84) bytes of data.
64 bytes from 192.168.1.166: icmp_seq=1 ttl=64 time=2.67 ms
64 bytes from 192.168.1.166: icmp_seq=2 ttl=64 time=0.461 ms
64 bytes from 192.168.1.166: icmp_seq=3 ttl=64 time=0.436 ms
--- 192.168.1.166 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.436/1.191/2.678/1.051 ms
再PING下外网,OK,一切正常了!
可以PING通网关:
[root@localhost xen]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.778 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.066 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.051 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.051 ms
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.051/0.236/0.778/0.313 ms
也可以PING通外网:
[root@localhost xen]# ping 126.com
PING 126.com (220.181.12.218) 56(84) bytes of data.
64 bytes from m12-218.163.com (220.181.12.218): icmp_seq=1 ttl=54 time=44.6 ms
64 bytes from m12-218.163.com (220.181.12.218): icmp_seq=2 ttl=54 time=42.9 ms
64 bytes from m12-218.163.com (220.181.12.218): icmp_seq=3 ttl=54 time=42.5 ms
--- 126.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 42.500/43.388/44.694/0.958 ms
但是PING不通内网的其它机器:
[root@localhost xen]# ping 192.168.1.166
PING 192.168.1.166 (192.168.1.166) 56(84) bytes of data.
From 192.168.1.1 icmp_seq=1 Destination Host Unreachable
From 192.168.1.1 icmp_seq=2 Destination Host Unreachable
From 192.168.1.1 icmp_seq=3 Destination Host Unreachable
--- 192.168.1.166 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5035ms
, pipe 3
查看网卡状态,没有问题:
[root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:7E:80:0F
inet addr:192.168.1.81 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe7e:800f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:83044 errors:0 dropped:0 overruns:0 frame:0
TX packets:2631 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7819591 (7.4 MiB) TX bytes:204902 (200.0 KiB)
重启网络服务,发现有点情况:
[root@localhost xen]# service network restart
正在关闭接口 eth0: [确定]
关闭环回接口: [确定]
禁用 IPv4 包转送: net.ipv4.ip_forward = 0
[确定]
弹出环回接口: [确定]
弹出界面 eth0:
正在决定 eth0 的 IP 信息...完成。
[确定]
正常的话,重启显示的信息应该如下:
[root@localhost xen]# service network restart
正在关闭接口 eth0: [确定]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth0:
正在决定 eth0 的 IP 信息...完成。
[确定]
打开虚拟系统管理器:
单击“编辑”-->“主机详情”,发现虚拟网络中的“test”是处于活跃状态的(这是之前新添加的一个虚拟网络),于是把它删除,状态变为“不活跃”:
OK,重启服务器网络:
[root@localhost xen]# service network restart
正在关闭接口 eth0: [确定]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth0:
正在决定 eth0 的 IP 信息...完成。
[确定]
这回貌似正常了,赶紧PING下本机:
[root@localhost xen]# ping 192.168.1.166
PING 192.168.1.166 (192.168.1.166) 56(84) bytes of data.
64 bytes from 192.168.1.166: icmp_seq=1 ttl=64 time=2.67 ms
64 bytes from 192.168.1.166: icmp_seq=2 ttl=64 time=0.461 ms
64 bytes from 192.168.1.166: icmp_seq=3 ttl=64 time=0.436 ms
--- 192.168.1.166 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.436/1.191/2.678/1.051 ms
再PING下外网,OK,一切正常了!
2011-10-25
浏览4454
下载0