假设安装程序给vmnet1分配的IP地址为192.168.32.1(注意每次安装VMware IP地址是随机分配的,实际的情况与这里的例子会不同)。即虚拟网卡vmnet1属于网络192.168.32。因此,我们需要启动虚拟系统,设置网络属性,把虚拟系统的网卡\"AMD PCNET Family PCI Ethernet Adapter\"的IP地址设置为192.168.32.x (x为除1以外2~254之间的任意数字笔者把它设置为2),把网关设置为vmnet1的地址:192.168.32.1(如果不和外界真实网络通信的话网关可以不设)
windows 2000和XP 设置后立即生效,win98需要重新启动,linux需要重新启动网络服务:
#service network restart
在主系统上ping一下虚拟系统:
#ping -c 3 192.168.32.2
PING 192.168.32.2 (192.168.32.2) from 192.168.32.1 : 56(84) bytes of data.
64 bytes from 192.168.32.2: icmp_seq=1 ttl=128 time=6.91 ms
64 bytes from 192.168.32.2: icmp_seq=2 ttl=128 time=0.425 ms
64 bytes from 192.168.32.2: icmp_seq=3 ttl=128 time=0.527 ms
--- 192.168.32.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
再在虚拟系统上ping主系统:
C:\\>;ping 192.168.32.1
Pinging 192.168.32.1 with 32 bytes of data:
Reply from 192.168.32.1: bytes=32 time<10ms TTL=64
Reply from 192.168.32.1: bytes=32 time<10ms TTL=64
Reply from 192.168.32.1: bytes=32 time<10ms TTL=64
Reply from 192.168.32.1: bytes=32 time<10ms TTL=64
Ping statistics for 192.168.32.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms