On-line collection CentOS7 configuration static IP method, basically is said in the/etc/sysconfig/network-scripts/ifcfg-eth0 file to do the following configuration
Type=ethernethwaddr=xx: Xx:xx:xx:xx:xx#only:none, BOOTP, or Dhcpbootproto=Nonedefroute=Yespeerdns=yespeerroutes=Yesipv4_failure_fatal=no# disabling Ipv6ipv6init=noipv6_autoconf=Noipv6_defroute=Noipv6_peerdns=noipv6_peerroutes=Noipv6_failure_fatal=no# nic name=Eth0uuid=Xxxxxxxxyyyyyyyyzzzzzzzzzzzdevice=eth0# Boot auto-start onboot=yes# Configuring static IPIPADDR0=192.168.1.210GATEWAY=192.168.1.1NETMASK=255.255.255.0DNS1=202.118.176.2
Among them, Bootproto only none,bootp,dhcp three options, no static option, select None to be able to do static IP configuration.
Once configured, restart the network with the ' Systemctl Restart Network ' command, and then use the ifconfig or IP addr command to view the IP address information:
The result is always more out 192.168.1.117 this dynamic IP to come.
The solution is not to be baffled. And then finally asked in Http://unix.stackexchange.com/questions/293689/why-cant-i-configure-a-static-ip-on-my-centos7-system, Found the answer:
To turn off NetworkManager:
Systemctl Stop networkmanagersystemctl Disable networkmanagersystemctl restart network
In this way, there is only one static IP 192.168.1.210.
CentOS 7 Operations Management notes (one)----resolve the issue of configuring static IP or dynamic IP addresses