One of the CentOS 6.5 configuration IP addresses in the virtual machine manually set
1. Manual Setup
(methods that do not use virtual machines to obtain IP automatically), the manual configuration method is as follows:
the System input command in the virtual machine is Sudu or administrative.
#vi/etc/sysconfig/network-scripts/ifcfg-eth0 Comment: VI edit the configuration file of the network card
Enter the above command after the return, open the configuration file, use the arrow keys to move the cursor to the last line, press the letter key "i", enter the editing mode, enter the following content:
ipaddr=192.168.10.11 #注释: IP address
netmask=255.255.255.0 #注释: Mask
gateway=192.168.10.254 #注释: Gateway
onboot=No change to onboot=Yes
bootproto=DHCP changed to bootproto=none
when you're done, press the ESC key in the upper-left corner of the keyboard, enter: Wq in the lower left of the screen, enter to save the configuration file.
the network service needs to be restarted after the command is
#Service network restart
after the network restarts, the eth0 IP is in effect, using the command #ifconfig eth0 to view or ifconfig
Normally, virtual machines can be connected to physical machines.
The physical machine is detected with the command ping 192.168.10.11, and the ping pass indicates that the IP is configured correctly.
The solid-machine segment is a 192.168.10.X network segment. To your own circumstances, you can set your own, to ensure that virtual machines and physical machines in the same network segment can be.
One of the CentOS 6.5 configuration IP addresses in the virtual machine manually set