I’m trying to lease static IPs to the 4 nodes (Ubuntu 24.03-based) of my cluster by using dnsmasq running on the (OpenWRT 23-based) control board. This works neatly with 3 of the nodes, which get the IPs 10.20.0.12, 10.20.0.13, and 10.20.0.14, respectively. Node #1 (blade3n1), unfortunately, gets the (wrong) IP 10.20.0.15 instead of 10.20.0.11 for its interface pci0 (irrelevant interfaces omitted):
mixtile@blade3n1:~$ ip addr show
6: pci0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65202 qdisc fq_codel state UP group default qlen 1000
link/ether 02:9f:f1:8e:cb:0a brd ff:ff:ff:ff:ff:ff
inet 10.20.0.15/24 metric 100 brd 10.20.0.255 scope global pci0
valid_lft forever preferred_lft forever
inet6 fe80::9f:f1ff:fe8e:cb0a/64 scope link
valid_lft forever preferred_lft forever
There is no static IP configured for this interface:
mixtile@blade3n1:~$ sudo cat /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
pci0:
dhcp4: yes
And dnsmasq has been told to lease 10.20.0.11 to blade3n1:
mixtile@ClusterBox:~$ sudo cat /etc/dnsmasq.conf
listen-address=::1,127.0.0.1,10.20.0.1,fdb0:557a:1911:10::1
interface=eth_pci
dhcp-option=option:netmask,255.255.255.0
dhcp-option=option:router,10.20.0.1
dhcp-option=option:dns-server,10.20.0.1
dhcp-option=option:ntp-server,192.168.178.1
dhcp-range=10.20.0.101,10.20.0.127,5m
dhcp-host=02:9f:f1:8e:cb:0a,blade3n1,10.20.0.11,infinite # Why does blade3n1 then get 10.20.0.15??
dhcp-host=02:c0:4e:c7:80:0a,blade3n2,10.20.0.12,infinite
dhcp-host=02:b9:24:b7:73:0a,blade3n3,10.20.0.13,infinite
dhcp-host=02:a4:f1:25:38:0a,blade3n4,10.20.0.14,infinite
no-resolv
server=192.168.178.1
log-dhcp
log-queries
I have to restart the DHCP client on blade3n1:
mixtile@blade3n1:~$ sudo dhclient -4 -v
Internet Systems Consortium DHCP Client 4.4.3-P1
xid: warning: no netdev with useable HWADDR found for seed's uniqueness enforcement
xid: rand init seed (0x7dd195f9) built using gethostid
DHCPDISCOVER on pci0 to 255.255.255.255 port 67 interval 3 (xid=0x42d89578)
DHCPOFFER of 10.20.0.11 from 10.20.0.1
DHCPREQUEST for 10.20.0.11 on pci0 to 255.255.255.255 port 67 (xid=0x7895d842)
DHCPACK of 10.20.0.11 from 10.20.0.1 (xid=0x42d89578)
Setting LLMNR support level "yes" for "6", but the global support level is "no".
Timeout too large reducing to: 2147483646 (TIME_MAX - 1)
bound to 10.20.0.11 -- renewal in 2147483648 seconds.
Then I do get the desired IP, but the wrong one still remains there:
mixtile@blade3n1:~$ ip addr show
6: pci0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65202 qdisc fq_codel state UP group default qlen 1000
link/ether 02:9f:f1:8e:cb:0a brd ff:ff:ff:ff:ff:ff
inet 10.20.0.15/24 metric 100 brd 10.20.0.255 scope global pci0
valid_lft forever preferred_lft forever
inet 10.20.0.11/24 brd 10.20.0.255 scope global secondary pci0
valid_lft forever preferred_lft forever
inet6 fe80::9f:f1ff:fe8e:cb0a/64 scope link
valid_lft forever preferred_lft forever
But, I still can’t find the IP 10.20.0.15 anywhere in my net config (node or control board), so where does it come from? The network config of all four nodes is the same.