Centos6.5 minimal in VMware uses NAT mode to connect to the Internet
As most companies and schools now implement the binding of IP addresses and host Mac addresses, it is necessary to apply in advance if you use bridging mode to give virtual machines access to the Internet. In order not to make a big fight for virtual machines to access the Internet, we can use NAT mode to give virtual machines access to the Internet. NAT mode can meet most of the requirements except that it cannot access other hosts in the local area network like bridging mode. Here is how centos6.5 minimal uses NAT to surf the Internet.
Open the virtual machine, enter the account number and password to log in to the system
two。 Click Virtual Machine, select Settings, open the Virtual Machine Settings dialog box, under the hardware tab, click the Network Adapter item, select NAT Mode on the right, OK.
3. Modify the configuration file to boot. Enter the command at the terminal and open the configuration file ifcfg-eth0 using the vi editor
# vi / etc/sysconfig/network-scripts/ifcfg-eth0
Press the "I" key to enter vi editing mode and modify the following. After the modification, press the "Esc" key to enter vi command mode, enter ": wq" to save and exit.
4. Restart the network service and enter the command
# service network restart
6. View IP information and enter commands
# ifconfig-a
7. Test connectivity, enter command
# ping www.baidu.com
Congratulations! You can surf the Internet now! Have fun!