So I am aware there are similar problems out there however I could not solve mine with any of the solutions so far:
I am trying to connect to a LAN network from my Thinkpad P14s (Intel) running with Ubuntu 20.04 Desktop. I keep getting: "Activation of Network connection failed" and I am running out of possible solutions. I do not have access to a router and the exact same cable connection works e.g., for a windows laptop so it cannot be the cable or the connection I think.
I tried:
- full reinstallation of Ubuntu
- the steps along this post
- reinstalling network manager
- restarting network manager
- different LAN cables
- installing HWE:
sudo apt install linux-generic-hwe-20.04
According to the logoutput (sudo journalctl -b 0 -u NetworkManager
) the dhcp request runs into a time out: output
Here is the output of lshw -C network
*-network:0
description: Wireless interface
product: Intel Corporation
vendor: Intel Corporation
physical id: 14.3
bus info: pci@0000:00:14.3
logical name: wlp0s20f3
version: 20
serial: a0:e7:0b:d2:f7:21
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=5.11.0-40-generic firmware=59.601f3a66.0 QuZ-a0-hr-b0-59.u ip=10.181.78.114 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: iomemory:600-5ff irq:16 memory:6053bc4000-6053bc7fff
*-network:1
description: Ethernet interface
product: Ethernet Connection (13) I219-V
vendor: Intel Corporation
physical id: 1f.6
bus info: pci@0000:00:1f.6
logical name: enp0s31f6
version: 20
serial: 90:2e:16:93:b9:4d
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=5.11.0-40-generic duplex=full firmware=0.8-3 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:149 memory:bec80000-bec9ffff
*-network
description: Ethernet interface
physical id: 2
bus info: usb@2:3.3
logical name: enx34298f70f2f4
serial: 34:29:8f:70:f2:f4
size: 10Mbit/s
capacity: 1Gbit/s
capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8152 driverversion=v1.11.11 duplex=half firmware=rtl8153a-4 v2 02/07/20 link=no multicast=yes port=MII speed=10Mbit/s
output of nmcli connection
:
NAME UUID TYPE DEVICE
netplan-enp0s31f6 d4735e4b-9bfa-3052-b1c4-ef3302803c9a ethernet enp0s31f6
Setting a different dhcp client (as suggested in this post
) I can at least get the logs to change:
nov 25 14:40:09 l dhclient[10449]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 10 (xid=0x4c152271)
nov 25 14:40:10 l NetworkManager[9427]: <info> [1637847610.7508] device (enp0s31f6): state change: ip-config -> deactivating (reason 'user-requested', sys-iface-state: 'managed')
nov 25 14:40:10 l NetworkManager[9427]: <info> [1637847610.7514] manager: NetworkManager state is now DISCONNECTING
nov 25 14:40:10 l NetworkManager[9427]: <info> [1637847610.7527] audit: op="device-disconnect" interface="enp0s31f6" ifindex=2 pid=9100 uid=1000 result="success"
nov 25 14:40:10 l NetworkManager[9427]: <info> [1637847610.7622] device (enp0s31f6): state change: deactivating -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
nov 25 14:40:10 l NetworkManager[9427]: <info> [1637847610.7658] dhcp4 (enp0s31f6): canceled DHCP transaction, DHCP client pid 10449
nov 25 14:40:10 l NetworkManager[9427]: <info> [1637847610.7658] dhcp4 (enp0s31f6): state changed unknown -> done
nov 25 14:40:11 l NetworkManager[9427]: <info> [1637847611.0623] manager: NetworkManager state is now DISCONNECTED
nov 25 14:40:11 l NetworkManager[9427]: <info> [1637847611.5681] device (enp0s31f6): Activation: starting connection 'netplan-enp0s31f6' (d4735e4b-9bfa-3052-b1c4-ef3302803c9a)
nov 25 14:40:11 l NetworkManager[9427]: <info> [1637847611.5682] audit: op="connection-activate" uuid="d4735e4b-9bfa-3052-b1c4-ef3302803c9a" name="netplan-enp0s31f6" pid=9100 uid=1000 result="success"
nov 25 14:40:11 l NetworkManager[9427]: <info> [1637847611.5685] device (enp0s31f6): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
nov 25 14:40:11 l NetworkManager[9427]: <info> [1637847611.5694] manager: NetworkManager state is now CONNECTING
nov 25 14:40:11 l NetworkManager[9427]: <info> [1637847611.5699] device (enp0s31f6): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
nov 25 14:40:11 l NetworkManager[9427]: <info> [1637847611.5712] device (enp0s31f6): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
nov 25 14:40:11 l NetworkManager[9427]: <info> [1637847611.5719] dhcp4 (enp0s31f6): activation: beginning transaction (timeout in 45 seconds)
nov 25 14:40:11 l NetworkManager[9427]: <info> [1637847611.5755] dhcp4 (enp0s31f6): dhclient started with pid 10539
nov 25 14:40:11 l dhclient[10539]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 3 (xid=0x7d307302)
nov 25 14:40:11 l dhclient[10539]: Can't create /run/NetworkManager/dhclient-enp0s31f6.pid: Permission denied
nov 25 14:40:14 l dhclient[10539]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 8 (xid=0x7d307302)
Thanks a lot in advance.
Edit 1
As asked by @heynnema, ouput of cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
Output of cat /etc/netplan/*.yaml
:
network:
ethernets:
enp0s31f6:
dhcp4: true
version: 2
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
network:
version: 2
renderer: NetworkManager
Edit 2
After following the steps of @heynnema below I still get the same error, here's the output of journalctl -b 0 -u NetworkManager
:
nov 29 08:53:12 l NetworkManager[1034]: <info> [1638172392.1044] device (enp0s31f6): Activation: starting connection 'Wired connection 1' (5f5a5254-5476-3279-9b2a-cfc3981d7e66)
nov 29 08:53:12 l NetworkManager[1034]: <info> [1638172392.1046] audit: op="connection-activate" uuid="5f5a5254-5476-3279-9b2a-cfc3981d7e66" name="Wired connection 1" pid=3796 uid=1000 result="succe>
nov 29 08:53:12 l NetworkManager[1034]: <info> [1638172392.1047] device (enp0s31f6): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
nov 29 08:53:12 l NetworkManager[1034]: <info> [1638172392.1054] manager: NetworkManager state is now CONNECTING
nov 29 08:53:12 l NetworkManager[1034]: <info> [1638172392.1058] device (enp0s31f6): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
nov 29 08:53:12 l NetworkManager[1034]: <info> [1638172392.1069] device (enp0s31f6): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
nov 29 08:53:12 l NetworkManager[1034]: <info> [1638172392.1075] dhcp4 (enp0s31f6): activation: beginning transaction (timeout in 45 seconds)
nov 29 08:53:12 l NetworkManager[1034]: <info> [1638172392.1114] dhcp4 (enp0s31f6): dhclient started with pid 3874
nov 29 08:53:12 l dhclient[3874]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 3 (xid=0xbf0c12b)
nov 29 08:53:12 l dhclient[3874]: Can't create /run/NetworkManager/dhclient-enp0s31f6.pid: Permission denied
nov 29 08:53:15 l dhclient[3874]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 8 (xid=0xbf0c12b)
nov 29 08:53:23 l dhclient[3874]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 11 (xid=0xbf0c12b)
nov 29 08:53:34 l dhclient[3874]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 21 (xid=0xbf0c12b)
nov 29 08:53:55 l dhclient[3874]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 12 (xid=0xbf0c12b)
nov 29 08:53:57 l NetworkManager[1034]: <warn> [1638172437.5143] dhcp4 (enp0s31f6): request timed out
nov 29 08:53:57 l NetworkManager[1034]: <info> [1638172437.5144] dhcp4 (enp0s31f6): state changed unknown -> timeout
nov 29 08:53:57 l NetworkManager[1034]: <info> [1638172437.5144] device (enp0s31f6): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
nov 29 08:53:57 l NetworkManager[1034]: <info> [1638172437.5154] manager: NetworkManager state is now DISCONNECTED
nov 29 08:53:57 l NetworkManager[1034]: <warn> [1638172437.5171] device (enp0s31f6): Activation: failed for connection 'Wired connection 1'
nov 29 08:53:57 l NetworkManager[1034]: <info> [1638172437.5177] device (enp0s31f6): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
nov 29 08:53:57 l NetworkManager[1034]: <info> [1638172437.5584] dhcp4 (enp0s31f6): canceled DHCP transaction, DHCP client pid 3874
nov 29 08:53:57 l NetworkManager[1034]: <info> [1638172437.5585] dhcp4 (enp0s31f6): state changed timeout -> done
According to this forum post (which is for Ubuntu Sever however) there might be a problem with the .leases files, however in my /etc/passwd file there is no user dhcp
. Here's the contents of my /var/lib/dhcp
directory:
drwxr-xr-x 2 root root 4096 nov 9 13:11 .
drwxr-xr-x 70 root root 4096 nov 22 15:02 ..
-rw-r--r-- 1 root root 0 nov 25 14:23 dhclient.leases
Edit 3
As asked by @heynnema:
Output of ls -la /etc/network/interfaces.d
total 8
drwxr-xr-x 2 root root 4096 mag 3 2019 .
drwxr-xr-x 7 root root 4096 nov 25 14:26 .
Output of ls -la /run/NetworkManager/
:
total 8
drwxr-xr-x 5 root root 160 nov 29 12:16 .
drwxr-xr-x 38 root root 1060 nov 29 12:15 ..
drwxr-xr-x 2 root root 60 nov 29 12:14 conf.d
drwxr-xr-x 2 root root 80 nov 29 12:23 devices
-rw-r--r-- 1 root root 274 nov 29 12:16 no-stub-resolv.conf
srwxr-xr-x 1 root root 0 nov 29 12:14 private-dhcp
-rw-r--r-- 1 root root 74 nov 29 12:16 resolv.conf
Output of grep -i -v "#" /etc/dhcp/dhclient.conf
:
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
timeout 300;