The newly installed virtual machines are often unable to connect to the network, and this article describes how to configure network information on the CentOs6.3 system.
1, the Windows System shortcut key windows+r, input cmd and OK, open the Black window
2. Enter ipconfig in the Black window and press ENTER
3. Record the IPv4 address and default gateway under VMnet8, as
After the VMware software is installed, the operating system will virtual two virtual network cards, VMnet1 and VMnet8
4. Enter the command in the virtual machine and press ENTER
vim /etc/sysconfig/network-scripts/ifcfg-eth0
5, enter the following information in this file, and save the exit
- Bootproto=none----------------means setting a static IP address
- HWADDR------------------------The MAC address of the network card, without modification, keep the default
- nm_controlled-----------------device eth0 can be managed by the Network Manager graphical management tool, without changing the default
- Onboot=yes--------------------Boot, fill Yes
- Type=ethernet-----------------Network type, do not change
- UUID--------------------------do not change
- IPADDR------------------------The virtual machine IP address (based on the Vmnet8 information recorded above, fill in the default gateway with the IP address of the network segment, such as 192.168.25.3, but do not fill in 192.168.25.11 is already occupied. If you have more than one virtual machine installed, remember that the IP addresses of each are not duplicated.
- NETMASK-----------------------Subnet mask, fill 255.255.255.0
- Gateway address-----------------------Fill in the Vmnet8 to see the information, I fill 192.168.25.2
- Ipv6init---------------------whether to prohibit IPv6, by default, no tube
- Userctl----------------------whether to allow non-root users to control the device, no means that only the root user can modify
- DNS1-------------------------The first DNS server to fill out the gateway address
- DNS2-------------------------A second DNS server that can be filled 8.8.8.8
6, previous step configuration information fill in Save and exit, restart the Network service, enter the command
service network restart
7. Enter the command ifconfig to view the network information just configured
8, use ping command, can ping to indicate network configuration complete
Linux (CentOs6.3) network configuration