Ubuntu9.04 在Vmware-6.5下的上外网设置

来源:互联网 发布:php故障报修系统 源码 编辑:程序博客网 时间:2024/04/28 17:54

环境

主机系统:

(1)XP

(2)IP:192.168.1.100

虚拟机系统:

(1)VM6.5 + ubuntu9.04

(2)虚拟机选择网络方式为:

   Host-only:A private network shared with the host

 

  1. XP下的配置

(1)禁用虚拟网卡VMnet8

(2)在windows下将本地的网卡(不是VMnet1VMnet8)设置为允许共享。

   此时,VMnet1IP自动被配置为:

   IP地址:192.168.0.1

          子网掩码:255.255.255.0

 

  1. 在ubuntu9.04下的配置

(1)点击图中的红色框图标,打开网络配置。

 

(2)双击Auto eth0,配置IP地址和网关。网关填192.168.0.1IP地址要和网关在同网段。注意填写当地的DNS。

(3)点击“应用”。

 

(4)suroot,用下面的命令重启网络。

     # ifconfig eth0 down

     # ifconfig eth0 up

 

  (5)ping一下看看是不是网络通了。

 

     -- ping 网关

     root@ysh-Ubuntu:/home/ysh# ping 192.168.0.1

     PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

     64 bytes from 192.168.0.1: icmp_seq=1 ttl=128 time=0.202 ms

     64 bytes from 192.168.0.1: icmp_seq=2 ttl=128 time=0.165 ms

 

     -- ping xp主机

     root@ysh-Ubuntu:/home/ysh# ping 192.168.1.100

     PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.

     64 bytes from 192.168.1.100: icmp_seq=1 ttl=128 time=0.232 ms

     64 bytes from 192.168.1.100: icmp_seq=2 ttl=128 time=0.182 ms

 

 

     -- ping 腾讯网站

     PING www.qq.com (124.115.3.232) 56(84) bytes of data.

     64 bytes from 124.115.3.232: icmp_seq=1 ttl=57 time=626 ms

     64 bytes from 124.115.3.232: icmp_seq=2 ttl=57 time=643 ms

 

     -- xp主机ping虚拟机ip也能ping通,图略。

原创粉丝点击