[bionic] net-installer dhcp client fails with DHCPDECLINE

Bug #1785768 reported by Ben Alletob
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
netcfg (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

During installation over PXE with a preseed file and with the netboot files the dhcp client fails with a DHCPDECLINE. Apparently it's a known issue which is often reiterated between each version according to this bugreport : https://bugs.launchpad.net/ubuntu/+source/netcfg/+bug/848072

The client machine start over PXE and get with success all files which are needed to start the debian-installer. While it tries to configure the network the client sends a DHCPDECLINE and the network configuration fails.

I have downloaded netboot.tar.gz file from this link :

http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/netboot.tar.gz

Ubuntu version: 18.04
Installer build: 20101020ubuntu543

Ben Alletob (neb19)
description: updated
description: updated
Revision history for this message
Frederik Carlier (qmfrederik) wrote :

I have encountered a similar issue with the Ubuntu installer.

It turned out that the DHCP server was providing DNS server information, but the DNS server itself was not reachable.

It appears that dhclient does some verification of the DHCP settings offered, and rejects the IP address if the configration is invalid (e.g. the nameserver is not reachable).

Unfortunately, there is no logging which indicates what settings dhclient is verifying and which configuration error causes dhclient to reject the IP address being offered.

Revision history for this message
Simon (xeek) wrote :

I'm definitely seeing this bug at the moment, my issue arises when i have multiple router options , for example in isc-dhcp.

option routers 192.168.0.254, 192.168.0.253;

this is causing the client to send back a DHCPDECLINE. If i just have one router defined everything seems to work ok. The DNS settings don't seem to have an effect for me anyway even if i provide an unreachable address in the DHCP server config it still works it only stops when there are multiple routers presented.

I tried patching netcfg with the patch from https://bugs.launchpad.net/ubuntu/+source/netcfg/+bug/848072 but this didn't help the issue. At the moment I'm doing something like this

 if exists user-class and option user-class = "iPXE" {
        filename "boot.ipxe";
        option routers 192.168.0.254, 192.168.0.253;
  }
  elsif option vendor-class-identifier = "d-i" {
        option routers 192.168.0.254;
  } else {
        option routers 192.168.0.254, 192.168.0.253;
        filename "undionly.kpxe";
  }

The netboot environment sends a "d-i" as the vendor-class-identifier so if i only provide one router at this point the net install continues.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netcfg (Ubuntu):
status: New → Confirmed
Revision history for this message
Oskar Liljeblad (oskar) wrote :

This happens to me too - most of the time but not always. I can't identify why dhclient does DHCPDECLINE, the F4 log during installation doesn't have the reason. It is worth noting that my isc-dhcp-server log has warnings like these:

dhcpd[26608]: reuse_lease: lease age N (secs) under 25% threshold, reply with unaltered, existing lease for X.Y.Z.W

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.