1) Set the virtual machine to use bridging mode.
Open the new virtual machine and click Network adapter. Select Bridge mode.
2) Set the VMware Network to work in bridged mode.
From the VMware menu, choose edit = Virtual Network editor. Select VMnet0, in bridge connection mode, to bridge to a wireless network or to a local connection. Since I am using a laptop, bridge to the wireless network, so bridge to "1x1 11b/g/n Wireless LAN PCI Express half Mini cart adapter".
3) query the LAN gateway.
In native windows, open cmd. Enter in CMD. Ipconfig/all. You can find the gateway to the 1x1 11b/g/n Wireless LAN PCI Express half Mini cart adapter. such as the gateway is: 192.168.1.1.
4) Configure the virtual machine gateway. Open the CentOS command line.
# vi/etc/sysconfig/network
5) Configure the CentOS static IP.
Here we assume that the virtual machine is configured with a static IP of: 192.168.1.211. Use Google's free dns:8.8.8.8.
Device=eth0
Hwaddr=00:0c:29:cb:47:28
Type=ethernet
uuid=ea0bc70a-c20a-4507-b2ed-f9091a160f8c
Onboot=yes
Nm_controlled=yes
#BOOTPROTO =DHCP
Bootproto=static
ipaddr=192.168.1.211
netmask=255.255.255.0
Ipv6init=no
dns1=8.8.8.8
6) Restart the network card.
# Service Network Restart
7) Detect the network is normal.
1) Whether the virtual machine can ping the extranet. (Can ping through www.baidu.com).
2) Whether the local host can ping the virtual machine in CMD. (Can ping through 192.168.1.211).
Copyright Notice:
1) original works, from "Clevercode's blog" , please be sure to mention the following original address when reproduced , otherwise hold the copyright legal responsibility.
2) Original address : http://blog.csdn.net/clevercode/article/details/45935073 ( reprint must indicate this address ).
3) Linux common software Installation and configuration--Directory : http://blog.csdn.net/clevercode/article/details/45740431 (directory continued to update, concern please bookmark).
4) Blog column address (Linux common software Installation and configuration): http://blog.csdn.net/column/details/linuxsoftwareinstall.html (blog continues to increase, concern please bookmark).
5) welcome everyone to pay attention to my blog more wonderful content: Http://blog.csdn.net/CleverCode.
Configure static IP for CentOS under bridge mode under VMware