Linux Networking Configuration (update)

Source: Internet
Author: User

Restart Network configuration: Service network restart;

Problems:

Linux virtual machine ifconfig displays eth1 file Ifcfg-eth0 with device as eth0 problem   Why eth0 will become eth1?  many Linux distribution use Udev to dynamically manage device files, It is persisted and named according to the information of the device. Udev identifies the network card during system boot and records the MAC address and network card name in Udev's rules script. For a new virtual machine, VMware will automatically generate a MAC address for the virtual machine's network card, when you clone or reload the virtual machine software, because you are using the previous system virtual hard disk information, and the system has eth0 information, for this new network card, Udev will automatically name it eth1 (the cumulative principle), so after your system starts, you use Ifconfig to see the NIC named Eth1.   How to recover to eth0?  in Fedora, Udev Records network rules for scripts:/etc/udev/rules.d/70-persistent-net.rules [[email  Protected] ~]$ vi/etc/udev/rules.d/70-persistent-net.rules # This file is automatically generated by The/lib/udev /write_net_rules# program run by the Persistent-net-generator.rules rules file.## you can modify it, as long as you keep E Ach rule on a single line.# PCI device 0x1022:0x2000 (pcnet32) subsystem== "NET", action== "Add", drivers== "? *", attr{address }== "00:0c:29:5a:6c:73", attr{type}== "1", kernel== "eth*", name= "eth0" subsystem== "net", action== "Add", drivers== "? *", attr{address}== "00:0c:29:a9:22:9d", attr{type}== "1", kernel== "eth*", name= "eth1"   Open the file, you will find that there is eth0,eth1 two network card information, but in fact you can only find the ifconfig eth1 a network card information, because Eth0 does not exist at all.   will be eth0 the information in the deletion, and the eth1 information in the device name to Eth0, restart the system, you see the network card is eth0, or delete all of the information restart System Udev will help you find new equipment.   There is also a startup script file/etc/sysconfig/network-scripts/ifcfg-eth0, the MAC address in the file is the physical address of the original eth0 NIC, and the virtual machine assigns a new physical address to eth1. Therefore, the information in the startup script does not match the actual information, the MAC address information modified to 70-persistent-net.rules in the Eth1 MAC address, restart the network again, fully restored to the status of the previous eth0 NIC.

Linux Networking Configuration (update)

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.