Unable to access the Internet after the centos Nic is changed

Source: Internet
Author: User
After centos6 changes the NIC, the NIC name is auto-incrementing. For example, if it was originally eth0 and changed to eth1 after the change, the original eth0 cannot be used. you need to modify the File: When the NIC changes. when the network card is added. or when you change the network card. this file will change. modify the mac or eth * name. to adjust. 1. Vi/etc/udev/rules. d/70-persistent-net.rules physical machine settings: # After PCIdevic centos6 changes the NIC, the NIC name is auto-incrementing. For example, if it was originally eth0 and changed to eth1, the original eth0 cannot be used. you need to modify the file:
When the NIC changes. when the NIC is added or the NIC is changed, the file will change. modify the mac or eth * name accordingly.
1. Vi/etc/udev/rules. d/70-persistent-net.rules
Physical machine settings:
# PCI device 0x10ec: 0x8139 (8139too)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: e0: 4c: 90: 06: 83 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0"
# PCI device 0x10ec: 0x8168 (r8169)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: e0: 4c: 10: cd: AB ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth1"
 
VM settings:
# PCI device 0x1022: 0x2000 (pcnet32)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 37: f8: 69 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0"

# PCI device 0x1022: 0x2000 (pcnet32)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 37: f8: 73 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth1"
2. change device = eth * in vi/etc/sysconfig/network-scripts/ifcfg-eth * to the value corresponding to MAC.
3. after modification, remember to restart reboot to make the modification take effect.
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.