Score:4

Ubuntu Server 22.04 LTS no DHCP on startup

eg flag

I am wondering if there has been a regression with Ubuntu. Back when 18.04.3 came out, I noticed that my VM-based Ubuntu servers would no longer be able to get DHCP addresses from my Windows DHCP servers. I posted about it here.

21.10 seemed to resolve the issue, but of course, it is no longer supported. I created some more VMs with 22.04.3 and they now have the same issue. Stock install - everything seems to work, until you reboot. Then you get a 2-minute timeout and no network until you run sudo dhclient.

If I run ip a it shows the ens160 interface with an altname of enp3s0 (that's new) but no IP.

I've modified my /etc/netplan/00-installer-config.yaml to the following:

network:
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp-identifier: mac
      dhcp4: true
      optional: true
  version: 2

But it still won't connect until I manually get an IP after a reboot until I do sudo dhclient. I also tried using the original ens160 in place of enp3s0 with no effect.

sudo dmesg | grep dhcp shows the following entries:

[    7.568386] audit: type=1400 audit(1668726304.016:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=742 comm="apparmor_parser"
[    7.568396] audit: type=1400 audit(1668726304.016:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-helper" pid=742 comm="apparmor_parser"

I know there was an AppArmor bug that caused this behavior before, and that was where the evidence was. I don't know enough about the guts of Ubuntu to say if this is normal output or not, so I have included it.

Any help is much appreciated! I'd love to be able to have new VMs not need a systemd workaround, that manually runs dhclient at startup, which is the workaround I'm using.

eg flag
@heynnema - This is the new question. I really thought we had this licked in 21.10. Could there have been a regression? Thank you again for your extensive knowledge!
us flag
I have a new VM I created in VirtualBox without this issue and a VM I got from VMware and converted and it does seem to have the same problem. Confusing and very frustrating!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.