Nic does not start when CentOS is started

Source: Internet
Author: User

Nic does not start when CentOS is started

If you encounter such a problem today, the newly installed Centos does not automatically start the NIC when it is started. You can only use the command: ifup eth0 to start the NIC. However, you need to repeat this operation when you start the next time, it is particularly troublesome. It was found that by modifying the NIC (ifcfg-eth0) parameters to change to boot, that is, to open the ifcfg-eth0 file.

  1. [Root @ localhost ~] # Vim/etc/sysconfig/network-scripts/ifcfg-eth0
  2. DEVICE = eth0
  3. HWADDR = 08: 00: 27: fa: 47: 4c
  4. NM_CONTROLLED = yes
  5. ONBOOT = yes ------------------ modify the following content to yes to enable automatic startup.
  6. BOOTPROTO = dhcp
  7. DNS2 = 222.85.85.85
  8. TYPE = Ethernet
  9. DNS1 = 222.88.88.88
  10. USERCTL = no
  11. PEERDNS = yes
  12. IPV6INIT = no

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.