CentOS network settings in VMware, vmwarecentos Network
CentOS network settings in VMware
Background:
The laptop has two NICs:
1. The wired network adapter connects to the company's intranet and only configures the Intranet ip address and subnet mask;
2. Wireless Network Card, 4G wireless router connected, dhcp automatic configuration.
Problem:
After CentOS 5.6 is installed in VMware, CentOS cannot connect to the Internet.
Solution:
1. Select CentOS in VMware, right-click virtual machine settings, select network adapter, select bridge mode, and select copy physical network connection status;
2. choose "edit"> "Virtual Network Editor" from the menu in the upper left corner of VMware. Select "VMnet0" and the VMnet information below. Select "Bridge Mode", and select "Wireless" from the "bridge to connect to the Internet". OK
3. Edit CentOS Network Configuration:
Vim/etc/sysconfig/network-scripts/ifcfg-eth0
,
Content is
DEVICE = eth0 HWADDR = Virtual NIC address, you do not need to change ONBOOT = yes BOOTPROTO = static USERCTL = yes PEERDNS = yes route 6init = no NM_CONTROLLED = yes TYPE = Ethernet NETMASK = 255.255.255.0 IPADDR = 192.168.0.44 // set the same network segment as the router lan GATEWAY = 192.168.0.1 // set the router address here
4. Restart the network service command
Service network restart
5. ping www.baidu.com.