PVE 9.0.5 - Assignment of DNS-Domainname in SDN of LXC containers inconsistent

hwehrs

Member
Dec 17, 2021
2
0
6
Hi all!

I've installed the new PVE 9 on a small testing machine, made all the updates from the no-subscription repository and installed dnsmasq and disabled the service. I intend to use it as DHCP and DNS in the SDN zones. All following steps are without any VLAN.

ERROR:
The containers don't receive the domain-name defined in the corresponding subnet/vnet. In my example, the container should have the FQDN "deb12.vnet0.i5zone". When I start the container, then the FQDN is "deb12.fritz.box".
I also created a Win10Pro-VM. It receives an IP in the correct subnet, but no DNS-Suffix at all.

My setup is as follows:

FQDN of the PVE9 is: pve-hw.fritz.box

Then I created an SDN zone named "i5zone" of type "simple".
1755544025295.png

Next I created a VNet called "vnet0" within that zone
1755544101501.png

and created the following subnet with DHCP

1755544530675.png
1755544551525.png

Last but not least of course clicked the apply button in the SDN main section.

In the next step I created a small debian12 container:

1755544853848.png
1755544880438.png
1755544920286.png
1755544959844.png

In the started container the screenshot of /etc/hostname, /etc/hosts, /etc/resolv.conf and the result of route -n:
1755546873844.png

In the Windows-VM an ipconfig /all outputs this:
1755546963007.png


My attempts to fix it:
Manually I edited the /etc/dnsmasq.d/i5zone/10-vnet0.conf and added the domain-name line as follows:
Code:
dhcp-range=set:i5zone-192.168.200.1-24,192.168.200.1,static,255.255.255.0,infinite
dhcp-option=tag:i5zone-192.168.200.1-24,option:router,192.168.200.1
dhcp-option=option:domain-name,vnet0.i5zone
interface=vnet0

--> This entry should be created automatically, when applying the SDN configuration.

This added the domain and search values in the /etc/resolv.conf:
Code:
root@deb12.fritz.box:~# cat /etc/resolv.conf
domain vnet0.i5zone
search vnet0.i5zone
nameserver 192.168.200.1

Also the Windows-VM received it's domain suffix.

The LXC hostname was only corrected, when I entered "vnet0.i5zone" in the DNS domain field in the container definition itself. It should have been left empty and the proper value should be copied from the SDN subnet configuration. So the container would automatically get the right setup when beeing moved between different subnets. Only if left empty in the subnet configuration, the host DNS suffix should be used.

While writing this, I discovered, that a reverse-dns query also doesn't give the correct result:
Code:
host 192.168.200.2
2.200.168.192.in-addr.arpa domain name pointer deb12.

host 192.168.200.4
4.200.168.192.in-addr.arpa domain name pointer DESKTOP-72S3RD6.

The correct reply should be:
Code:
2.200.168.192.in-addr.arpa domain name pointer deb12.vnet0.i5zone.
4.200.168.192.in-addr.arpa domain name pointer DESKTOP-72S3RD6.vnet0.i5zone.

Final question:
Did I miss something in between or understand something entirely wrong? Or is it a bug yet to be fixed? Or maybe a feature... (not so serious)

Thanks to all of you for reading all this and maybe giving me a little epiphany.

Best regards,
Holger