Cobra Forum

Linux => Networking & Wireless => Topic started by: kalpana on Oct 19, 2023, 05:34 AM

Title: DHCP timeout setting location
Post by: kalpana on Oct 19, 2023, 05:34 AM
Hi - I'm hoping someone can help me with something I thought would be very simple. I have an Ubuntu server running 22.04 LTS that uses systemd-networkd for its network configuration. My netplan file is:

Code:
network:
  version: 2
  renderer: networkd
  ethernets:
    all:
      match:
        name: enp*
      dhcp4: true
      dhcp-identifier: mac
      optional: true

Is there a setting somewhere so that the server will wait indefinitely for a DHCP offer? It seems to timeout after about 5mins / 300secs.

I can see this on the console when it finally gives up:

Code:
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
no search or nameservers found in /run/net-.conf /run/net-*.conf /run/net6-*.conf

I've had a look in the dhclient.conf file and edited the systemd-networkd-wait-online.service but still the same result.

Any help would be really appreciated.