Change eth0 Nic name to eth1 in Ubuntu

Source: Internet
Author: User
This method is used to solve the problem where the new Nic is changed to eth1 and the source Nic name is eth0, which cannot be used by the new Nic. It can also be used to rename a nic. After the nic mac address is changed, find the NIC in Linux. The new NIC will be identified as eth1 or written to/etc/udev/rules. in the d/70-persistent-net.rules file, modify/etc/udev/rules. d/70-persistent-

This method is used to solve the problem where the new Nic is changed to eth1 and the source Nic name is eth0, which cannot be used by the new Nic. It can also be used to rename a nic.

After the nic mac address is changed, find the NIC in Linux. The new NIC will be identified as eth1 or written to/etc/udev/rules. in the d/70-persistent-net.rules file, modify/etc/udev/rules. in the d/70-persistent-net.rules file, modify the MAC address of eth0 to the changed address.

Edit
/Etc/udev/rules. d/70-persistent-net.rules

Root @ shangyuan-laptop:/etc/udev/rules. d # more 70-persistent-net.rules
# This file maintains persistent names for network interfaces.
# See udev (7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# File; however you are also free to add your own entries.

# PCI device 0x14e4: 0x1713 (tg3)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 1e: ec: 0f: 79: f
6 ", ATTR {type }==" 1 ", KERNEL =" eth * ", NAME =" eth0"

# PCI device 0x8086: 0x4222 (iwl3945)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 1f: 3c: 48: 70: B
1 ", ATTR {type }==" 1 ", KERNEL =" wlan * ", NAME =" wlan0"


Change eth0 to eth1. Save the settings and restart the system.

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.