[求助]vmware虚拟机中的LINUX共享上网

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
flyingwolfer
帖子: 10
注册时间: 2009-05-07 16:24

[求助]vmware虚拟机中的LINUX共享上网

#1

帖子 flyingwolfer » 2009-05-08 0:26

刚刚学习LINUX,在网上找了好多方法,可是都不行,请各位指教,不胜感激!

主机是WINDOWS XP 使用PPPOE拨号上网

Ethernet adapter VMware Network Adapter VMnet8:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet8
Physical Address. . . . . . . . . :
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.134.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 192.168.134.254
Primary WINS Server . . . . . . . : 192.168.134.2
Lease Obtained. . . . . . . . . . : 2009年5月7日 23:12:50
Lease Expires . . . . . . . . . . : 2009年5月7日 23:42:50

Ethernet adapter VMware Network Adapter VMnet1:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet1
Physical Address. . . . . . . . . :
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter 本地连接:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8169/8110 Family Gigabit Ethernet NIC
Physical Address. . . . . . . . . :
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.1.202
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 202.99.166.4
202.99.160.68
NetBIOS over Tcpip. . . . . . . . : Disabled

PPP adapter 宽带连接:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
Physical Address. . . . . . . . . : 00-53-45-00-00-00
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 125.38.54.222
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 125.38.54.222
DNS Servers . . . . . . . . . . . : 202.99.104.68
202.99.96.68
NetBIOS over Tcpip. . . . . . . . : Disabled


以下是我试过的上网方法:

方法一:NAT方式

1、先关闭虚拟机中的操作系统,回到虚拟机主界面
双击主界面右上方的的“Ethernet”,弹出“Network Adapter”对话框,选择“NAT”

2、启动虚拟机操作系统,设置IP为动态获取,即通过DHCP获得。

此时虚拟机中的操作系统用的是主机的IP,主机能够上网,那么虚拟机也能。

这种方法试过了,上不去

方法二:Host-only方式

1、先关闭虚拟机中的操作系统,回到虚拟机主界面
双击主界面右上方的的“Ethernet”,弹出“Network Adapter”对话框,选择“Host-only”

2、右击拨号上网的连接,打开PPPOE连接属性,选择“高级”,选择“允许其它网络用户通过此计算机的INTERNET连接来连接”
在“家庭网络”下拉框中,选择“VMware Network Adapter VMnet1”
VMware Network Adapter VMnet1虚拟网卡的IP会自动变为192.168.0.1
此时ping 192.168.0.1 能通即可。

3、进入vmware中,启动linux操作系统
用netconfig命令
将IP,设为192.168.0.2 (与虚拟网卡在同一网段)
网关为192.168.0.1 即VMware Network Adapter VMnet1虚拟网卡的IP地址
DNS设置为ISP的DNS,如202.99.104.68

4、重启网络:
#service network restart

此时,只要主机拨号上网后,虚拟机的系统就可以上网,且不用再拨号

这种方法也试过了,上不去
在使用这种方法时主机ping 192.168.0.1 时能ping通
ping 192.168.0.2 不能ping通
LINUX下 ping 192.168.0.1 不能ping通
ping 192.168.0.2 能ping通



请告诉我详细的上网设置方法,再次感谢
暗呜则山岳崩颓,叱咤则风云色变!
头像
libralibra
帖子: 401
注册时间: 2008-02-23 17:31
联系:

Re: [求助]vmware虚拟机中的LINUX共享上网

#2

帖子 libralibra » 2009-05-08 5:04

NAT怎么会不行呢?不解
保证你xp已经能上网
然后右键改虚拟机属性,改成NAT,启动,就行了

具体看
http://52xenos.blogspot.com/2009/03/vmware.html
My Blog: matlab, ubuntu, python
http://goo.gl/GDIO
头像
flyingwolfer
帖子: 10
注册时间: 2009-05-07 16:24

Re: [求助]vmware虚拟机中的LINUX共享上网

#3

帖子 flyingwolfer » 2009-05-08 10:47

NAT真的上不去
主机已经上网了

请看图
附件
a.jpg
9.jpg
8.jpg
7.jpg
6.jpg
5.jpg
4.jpg
3.jpg
2.jpg
1.jpg
暗呜则山岳崩颓,叱咤则风云色变!
回复