Wired Ethernet not working Ubuntu 18.04

168,443

Solution 1

I had my network card get disabled after this morning's Ubuntu update. Rebooting the machine in Win10 the network card still works, so it's an Ubuntu configuration.

The way I solved it was the following:

sudo lshw -C network

This listed the "logical name" values:

logical name: enp8s0
logical name: docker0
logical name: enp0s29f7u7c4i2

I have a Dell T7400, so I know the device is a Broadcom NetXtreme BCM5754. Dell support provides no Ubuntu drivers, but you don't really need one. Somehow my ethernet device name was renamed.

sudo vi /etc/network/interfaces

Add the logical name to the end of the file:

auto enp8s0
iface enp8s0 inet dhcp

Finally, turn the interface on:

sudo ifup enp8s0

Solution 2

I tried the solutions above and they did not work.

What worked for me was disabling wifi using the network icon on the upper right corner of Ubuntu's GUI then restarting the network manager using :

service network-manager restart

I think that having a working wired connection cable that is plugged-in and a connected wlan card to a wifi network at the same time creates a conflict.

Solution 3

Run old GUI

nm-applet

Then activate Enable Networking.

If it doesn't solve it, try running

nm-connection-editor

to edit any weird configuration in the connections.

You can also see what the NetworkManager is doing with these commands.

# Run one by one to see if anything is useful
nmcli device

nmcli

nmcli device show

if your network device says unmanaged, it means the NetworkManager will not try to use that device to connect.


Workaround to bypass the NetworkManager

Configure network with netplan

# Create a config file
sudo nano /etc/netplan/ethernet.yaml

and enter this

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: true

replace eno1 with whatever your device is (mine was ens33). To see your list of devices, run ip addr.

Finally apply the new configurations

sudo netplan apply

Solution 4

Similar problems here, this could be related to this bug or this bug in NetworkManager.

