CentOS 7 Operations Management notes (one)----resolve the issue of configuring static IP or dynamic IP addresses

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.