DHCP not working on Ubuntu LXC?

jlficken

Member
Sep 6, 2022
42
5
13
It’s set up in the config and works on an existing LXC but not a newly created one.

I’m not sure where to even start?
 
Do you mean a new ubuntu 24.04 or a newly created older version like (20.04??) ?
Best way to start is to say what you are exactly trying, what you are expecting and what instead you are getting (the error) ...
 
24.04 from the Template in Proxmox, however, I tried a 22.04 from the template as well.

The config between the working LXC and the non-working tests looks identical.

If I set a VLAN tag on the non-working containers to an existing VLAN it works, however, trying to use the untagged default VLAN doesn’t.

I can set a static IP for the untagged VLAN and it works.
 
Last edited:
  • Like
Reactions: waltar
24.04 works if you define dhcp in create lxc answers, then stop, go to lxc options, select nesting and then start the lxc.
 
24.04 works if you define dhcp in create lxc answers, then stop, go to lxc options, select nesting and then start the lxc.

So I have to create it without nesting enabled at first as I created it with nesting enabled initially?
 
If you do a privileged lxc nesting option is not given but as your answer looks like you create an unprivileged one.
But anyway if it helps to the problem why not ?!
 
Mine are all unprivileged.

It's so weird as I have another cluster and DHCP on the untagged VLAN works just fine. They're all using the same switches and same basic hardware. I've compared the interfaces files as well and cloned them but an untagged VLAN just won't work on the LXC's on one cluster. It works fine with VM's though.
 
Ubuntu likes it special (zfs developers are angry again and again about ubuntu developers special patches which broke zfs) ... you could use rocky or debian lxc ... but you are right, why easy if complicated is possible too ? :cool:
 
Last edited:
Debian seems to behave the same way.

I'm completely at a loss. I guess I'll go through the switch configurations again and see if there's something different between the 2 clusters that I missed before, however, I can't imagine what that'd be when I can set a static IP and it works.
 
I'm at a loss as to where to go from here as I even took it off of the vmbr that is VLAN aware and put it on the main management interface and it still won't grab an IP through DHCP.

It seems like untagged traffic isn't being passed for some reason and I don't know why.
 
Another oddity...

I was testing trying to ping the trouble LXC from a Windows VM on the same subnet and it would time out while a different LXC was fine.

I decided to ping the Windows VM from the trouble LXC and once I did that I can now ping the trouble LXC from the Windows VM.

Neither machine has a firewall enabled.

I'm contemplating rebooting the Proxmox nodes and switches.

I don't have access to the Sonicwall router so I'll have to get someone else to do that tonight.
 
I've determined it's something weird that's going on even after I moved to Debian 12 with the same issue, however, there's a new twist.

I can't connect (ping or otherwise) to this LXC from any other machine on the network until I ping the machine's IP from the LXC at which point everything works just fine.
 
That's so weird....

I know that I'd tried putting the native VLAN (1) into the VLAN Tag box before and it didn't work, however, I tried it today and now it grabs a DHCP address.