Centos virtual machine can not find the IP address
----------------- The following figure there ip address resolve -----------------------
1. Check the IP network and gateway
>> 1. View the Virtual Network Editor
>> 2. Modify ip address
>> 3. Check gateway, remember
2. Configure the network ip address
>> 1. View the current ip basic syntax :
[root@hadoop102 /]# ifconfig
------ input terminal command window
[root@hadoop102 /]#vim /etc/udev/rules.d/70-persistent-net.rules
Enter the following page NETWOR, delete eth0 the bank; the eth1 revised to eth0 , while physical copy ip address
>> 2. Modify the IP address
[root@hadoop102 /]#vim /etc/sysconfig/network-scripts/ifcfg-eth0
We need to modify the contents 5 entry: did not add up
IPADDR=192.168.11.106 红字和网关一致,最后一个字节,大于2(106)// 修改的就是添加的ip
GATEWAY=192.168.11.2 和网关一致
ONBOOT=yes
BOOTPROTO=static
DNS1=8.8.8.8
------------------------------------------修改前----------------------------------
-------------------------------------------修改后--------------------------------------
>> 3. 执行 service network restart
>>4. 如果报错,reboot,重启虚拟机
>>5.用自己的电脑ping,虚拟机的ip