Sugestions for SDN Interface

glauco.lins

Member
Sep 9, 2021
8
0
21
37
I have just enabled the SDN in my PVE, allowing containers ans VM's discovery each other by hostname.
However, the SDN interface is quite confusing...

Take the screenshot below as example, in the IPAM page
1772124341202.png

Column "Name / VMID", don't show LXC/VM name or hostname.
Reading would be improved if the column listed the same names as in the "Datacenter" section.
For example, instead of "101", name it as "101 (CT-Tailscale)"

Also, if you rename a config file and disks such as "/etc/pve/lxc/100.conf" to "/etc/pve/lxc/999.conf", the Datacenter pannel gets updated with the new 999 Container ID, but the IPAM page stays outdated with the old 100 ID.

Regarding the IP Address sort order, as you can see in the screnshot, it is String sorted, instead of numeric.
IP's 192.168.253.10x are listed before 192.168.253.2
IP 192.168.253.254 is listed before 192.168.253.3

Reading IP list will get very cluttered as the lease list grows
Example:
  • x.x.x.1
  • x.x.x.15
  • x.x.x.110
  • x.x.x.150
  • x.x.x.2
  • x.x.x.26
  • x.x.x.201
  • x.x.x.254
  • x.x.x.3
  • x.x.x.34
  • x.x.x.4
In order to allow devices discover each other by hostname, I had to create a config file with the following containt:
Code:
#/etc/dnsmasq.d/zhome/20-vhome.conf

domain=lan
#host hostname
address=/pve.lan/192.168.253.254
#subnet default entry name
address=/gateway.lan/192.168.253.254

This allows me to ping or connect between hostnames using naming convention "hostname.lan", for example, "ping ct-mariadb.lan"

A simple checkbox during the creation of the Zone or VNet, could do that transparently.
For exemple, "Allow Zone DNS to serve clients hostnames"
Thus, a search domain with the Zone name would be created. In my case "hostname.zhome"
This would fit perfectly with the subnet DNS prefix, for example "hostname.<subnet-prefix>.zhome"

1772125647330.png

And DHCP ranges misses a DHCP lease time. It defaults to "infinite" in the vnet configuration.

1772125710078.png

Code:
#/etc/dnsmasq.d/zhome/10-vhome.conf

dhcp-range=set:zhome-192.168.253.254-24,192.168.253.254,static,255.255.255.0,infinite
dhcp-option=tag:zhome-192.168.253.254-24,option:router,192.168.253.254
interface=vhome