Missing eth0 Ethernet interface in Ubuntu — can’t connect to router
I’m having trouble getting my Ubuntu 10.04 machine (Sony Vaio VGN-SR490) to connect to the Internet by way of an Ethernet cable connected directly to my router. I’m able to connect to the Internet using this same cable using a Windows machine, so there’s something wrong with the way Linux is configured. How do I got about figuring out what the problem is and solving it? Here are my network settings on Linux:
$ ifconfig 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 vmnet1 Link encap:Ethernet HWaddr 00:50:56:c0:00:01 inet addr:192.168.79.1 Bcast:192.168.79.255 Mask:255.255.255.0 inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 vmnet8 Link encap:Ethernet HWaddr 00:50:56:c0:00:08 inet addr:192.168.192.1 Bcast:192.168.192.255 Mask:255.255.255.0 inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : [removed by me]. Link-local IPv6 Address . . . . . : [removed by me] IPv4 Address. . . . . . . . . . . : 192.168.1.103 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1
I censored my IP address from these results. If that information is needed, just let me know. Here is the content of /etc/network/interfaces :
auto lo iface lo inet loopback
$ sudo ifup eth0 Internet Systems Consortium DHCP Client V3.1.3 Copyright 2004-2009 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ SIOCSIFADDR: No such device eth0: ERROR while getting interface flags: No such device eth0: ERROR while getting interface flags: No such device Bind socket to interface: No such device Failed to bring up eth0.
$ sudo modprobe msk FATAL: Module msk not found. $ dmesg | grep eth
I removed Linux from my computer and installed Windows XP, at the request of some of the people commenting on this question. I installed an ran a program to find out details about the network card. Here is that information:
Network You are not connected to the internet Computer Name NetBIOS Name JOE-LAPTOP DNS Name joe-laptop Domain Name joe-laptop Remote Desktop Console State Active Domain joe-laptop RDP-Tcp State Listen WinInet Info An internal error occurred. Wi-Fi Info Wi-Fi not enabled WinHTTPInfo WinHTTPSessionProxyType No proxy Session Proxy Session Proxy Bypass Connect Retries 5 Connect Timeout 60000 HTTP Version HTTP 1.1 Max Connects Per 1.0 Servers INFINITE Max Connects Per Servers INFINITE Max HTTP automatic redirects 10 Max HTTP status continue 10 Send Timeout 30000 IEProxy Auto Detect No IEProxy Auto Config IEProxy IEProxy Bypass Default Proxy Config Access Type No proxy Default Config Proxy Default Config Proxy Bypass Adapters List Network Shares No network shares
It looks like the network adapters list is empty. I will now install both Windows XP and Ubuntu Linux dual-boot. I’m still not able to access the internet, even through Windows. I’m wonder if this could be a hardware problem with the computer or a problem with the router itself. Other computers can connect to this same router, and work fine. (That’s how I’m posting this after all!)
eth0 ERROR while getting interface flags: no such device
I had opened a terminal to install macchanger via sudo apt-get install -y macchanger , and then entered my password. It stated that macchanger was already the newest version, so I typed clear and then ran:
eth0 ERROR while getting interface flags: no such device
This is a laptop and I am connected via ethernet cable. How can I resolve this, so that I can run macchanger ? So I used ifconfig -a and I’m looking but seeing no mention of eth0 The interfaces that are showing top to bottom are:
enp58s0f1 lo tun0 UNSPEC wlp59s0
The only reference to ethernet is the MAC and also txqueuelen Does this help in figuring what I need to do to get this sorted?
Please edit your question and explain where you see this message, what your hardware is, if this is a wired or wireless connection, what exact command you ran.
3 Answers 3
According to your ifconfig -a output, enp58s0f1 is your Ethernet, not eth0 .
When Ubuntu switched to systemd (at Ubuntu 15.04), it switched away from the old system with eth0 and so on to what are called Predictable Network Interface Names. Ethernet interfaces start with en (so yours is enp58s0f1 ). Wireless interfaces start with wl .
Then, afterwards, you’ll understand what ifconfig does. also, ifconfig is considered to be a deprecated tool (i still use it however, it’s handy because it’s familiar and easy to use).
Will display all interfaces.
ip address # will also display similar information.
You might want to do some googling on some basic networking commands and how they work. TLPD has a quick synopsis on some of the most common commands in linux for networking.
My arch system is configured to give older interface names, but the newer names (automatically configured by ubuntu) give newer (more complicated, harder to remember, and type) information.
$ ip addr 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: mtu 1500 qdisc fq_codel state DOWN group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 3: wlan0: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff inet 192.168.254.3/24 brd 192.168.254.255 scope global dynamic wlan0 valid_lft 82688sec preferred_lft 82688sec inet6 f::f:f:f:f/64 scope link valid_lft forever preferred_lft forever
You can see I have 3 interfaces, lo (for loopback), eth0 (for ethernet), and wlan0 (for wireless). If you don’t use the correct interface name, then it won’t work.
The following command will bring the interface up if it was down. The Ubuntu Server Guide has some detailed information on how to accomplish configuration, bringing the interface down, and back up.
ifconfig does not show eth0 in centos 6 on virtualbox – Solution + Screenshots
After installing CentOS 6.x or importing a preinstalled VDI image (for example from osboxes.org) if your network is not working or if eth0 does not show up, then you can follow these steps to fix it:
Step 1 : Inspect ifconfig output
Run the following command:
As you can see it shows only the output for loopback interface lo.
To find all interface information and MAC for eth0, run the following command:
Now, take a note of the MAC Address that you see in your screen as you will need it soon.
Step 2 : Manually configure eth0 and network settings :
Type the following in your terminal:
Change/edit the ifcfg-eth0 as the following, and make sure the HWADDR value is the MAC address that you took a note earlier.
DEVICE=eth0
HWADDR=08:00:27:87:09:6A
NM_CONTROLLED=NO
ONBOOT=YES
BOOTPROTO=dhcp
So, it will finally look something like picture attached below.
To edit your network file, type the following command:
Now, add the following line if its not already present to the file:
Step 3. Restart network service
This should fix the issue and your eth0 interface should popup in no time as shown below.
You can also check the IP address information using ifconfig to check the assigned IP address.
Hope this helps! If you found this article helpful, do share this article by clicking on the sharing icons you see in your screen.
Feel free to leave a comment below if need any further help and will get back to you as soon as possible. Subscribe for future updates!