I work around this problem by using ifupdown together with ifplugd for detecting properly if a connector is plugged in the nic or not (I'm working on a laptop) and I have no connectivity issues anymore.

Solution 5

I had the same problem - my newly-installed Ubunut 18.04 wasn't detecting my ethernet connection for a second, though the led at the port was constantly blinking as if it were normal. I typed lshw -C at the terminal and among the output displayed there was no eth0 ( it refers to ethernet connection, no eth0 means no ethernet connection). I searched online and found out that the particular ethernet driver might be absent in Ubuntu.

I downgraded my kernel and ... spent more than two days feverishly trying to solve the problem.

The solution : I reinstalled Ubuntu 18.04 and that solved my problem. I don't know what went wrong in the first installation.

Share:
168,443

Related videos on Youtube

hootis
Author by

hootis

Updated on September 18, 2022

Comments

  • hootis
    hootis over 1 year

    Upon bootup the network connection appears to be connected, for several reboots, I was shortly able to ping 8.8.8.8. However, I'm not longer able to do this. Then after logging in (<30 seconds) the network manager says the cable is disconnected. Unplugging and re-plugging the cable does not change this status.

    The wireless connection is working.

    I have previously used the wired connection in older versions of ubuntu (16.10 & 16.04) on this laptop, although I haven't tested them recently.

    The network cable works with other computers.

    The NIC device is a BCM5762.

    Here is the output of ifconfig

        enp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            ether 40:b0:34:09:9a:c0  txqueuelen 1000  (Ethernet)
            RX packets 91  bytes 54152 (54.1 KB)
            RX errors 0  dropped 1  overruns 0  frame 0
            TX packets 146  bytes 32104 (32.1 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 36  
        lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 294  bytes 23870 (23.8 KB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 294  bytes 23870 (23.8 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 10.87.252.202  netmask 255.255.0.0  broadcast 10.87.255.255
            inet6 fe80::3260:ab36:9b89:9e58  prefixlen 64  scopeid 0x20<link>
            ether 7c:b0:c2:4e:13:d0  txqueuelen 1000  (Ethernet)
            RX packets 1247  bytes 1208923 (1.2 MB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 881  bytes 160559 (160.5 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    

    Here is the output of lshw -C network

      *-network                 
           description: Ethernet interface
           product: NetXtreme BCM5762 Gigabit Ethernet PCIe
           vendor: Broadcom Limited
           physical id: 0
           bus info: pci@0000:01:00.0
           logical name: enp1s0
           version: 10
           serial: 40:b0:34:09:9a:c0
           capacity: 1Gbit/s
           width: 64 bits
           clock: 33MHz
           capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
           configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=sb latency=0 link=no multicast=yes port=twisted pair
           resources: irq:36 memory:e0820000-e082ffff memory:e0810000-e081ffff memory:e0800000-e080ffff
      *-network
           description: Wireless interface
           product: Wireless 7265
           vendor: Intel Corporation
           physical id: 0
           bus info: pci@0000:02:00.0
           logical name: wlp2s0
           version: 59
           serial: 7c:b0:c2:4e:13:d0
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
           configuration: broadcast=yes driver=iwlwifi driverversion=4.15.0-23-generic firmware=29.1044073957.0 ip=10.87.252.202 latency=0 link=yes multicast=yes wireless=IEEE 802.11
           resources: irq:47 memory:e0d00000-e0d01fff
    
    • Kaz Miller
      Kaz Miller over 3 years
    • Admin
      Admin about 2 years
      Exact same issue and none of the answers worked for me, because I had no wireless connection to fall back for driver updates. And the offline package installs ended in dependency hell. Given that this is an older question, an acceptable fix for me was to install Ubuntu 20.04LTS instead, which has the correct drivers preinstalled, so ethernet is picked up automatically.
  • Andor Kiss
    Andor Kiss over 5 years
    This did not work for me.
  • user2988146
    user2988146 almost 5 years
    this worked for me, thx so much, I wonder if people at ubuntu are deliberately sabotaging themselves with this network renaming, it's enough to make me stop using it at work
  • Philip Rego
    Philip Rego about 4 years
    The interfaces file and ifup are not in basic ubuntu 19.
  • Philip Rego
    Philip Rego about 4 years
    Adding the interface file like that stopped it from being shown in settings.
  • bhass1
    bhass1 about 4 years
    This helped, but now my wired connection shows as "Wired Unmanaged." Will try to find a full solution and report back.
  • bhass1
    bhass1 about 4 years
    This helped, but it put my wired connection icon to show as "Wired Unmanaged." To solve this, I needed to follow the accepted answer here (askubuntu.com/questions/882806/ethernet-device-not-managed)‌​. Namely, find, backup, and replace the 10-globally-managed-devices.conf with a 0-byte file using touch. On Ubuntu 18.04 the file was located at: /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.c‌​onf
  • Watchmaker
    Watchmaker almost 4 years
    It worked for me, thanks. The next step would be to rename enp8s0 to eth0 to avoid further confusion in the future.
  • Eric Milliot-Martinez
    Eric Milliot-Martinez almost 4 years
    So just running this command immediately woke back up my stupid ethernet connection: sudo lshw -C network Thanks @Gregory Alan Bolcer
  • Krcn U
    Krcn U over 3 years
    that magically solved my problem on vmware guest ubuntu
  • MilMike
    MilMike over 3 years
    also worked for me on ubuntu 20
  • Elder Geek
    Elder Geek over 3 years
    Worked for me...
  • Vincent
    Vincent over 3 years
    Hi can I ask a really stupid question? How do I add anything to the end of that file? Just typing seems not allowed?
  • Vincent
    Vincent over 3 years
    Nevermind I figured it out. Now I just wanted to say something else. I did this and seemingly the situation got worse. Intead of the wired connection being there but 'just' not working it now was no longer there, or on closer inspection 'not managed'. However, by applying the steps in this answer: askubuntu.com/a/1043244/674732 I got everything back to normal again. So apparently the two answers together fixed the issue. Thank you both and I leave this here for future visitors.
  • Timo
    Timo about 3 years
    I had to add dhclient <interf> up
  • Joe
    Joe over 2 years
    Nice! Worked for me!