Ethernet Cable not detected in Ubuntu 14.04 LTS

55,927

Solution 1

I had a problem like this before, and the issue was related to Realtek ethernet cards.

Here's how I fixed my issue:

  1. ran this command that enabled my Internet access: sudo ethtool -s eth0 speed 100 duplex full

  2. followed this guide for a permanent fix

Not sure if it'll help you, but it's worth a try.

Solution 2

After hours of trials and errors, I finally managed to get the my Ethernet connection working. Here are the steps:

  1. Edit /etc/network/interfaces ( sudo nano /etc/network/interfaces ), add the following 2 lines:

    allow-hotplug eth0
    iface eth0 inet dhcp
    
  2. Install Avahi library:

    sudo apt-get update
    sudo apt-get install libavahi-compat-libdnssd-dev
    
  3. Edit /etc/rc.local ( gksudo gedit /etc/rc.local ), add the following line:

    avahi-autoipd --daemonize --syslog eth0
    

    one line above exit 0

  4. Reboot

  5. After reboot, check the network interfaces, by using the command:

    ifconfig -a
    

    eth0, lo, and wlan0 should be listed.
    If eth0:avahi is also listed (usually with inet addr:169.254.5.215), then basically you are ready to go.
    If eth0:avahi is NOT listed, then enter the command:

    sudo avahi-autoipd --daemonize --syslog eth0
    

    After some moments, eth0:avahi will appear when ifconfig -a is run, and you are ready to go. Connect the Ethernet cable on your computer, and you can try ping some IP address on the network.

Share:
55,927

Related videos on Youtube

Pratik Nagelia
Author by

Pratik Nagelia

Updated on September 18, 2022

Comments

  • Pratik Nagelia
    Pratik Nagelia over 1 year

    Ubuntu 14.04 does not detect the ethernet lan cable . Windows detects the same ethernet lan cable. Although ubuntu detects a lan cable which came in the box with router. Please help
    Here's the output of ethtool eth0:

    Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Speed: 10Mb/s
    Duplex: Half
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: d
    Current message level: 0x00000033 (51)
                   drv probe ifdown ifup
    Link detected: no
    

    sudo lshw -C network:

          description: Ethernet interface
          product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0.1
       bus info: pci@0000:05:00.1
       logical name: eth0
       version: 14
       serial: 08:9e:01:e1:0a:57
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8411-2_0.0.1 07/08/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:62 ioport:3000(size=256) memory:b0404000-b0404fff memory:b0400000-b0403fff
    

    ifconfig -a :

    eth0      Link encap:Ethernet  HWaddr 08:9e:01:e1:0a:57  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    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:65536  Metric:1
          RX packets:626 errors:0 dropped:0 overruns:0 frame:0
          TX packets:626 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:61833 (61.8 KB)  TX bytes:61833 (61.8 KB)
    
    wlan0     Link encap:Ethernet  HWaddr 48:d2:24:a1:1b:4f  
          inet addr:192.168.159.8  Bcast:192.168.159.255  Mask:255.255.252.0
          inet6 addr: fe80::4ad2:24ff:fea1:1b4f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:63929 errors:0 dropped:719 overruns:0 frame:0
          TX packets:7323 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:11495871 (11.4 MB)  TX bytes:1100882 (1.1 MB)
    
  • Pratik Nagelia
    Pratik Nagelia over 7 years
    Apparently, it was a long term realtek driver issue. Finally i managed to get it resolved through this link . Still thanks a lot for you answer.