[已解决]见鬼!除了网关,其他的都可以ping通。

Kvm、VMware、Virtualbox、Xen、Qemu 等
回复
gamexg
帖子: 72
注册时间: 2007-01-27 14:06
送出感谢: 0
接收感谢: 0

[已解决]见鬼!除了网关,其他的都可以ping通。

#1

帖子 gamexg » 2007-02-12 10:27

见鬼!除了网关,其他的都可以ping通。

系统为ubuntu 6.10
软件为:VMware Player 1.0.2 build-29634
虚拟机系统:XP
网关IP:192.168.1.1
本机IP:192.168.1.22
另一个真实机器IP:192.168.1.11
虚拟机IP:192.168.1.33
虚拟机网卡模式:bridged

虚拟机不能上网,在虚拟机执行
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\gamexg>ping 192.168.1.22

Pinging 192.168.1.22 with 32 bytes of data:

Reply from 192.168.1.22: bytes=32 time<1ms TTL=64
Reply from 192.168.1.22: bytes=32 time<1ms TTL=64
Reply from 192.168.1.22: bytes=32 time<1ms TTL=64
Reply from 192.168.1.22: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.1.22:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Documents and Settings\gamexg>ping 192.168.1.33

Pinging 192.168.1.33 with 32 bytes of data:

Reply from 192.168.1.33: bytes=32 time<1ms TTL=128
Reply from 192.168.1.33: bytes=32 time<1ms TTL=128
Reply from 192.168.1.33: bytes=32 time<1ms TTL=128
Reply from 192.168.1.33: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.1.33:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Documents and Settings\gamexg>ping 192.168.1.11

Pinging 192.168.1.11 with 32 bytes of data:

Reply from 192.168.1.11: bytes=32 time=4ms TTL=64
Reply from 192.168.1.11: bytes=32 time=1ms TTL=64
Reply from 192.168.1.11: bytes=32 time<1ms TTL=64
Reply from 192.168.1.11: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.1.11:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 4ms, Average = 1ms

C:\Documents and Settings\gamexg>ping 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.1.1:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\Documents and Settings\gamexg>

在主机上执行
gamexg@ubuntu:~$ uname -a
Linux ubuntu 2.6.17-10-386 #2 Tue Dec 5 22:26:18 UTC 2006 i686 GNU/Linux
gamexg@ubuntu:~$ 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.498 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.463 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.456 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.460 ms
64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=0.471 ms
64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=0.467 ms
64 bytes from 192.168.1.1: icmp_seq=7 ttl=64 time=0.468 ms
64 bytes from 192.168.1.1: icmp_seq=8 ttl=64 time=0.467 ms

--- 192.168.1.1 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7012ms
rtt min/avg/max/mdev = 0.456/0.468/0.498/0.029 ms
gamexg@ubuntu:~$ ping 192.168.1.11
PING 192.168.1.11 (192.168.1.11) 56(84) bytes of data.
64 bytes from 192.168.1.11: icmp_seq=1 ttl=64 time=2.62 ms
64 bytes from 192.168.1.11: icmp_seq=2 ttl=64 time=0.333 ms
64 bytes from 192.168.1.11: icmp_seq=3 ttl=64 time=0.368 ms

--- 192.168.1.11 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2006ms
rtt min/avg/max/mdev = 0.333/1.109/2.626/1.072 ms
gamexg@ubuntu:~$ ping 192.168.1.22
PING 192.168.1.22 (192.168.1.22) 56(84) bytes of data.
64 bytes from 192.168.1.22: icmp_seq=1 ttl=64 time=0.048 ms
64 bytes from 192.168.1.22: icmp_seq=2 ttl=64 time=0.041 ms
64 bytes from 192.168.1.22: icmp_seq=3 ttl=64 time=0.037 ms

--- 192.168.1.22 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.037/0.042/0.048/0.004 ms
gamexg@ubuntu:~$ ping 192.168.1.33
PING 192.168.1.33 (192.168.1.33) 56(84) bytes of data.
64 bytes from 192.168.1.33: icmp_seq=1 ttl=128 time=2.75 ms
64 bytes from 192.168.1.33: icmp_seq=2 ttl=128 time=0.350 ms
64 bytes from 192.168.1.33: icmp_seq=3 ttl=128 time=0.470 ms
64 bytes from 192.168.1.33: icmp_seq=4 ttl=128 time=0.340 ms

--- 192.168.1.33 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 0.340/0.978/2.755/1.027 ms
gamexg@ubuntu:~$

我的另一个虚拟机也PING不通网关。




运行
sudo -i
echo 1 > /proc/sys/net/ipv4/ip_forward
就可以解决问题
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙
送出感谢: 4 次
接收感谢: 256 次

#2

帖子 eexpress » 2007-02-12 10:51

没看。太多信息。
网关直接可以设置禁止ping的啊。又不奇怪
● 鸣学
purewind
帖子: 452
注册时间: 2006-11-18 15:40
送出感谢: 0
接收感谢: 0

#3

帖子 purewind » 2007-02-12 12:26

你打电话他不接,你打他有啥用啊
linux什么最重要?硬件要旧,软件要新!
Ubuntu什么最重要?源要全!网要快!
不是你不明白,是linux变化快
人品也很重要
gamexg
帖子: 72
注册时间: 2007-01-27 14:06
送出感谢: 0
接收感谢: 0

#4

帖子 gamexg » 2007-02-12 14:13

在真实计算机上可以PING通。
虚拟机不能上网。
gamexg
帖子: 72
注册时间: 2007-01-27 14:06
送出感谢: 0
接收感谢: 0

#5

帖子 gamexg » 2007-02-12 14:26

见鬼,现在又不能上网了。
回复

回到 “虚拟机和虚拟化”