Linux (CentOS) set static IP

Source: Internet
Author: User

Linux set static IP when the error has been: Job for Network.service failed. See ' systemctl status Network.service ' and ' journalctl-xn ' for details. Hang me for hours, write an essay here, and hope that friends who meet this problem don't waste their time on this issue,

Input in Terminal: Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Configuration file: Save after configuration

Then enter the IP addr to see if Link/ether 00:0c:29:b5:4f:58 and the hwaddr (MAC address) in your ifcfg-eno16777736 file are the same as the Mac shown after the IP a command. Two MAC addresses remain the same.

Then use the service network restart or systemctl restart Network.service command, which may not take effect immediately. Use Ifdown eno16777736, then Ifup eno16777736.

  

Linux (CentOS) set static IP

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.