0

Ubuntu 24.04.1 LTS server with network managed by networkd and netplan.

I have a well-behaved interface wlp2s0 which gets a DHCPv4 configuration within ~2 seconds, as expected. However enp4s0 which is connected to the same network does not.

$  journalctl --since "3 minutes ago" | sed -n 's/.*enp4s0: //p'
NDISC: Sent Router Solicitation, next solicitation in 1min 2s
DHCPv4 client: DISCOVER
NDISC: Sent Router Solicitation, next solicitation in 2min
DHCPv4 client: DISCOVER
DHCPv4 client: DISCOVER

(detailed logs thanks to https://superuser.com/a/1234599/82589 )

The configuration for these only differs in RouteMetric

$ sudo diff -y -W 56 /run/sy*/netw*/*
[Match]                         [Match]
Name=enp4s0                |    Name=wlp2s0

[Network] [Network] DHCP=ipv4 DHCP=ipv4 LinkLocalAddressing=ipv6 LinkLocalAddressing=ipv6

[DHCP] [DHCP] RouteMetric=100 | RouteMetric=600 UseMTU=true UseMTU=true $ sudo cat /etc/netp/ | grep -B3 -A3 enp4s0 network: version: 2 ethernets: enp4s0: dhcp4: true wifis: wlp2s0:

Running dhclient instantly works:

$ sudo dhclient && journalctl --since "3 minutes ago" | sed -n 's/.*enp4s0: //p'
DHCPv4 client: DISCOVER
DHCPv4 client: DISCOVER
DHCPv4 client: DISCOVER
Received new foreign address (configured): 192.168.1.43/24 broadcas[...]
Received new foreign route (configured): dst: 192.168.1.43/32, src:[...]
Received new foreign route (configured): dst: 192.168.1.255/32, src[...]
Received new foreign route (configured): dst: 192.168.1.0/24, src: [...]
Received new foreign route (configured): dst: n/a, src: n/a, gw: 19[...]

Why does dhclient succeed where networkd's built-in client fails? What piece of configuration am I missing? I've had multiple interfaces on the same network before, but only with Network-Manager, is that part of the issue?

Vasiliy Sharapov
  • 675
  • 7
  • 13

0 Answers0