Internet是指"互连网",好象这句话说的有点多余,不过确实有很多人对他有错误的理解,"互连网"是指一个个网络互连,而不是像有些人想象的那样把一台台电脑杂乱无章的互连。当我们需要用电脑和远方的电脑通讯的时候,先把本地电脑组成一个网络,当然,远方的电脑也要组成一个网络,在把这两个网络"互连"起来,组成"互连网"。用电话线和MODEM拨号上网的时候是通过电话线先把自己的电脑连到ISP(Internet Service Provider 网络服务提供商)的网络中,再经过ISP的网络和世界各地的电脑通信。
vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01 inet addr:192.168.221.1 Bcast:192.168.221.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:191 errors:0 dropped:0 overruns:0 frame:0 TX packets:63 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
在第二行可以看到安装程序给vmnet1分配的IP地址为192.168.221.1(注意每次安装VMware IP地址是随机分配的,实际的情况与这里的例子会不同)。即虚拟网卡vmnet1属于网络192.168.221。因此,我们需要启动虚拟系统,设置网络属性,把虚拟系统的网卡"AMD PCNET Family PCI Ethernet Adapter"的IP地址设置为192.168.221.x (x为除1以外2~254之间的任意数字笔者把它设置为2),把网关设置为vmnet1的地址:192.168.221.1(如果不和外界真实网络通信的话网关可以不设)
windows 2000和XP 设置后立即生效,win98需要重新启动,linux需要重新启动网络服务: #service network restart
在主系统上ping一下虚拟系统: #ping -c 3 192.168.221.2
PING 192.168.221.2 (192.168.221.2) from 192.168.221.1 : 56(84) bytes of data. 64 bytes from 192.168.221.2: icmp_seq=1 ttl=128 time=6.91 ms 64 bytes from 192.168.221.2: icmp_seq=2 ttl=128 time=0.425 ms 64 bytes from 192.168.221.2: icmp_seq=3 ttl=128 time=0.527 ms
--- 192.168.221.2 ping statistics --- 3 packets transmitted, 3 received, 0% loss, time 2001ms rtt min/avg/max/mdev = 0.425/2.623/6.917/3.036 ms
yeah!通了!
再在虚拟系统上ping主系统:
C:\>ping 192.168.221.1
Pinging 192.168.221.1 with 32 bytes of data:
Reply from 192.168.221.1: bytes=32 time<10ms TTL=64 Reply from 192.168.221.1: bytes=32 time<10ms TTL=64 Reply from 192.168.221.1: bytes=32 time<10ms TTL=64 Reply from 192.168.221.1: bytes=32 time<10ms TTL=64
Ping statistics for 192.168.221.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms