免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7216 | 回复: 2
打印 上一主题 下一主题

[开发环境] [help]虚拟机ping不通主机 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-10-22 14:43 |只看该作者 |倒序浏览
XP上装了VMWARE 8.0.0 build-471780, VM上装的是UBUNTU10.10. XP ping linux正常。但linux ping XP不通。选的是bridge。
在XP使用命令ipconfig显示如下:
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>ipconfig
Windows IP Configuration
Ethernet adapter VMware Network Adapter VMnet8:
        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.2.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet1:
        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.126.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

Ethernet adapter 本地连接:
        Media State . . . . . . . . . . . : Media disconnected

Ethernet adapter 无线网络连接:
        Connection-specific DNS Suffix  . : WGR612
        IP Address. . . . . . . . . . . . : 192.168.10.7
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.10.1
----------------------------------------------------------

在linux上使用ifconfig显示如下:
janock@janock-virtual-machine:~$ifconfig
eth0      Link encap:以太网  硬件地址 00:0c:29:60:4a:96  
          inet 地址:192.168.10.2  广播:192.168.10.255  掩码:255.255.255.0
          inet6 地址: fe80::20c:29ff:fe60:4a96/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  跃点数:1
          接收数据包:17 错误:0 丢弃:0 过载:0 帧数:0
          发送数据包:48 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:1000
          接收字节:2127 (2.1 KB)  发送字节:8459 (8.4 KB)
          中断:19 基本地址:0x2000

lo        Link encap:本地环回  
          inet 地址:127.0.0.1  掩码:255.0.0.0
          inet6 地址: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  跃点数:1
          接收数据包:8 错误:0 丢弃:0 过载:0 帧数:0
          发送数据包:8 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:0
          接收字节:480 (480.0 B)  发送字节:480 (480.0 B)
虚拟机"Edit"->"Virtual Network Editor"如下
--------------------------------------------------------------------------------------
|Virtual Network Editor                                                                                         |
|Name   |Type         |External Connection |Host Connection|DHCP    |Subnet Address|
|VMnet0  Bridged      Auto-bridging           -                       -            -                     |
|VMnet1  Host-only   -                             Connected         Enabled   192.168.126.0 |
|VMnet8  NAT           NAT                         Connected         Enabled   192.168.2.0    |
--------------------------------------------------------------------------------------
另,XP,ubuntu都可以上网。

论坛徽章:
0
2 [报告]
发表于 2011-10-23 18:22 |只看该作者
把 Ethernet adapter 本地连接:
        Media State . . . . . . . . . . . : Media disconnected

的IP地址改为与虚拟机在同一网段下  然后试试   
注意把防火墙关了(虚拟机和XP都要关)  虚拟机下用setup命令来关防火墙

论坛徽章:
0
3 [报告]
发表于 2011-10-24 19:52 |只看该作者
把 Ethernet adapter 本地连接:
        Media State . . . . . . . . . . . : Media disconnected

的I ...
junsihai 发表于 2011-10-23 18:22


嗯,谢谢。ubuntu默认是关了firewall。我把xp防火墙关了就OK。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP