I'm using Ubuntu 18.04.
I have exactly the same issue as described in this question on Unix & Linux; my laptop's ethernet/wired cannot receive DHCP offer.
- I can verify it's not a network/server issue, as it works in live cd. Other laptop works fine using the same cable, so definitely not an issue with a cable.
- My laptop ethernet doesn't work at my home nor my friend's place.
- I tried the
rfc
andidentifier
workarounds mentioned by this Ubuntu Forums thread, but to no avail. - I tried disabling ufw/gufw firewall, no avail.
dhclient <iface_name>
simply times out. When a static IP is used, NetworkManager shows it's connected, but I can't ping anywhere.- I tried clearing
/etc/NetworkManager/system-connections/
, to no avail. - I tried
r8168-dkms
driver, to no avail. - I tried all options of link negotiation, to no avail.
I'm using kernel 4.15.0-29.31, I tried booting older kernel 4.15.0-23.25, no avail.Cold boot (without restart) 4.15.0-23.25 or 4.15.0-20 through GRUB advanced options resolve my issue.- No issue on wifi.
This is the second time this has happened to me. Previously I simply gave up and reformated/reinstalled. Ethernet was previously functional again from fresh install until now (2 months later).
I'm trying to avoid doing a fresh install this time as this probably will happen again if the (currently unknown) cause is not addressed.
NetworkManager log:
device (enp3s0f1): carrier: link connected
device (enp3s0f1): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
manager: startup complete
device (enp3s0f1): Activation: starting connection 'Wired connection 1' ()
audit: op="connection-activate" uuid="" name="Wired connection 1" pid= uid= result="success"
device (enp3s0f1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
manager: NetworkManager state is now CONNECTING
device (enp3s0f1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
device (enp3s0f1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
dhcp4 (enp3s0f1): activation: beginning transaction (timeout in 45 seconds)
dhcp4 (enp3s0f1): dhclient started with pid
device (enp3s0f1): carrier: link connected
dhcp4 (enp3s0f1): request timed out
dhcp4 (enp3s0f1): state changed unknown -> timeout
dhcp4 (enp3s0f1): canceled DHCP transaction, DHCP client pid
dhcp4 (enp3s0f1): state changed timeout -> done
device (enp3s0f1): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
manager: NetworkManager state is now DISCONNECTED
device (enp3s0f1): Activation: failed for connection 'Wired connection 1'
device (enp3s0f1): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
device (enp3s0f1): state change: disconnected -> unavailable (reason 'carrier-changed', sys-iface-state: 'managed')
device (enp3s0f1): carrier: link connected
device (enp3s0f1): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
dhclient log:
dhcp-init: Using DHCP client 'dhclient'
dhcp4 (enp3s0f1): dhclient started with pid
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 3 (xid=0x48f58660)
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 5 (xid=0x48f58660)
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 13 (xid=0x48f58660)
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 7 (xid=0x48f58660)
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 8 (xid=0x48f58660)
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 9 (xid=0x48f58660)
$ lspci | grep Ethernet
03:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
$ sudo lshw -C network
*-network
description: Wireless interface
product: Wireless 7260
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlp2s0
version: 73
serial:
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-29-generic firmware=17.948900127.0 ip=10.233.9.0 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:47 memory:e3500000-e3501fff
*-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:03:00.1
logical name: enp3s0f1
version: 12
serial:
size: 1Gbit/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=full firmware=rtl8411-2_0.0.1 07/08/13 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:19 ioport:4000(size=256) memory:e3404000-e3404fff memory:e3400000-e3403fff
$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=false
Edit: Looks similar to Unable to activate the ethernet connection after upgrading to Ubuntu 18.04. User resolved it with recent update. But in this case, recent update could have broken it instead.
Edit2: /etc/udev/rules.d/70-persistent-net.rules
is missing, but wifi works.
Edit3: Just tried a USB ethernet (Dell Docking D3100), it works. So, this is an issue of my laptop realtek built-in nic.
sudo tcpdump -n udp port 68 -vv
, and the connection succeeds when I connect the ethernet cable to the network. Contrast withsudo tcpdump -n udp port 68 --no-promiscuous-mode -vv
where the connection does not succeed.