Host XP, virtual machine Linux
I. Nat
1. Select NAT (Vm-> setting-> network ADAP...) in the network connection mode of the VM ..)
2. view the gateway IP address of the vmnet8 Gateway (edit-> Virtual Network Editor-> net settings) of the virtual machine:
For example, 192.168.197.2
3. Set the host's VMware network adapter vmnet8 so that its IP address is 192.168.197.1
4. Set the Linux IP address, gateway, and mask on the virtual machine. VI/etc/sysconfig/network-scripts/ifcfg-eth0
Device = eth0
Bootproto = static
Onboot = Yes
Gateway = 192.168.197.2
Ipaddr = 192.168.197.9
Netmask = 255.255.255.0
5. Set DNS. VI/etc/resolv. conf
Search localdomain
Nameserver 192.168.197.2
6. Verify. Ping 192.168.197.1 Ping www.taobao.com
Ii. Bridge Mode bridged
1. Select bridged (Vm-> setting-> network ADAP...) in the network connection mode of the VM ..)
2. Choose Edit> Virtual Network editor --- "vmnet0" from the VMware menu ",
Select a real network adapter for bridging (do not select it automatically)
3. Set the Linux IP address on the Virtual Machine. If the local connection of the host is a fixed address, set the IP address of the virtual machine to the same as the local connection.
Network segment. If the local connection of the host is automatically obtained, the eth0 of the VM is also set to automatically obtained:
Device = eth0
Bootproto = DHCP
Onboot = Yes
4. Verify. Ping 192.168.197.1 Ping www.taobao.com