Linux cannot start virtual NIC Eth0__linux

Source: Internet
Author: User

Recently, when doing experiments on Linux virtual machines, I found that I could not start Linux's Nic,

When I use the ifconfig command, only the following information appears:

Lo Link encap:local Loopback
inet addr:127.0.0.1 mask:255.0.0.0
Inet6 addr::: 1/128 scope:host
Up loopback RUNNING mtu:16436 metric:1
RX packets:2411 errors:0 dropped:0 overruns:0 frame:0
TX packets:2411 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4284220 (4.0 MIB) TX bytes:4284220 (4.0 MIB)

There is no MAC layer address, there is no eth0 network card information. So I call the command: System-config-network, bring up the display of the NIC device, the above show eth0 is inactive, when I clicked activate, there are the following warning pop-up: Device eth0 has different MAC Address than expected, ignoring. Search on the Internet a lot of information, can not solve, one of them is to find, Linux system/etc/udev/rules.d/70-persistent-net.rules this file, but I found my Linux virtual machine, found in the folder does not have this file. Looking for a long time did not know how to solve. After seeing the post said to open the virtual machine's installation directory with Notepad, open the suffix named. vmx with Notepad. Find the Ethernet.address value (or Mac value) of the virtual machine,/etc/sysconfig/network-scripts/ifcfg-eth0 macaddr or hwaddr value. But when I opened the vmx file with Notepad, I found that there was no variable at all in the Address field; Just when I was discouraged, I suddenly saw a variable ethernet0.present= "", I was wondering if this means eth0 network card. So I change the value of thernet0.present to True, and then restart the virtual machine, invoke the command: Ifconfig-a, there is eth0 information:

Eth0 Link encap:ethernet hwaddr 00:0c:29:dc:73:99
inet addr:10.66.152.18 bcast:10.66.159.255 mask:255.255.224.0
Inet6 ADDR:FE80::20C:29FF:FEDC:7399/64 Scope:link
Up broadcast RUNNING multicast mtu:1500 metric:1
RX packets:157 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12093 (11.8 KiB) TX bytes:11647 (11.3 KiB)
interrupt:67 Base address:0x2024


Lo Link encap:local Loopback
inet addr:127.0.0.1 mask:255.0.0.0
Inet6 addr::: 1/128 scope:host
Up loopback RUNNING mtu:16436 metric:1
RX packets:2411 errors:0 dropped:0 overruns:0 frame:0
TX packets:2411 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4284220 (4.0 MIB) TX bytes:4284220 (4.0 MIB)

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.