36

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
hootis
  • 481
  • 1
  • 4
  • 5
  • 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. – DaReal May 10 '22 at 20:38

7 Answers7

36

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
clemisch
  • 161
  • 1
    This did not work for me. – Andor Kiss Jan 26 '19 at 13:42
  • 1
    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 – user2988146 Jun 04 '19 at 08:30
  • 1
    The interfaces file and ifup are not in basic ubuntu 19. – Philip Rego Feb 21 '20 at 20:22
  • 1
    Adding the interface file like that stopped it from being shown in settings. – Philip Rego Feb 21 '20 at 21:01
  • It worked for me, thanks. The next step would be to rename enp8s0 to eth0 to avoid further confusion in the future. – Watchmaker May 26 '20 at 18:43
  • So just running this command immediately woke back up my stupid ethernet connection: sudo lshw -C network Thanks @Gregory Alan Bolcer – Eric Milliot-Martinez Jun 03 '20 at 03:34
  • that magically solved my problem on vmware guest ubuntu – Krcn U Aug 10 '20 at 11:19
  • also worked for me on ubuntu 20 – MilMike Sep 25 '20 at 09:17
  • 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 Jan 25 '21 at 23:12
  • 2
    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: https://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. – Vincent Jan 25 '21 at 23:40
  • I had to add dhclient <interf> up – Timo Apr 24 '21 at 14:21
  • Nice! Worked for me! – Joe Jan 24 '22 at 21:35
  • Saved my time, worked for me! – FtheBuilder Jun 11 '23 at 05:06
13

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.

Mehdi Fracso
  • 239
  • 2
  • 5
  • This helped, but now my wired connection shows as "Wired Unmanaged." Will try to find a full solution and report back. – bhass1 Apr 15 '20 at 18:31
  • 1
    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 (https://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.conf – bhass1 Apr 15 '20 at 18:39
9

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
Madacol
  • 398
  • 4
  • 9
3

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.

3

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.

0

I made had made some changes to /etc/network/interfaces to make networking work in KVM, like this:

auto br0

iface enp2s0 inet manual

iface br0 inet dhcp bridge_ports enp2s0

I got that out of some article. Unfortunately it made my physical networking not work. Wireless was fine. I found out when I went somewhere and needed to use a physical network.

I commented out those lines, rebooted, and the physical network worked.

It's just as well that I added comments to the file with my name on them saying what I had done.

Anyway, for anyone reading this, check your interfaces file to see if there is anything odd in it.

dan-gph
  • 141
-1

Had the same problem try:

sudo apt install ifplugd

then

reboot

Fixed it for me.

damadam
  • 2,833
Ifly777
  • 123