25

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

Here are my network settings on Windows (Vista):

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

After adding auto eth0, here are the latest results:

$ 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.

Here are the results of running a modprobe:

$ 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!)

18
  • Thanks for sticking with me. I tried to shorten your post a bit so we can see things clearer (You can also delete a few comments if you like). The error you're having seems to be very common with Ubuntu and VMware. Are you actually running Ubuntu itself as a virtual machine? Or is Ubuntu installed on the computer? Web search for SIOCSIFADDR: No such device brings up a bit, but it seems to be related to Ubuntu as a virtual machine.
    – slhck
    Aug 27, 2011 at 21:51
  • Would you post the results of dmesg | grep eth and also see whether any network interfaces are listed using lspci
    – Linker3000
    Aug 27, 2011 at 21:52
  • @slhck No, Ubuntu is not running as a virtual machine. I have installed Ubuntu as the operating system on my computer. VMware is installed, but is not currently running. Interestingly, I just booted my computer from a Ubuntu LiveCD, and am experiencing the exact same problem, even after following your instructions on the LiveCD. I'm starting to strongly suspect it's a hardware problem. Aug 27, 2011 at 22:01
  • 1
    @Linker3000 The results of running dmesg | grep eth were empty, and I don't see any network interfaces listed using lspci Aug 27, 2011 at 22:07
  • Can you post mke/model of machine or if it's a DIY the motherboard make and model OR if you can boot Windows see what network interface is listed in device manager
    – Linker3000
    Aug 27, 2011 at 22:10

8 Answers 8

19

First of all, your ethernet isn't being managed by Ubuntu. Try ifconfig -a instead of just ifconfig, so you can see all your networking devices, managed or not. If you do see ethX in the ifconfig -a list, the solution should be straightforward, and you seemed to have gotten half of it. The following needs to go into your /etc/network/interfaces file:

auto ethX
iface ethX inet dhcp

The first line "activates" management of the interface and the second line sets it to DHCP and IP.

However, if you don't even see any ethX interfaces when you do ifconfig -a, it's a driver issue (Ubuntu isn't even seeing the interface). To solve this, either check from Windows' device manager for the PCI Vendor ID and Device ID of your ethernet card, which you can cross-reference here and see if you can find a driver for that (Vendor ID is the manufacturer, Device ID is the acutal model of the ethernet card). An alternative in-linux way to do this is via lspci.

In Windows 7, getting the Vendor/Device IDs is through the Device Manager -- open up the Network Interfaces node, double click on your network card, click on 'detail', and select "Hardware IDs" from the drop-down list. The Vendor ID are the 4 hexadecimal digits after the VEN_ prefix, and the device id is the 4 hex digits after the &DEV_ immediately following the vendor.

3
  • 2
    Why doesn't the ethernet device get detected and set up like it would on a desktop Ubuntu install? Why this extra jump through a hoop? Security or something else?
    – warsong
    Jul 23, 2015 at 22:05
  • Hey, the solution doesn't solve my problem and device is not even listed in lspci. Any suggestions on Ubuntu? (don't have Windows install atm)
    – Aurimas
    Nov 26, 2017 at 12:39
  • The link in this answer is dead. Is it possible to provide a new link?
    – marijnr
    Dec 14, 2018 at 7:29
10

I had a similar problem. By running ifconfig -a, I determined that the only network devices on my computer were p4p1 and lo. There was no eth0.

So I edited /etc/network/interfaces, replacing all instances of eth0 with p4p1. The file's contents are now:

auto lo
iface lo inet loopback

auto p4p1
iface p4p1 inet dhcp

After rebooting, the networking was working fine.

If it matters, I was using Ubuntu 12.04.5 Server edition.

3
  • For me it was p2p1, ubuntu 14.04
    – TheOsp
    May 18, 2016 at 10:49
  • 1
    For me it was enp0s8 on Ubuntu 16.04.
    – Afrowave
    Mar 16, 2017 at 14:07
  • You are the hero we needed. For me, this was ens33, I have no idea what this all means but it worked... I'm running inside of VMWare btw and it was working fine until it suddenly wasn't. Probably an update that caused it. Dec 8, 2019 at 18:07
6

I dont see anything in the comments suggesting that you look into udev and its rules which should install eth0. On my system, in /etc/udev/rules.d/75-network-devices.rules, I have the following;

# Local network rules to name your network cards.
#
# These rules were generated by nethelper.sh, but you can
# customize them.
#
# You may edit them as needed.
# (If, for example, your machine has more than one network
# card and you need to be sure they will always be given
# the same name, like eth0, based on the MAC address)
#
# If you delete this file, /lib/udev/nethelper.sh will try to
# generate it again the next time udev is started.

KERNEL=="eth?", ATTR{address}=="original has my MAC address here", NAME="eth0"

Also, make sure you have udevd running. This is what creates ethx on a Slackware based system.

3
  • I came across this post while looking for a similar solution, Can you just point out how can I find out the MAC address of my ethernet card even if I cannot see it listed anywhere ?
    – Gufran
    Feb 6, 2013 at 18:30
  • Thanks. This resolved my issue. On ubuntu 12.04 LTS I had /etc/udev/rules.d/70-persistent-net.rules which listed my two interfaces as eth2 and eth3, althought dmesg | grep eth listed them as eth0, eth1. That happened because system was previously on different hardware, thus different MAC addresses and different identifiers after all. This answer helped me find out the issue. Thanks. Sep 27, 2013 at 15:54
  • This file does not even exist for me. What I have is /etc/udev/rules.d/70-persistent-net.rules.
    – donquixote
    Dec 28, 2014 at 16:58
1

You may also want to try ls /etc/init.d | grep eth and see if there is anything in the init as an artifact that ETH0 was ever there. The above is what use in Gentoo, I think Ubuntu uses a different mechanism but its worth a shot.

Back in Ubuntu 6.06 I had an issue like this, I ended clearing the CMOS on the MB and somehow it solved my problem. That's a stab in the dark though.

0
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.

You only need to rename the 70-persistent-net.rules file in /etc/udev/rules.d.

0

I solved the problem for myself after months of hair pulling:

  1. Go to update manager at the top click on view.
  2. Select the kernel version at the bottom of the list (which for me was 4.4.0-78 but for some it will be some version above 4.8).
  3. Click on install.

I unplugged the WiFi dongle, and lo and behold I now have wired internet. With the wireless dongle out of course there is now no wlan0.

1
  • 1
    OP is asking about Ubuntu not Windows XP
    – yass
    May 18, 2017 at 20:16
0

If Ethernet connection is active but PC doesn't have internet connection, then do following steps:

First, check the Ethernet devices on your system by following command in your terminal, type:

ls /sys/class/net

or if command prompt has some issue. lock the screen using (windows+L) and then press (ctrl+alt+F3), it will take you into the bash.

The above command will give you the names of Ethernet devices known to your computer.

In the 2nd step, type

/etc/network/interfaces

and manually enter the device configurations in the following format

auto lo

iface lo inet loopback

auto devicename

iface devicename inet dhcp

You can repeat this format for multiple devices.

Sudo reboot

will solve the issue.

-1

In general if you don't see your network interface, it's either that it has a different name (like eth1 instead of eth0) or it doesn't have its driver loaded. When I had similar problem, I was able to fix them by either adjusting /etc/interfaces or by modprobe .

1
  • Can you elaborate on how to accomplish that? Thanks.
    – fixer1234
    Dec 9, 2015 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.