I changed it a bit because I read somewhere that the fixed IP’s should be in de dhcp range:
root@oev2 ~ # lxc network show lxdbr0
config:
ipv4.address: 10.10.0.1/8
ipv4.dhcp.ranges: 10.10.0.1-10.11.254.254
ipv4.nat: "true"
ipv6.address: fd42:6b45:ea69:53b3::1/64
ipv6.nat: "true"
raw.dnsmasq: conf-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dns.conf
description: ""
name: lxdbr0
type: bridge
used_by:
- /1.0/containers/kas-demo
- /1.0/containers/test2
managed: true
status: Created
locations:
- none
dns.conf:
dhcp-host=kas-helder,10.10.16.1
dhcp-host=kas-demo.lxd,10.10.24.1
I added the domain (lxd) because I saw it when running dnsmasq by hand and checking the output:
dnsmasq-dhcp: RTR-ADVERT(lxdbr0) fd42:6b45:ea69:53b3::
dnsmasq-dhcp: 3090128979 available DHCP range: 10.10.0.1 – 10.11.254.254
dnsmasq-dhcp: 3090128979 client provides name: kas-demo
dnsmasq-dhcp: 3090128979 DHCPDISCOVER(lxdbr0) 10.10.176.91 00:16:3e:c3:2a:20
dnsmasq-dhcp: 3090128979 tags: known, lxdbr0
dnsmasq-dhcp: 3090128979 DHCPOFFER(lxdbr0) 10.10.176.91 00:16:3e:c3:2a:20
dnsmasq-dhcp: 3090128979 requested options: 1:netmask, 28:broadcast, 2:time-offset, 3:router,
dnsmasq-dhcp: 3090128979 requested options: 15:domain-name, 6:dns-server, 119:domain-search,
dnsmasq-dhcp: 3090128979 requested options: 12:hostname, 44:netbios-ns, 47:netbios-scope,
dnsmasq-dhcp: 3090128979 requested options: 26:mtu, 121:classless-static-route, 42:ntp-server
dnsmasq-dhcp: 3090128979 next server: 10.10.0.1
dnsmasq-dhcp: 3090128979 sent size: 1 option: 53 message-type 2
dnsmasq-dhcp: 3090128979 sent size: 4 option: 54 server-identifier 10.10.0.1
dnsmasq-dhcp: 3090128979 sent size: 4 option: 51 lease-time 1h
dnsmasq-dhcp: 3090128979 sent size: 4 option: 58 T1 30m
dnsmasq-dhcp: 3090128979 sent size: 4 option: 59 T2 52m30s
dnsmasq-dhcp: 3090128979 sent size: 4 option: 1 netmask 255.0.0.0
dnsmasq-dhcp: 3090128979 sent size: 4 option: 28 broadcast 10.255.255.255
dnsmasq-dhcp: 3090128979 sent size: 4 option: 3 router 10.10.0.1
dnsmasq-dhcp: 3090128979 sent size: 4 option: 6 dns-server 10.10.0.1
dnsmasq-dhcp: 3090128979 sent size: 3 option: 15 domain-name lxd
dnsmasq-dhcp: 3090128979 sent size: 8 option: 12 hostname kas-demo
dnsmasq-dhcp: 3090128979 available DHCP range: 10.10.0.1 – 10.11.254.254
dnsmasq-dhcp: 3090128979 client provides name: kas-demo
dnsmasq-dhcp: 3090128979 DHCPREQUEST(lxdbr0) 10.10.176.91 00:16:3e:c3:2a:20
dnsmasq-dhcp: 3090128979 tags: known, lxdbr0
dnsmasq-dhcp: 3090128979 DHCPACK(lxdbr0) 10.10.176.91 00:16:3e:c3:2a:20 kas-demo
dnsmasq-dhcp: 3090128979 requested options: 1:netmask, 28:broadcast, 2:time-offset, 3:router,
dnsmasq-dhcp: 3090128979 requested options: 15:domain-name, 6:dns-server, 119:domain-search,
dnsmasq-dhcp: 3090128979 requested options: 12:hostname, 44:netbios-ns, 47:netbios-scope,
dnsmasq-dhcp: 3090128979 requested options: 26:mtu, 121:classless-static-route, 42:ntp-server
dnsmasq-dhcp: 3090128979 next server: 10.10.0.1
dnsmasq-dhcp: 3090128979 sent size: 1 option: 53 message-type 5
dnsmasq-dhcp: 3090128979 sent size: 4 option: 54 server-identifier 10.10.0.1
dnsmasq-dhcp: 3090128979 sent size: 4 option: 51 lease-time 1h
dnsmasq-dhcp: 3090128979 sent size: 4 option: 58 T1 30m
dnsmasq-dhcp: 3090128979 sent size: 4 option: 59 T2 52m30s
dnsmasq-dhcp: 3090128979 sent size: 4 option: 1 netmask 255.0.0.0
dnsmasq-dhcp: 3090128979 sent size: 4 option: 28 broadcast 10.255.255.255
dnsmasq-dhcp: 3090128979 sent size: 4 option: 3 router 10.10.0.1
dnsmasq-dhcp: 3090128979 sent size: 4 option: 6 dns-server 10.10.0.1
dnsmasq-dhcp: 3090128979 sent size: 3 option: 15 domain-name lxd
dnsmasq-dhcp: 3090128979 sent size: 8 option: 12 hostname kas-demo
dnsmasq-dhcp: RTR-ADVERT(lxdbr0) fd42:6b45:ea69:53b3::
dnsmasq-dhcp: RTR-SOLICIT(lxdbr0) 00:16:3e:c3:2a:20
dnsmasq-dhcp: RTR-ADVERT(lxdbr0) fd42:6b45:ea69:53b3::
dnsmasq-dhcp: SLAAC-CONFIRM(lxdbr0) fd42:6b45:ea69:53b3:216:3eff:fec3:2a20 kas-demo
dnsmasq-dhcp: RTR-ADVERT(lxdbr0) fd42:6b45:ea69:53b3::
dnsmasq-dhcp: RTR-ADVERT(lxdbr0) fd42:6b45:ea69:53b3::
Nothing special in the lxdbr0 dir:
root@oev2 /var/snap/lxd/common/lxd/networks/lxdbr0 # ls -al
total 28
drwxr-xr-x 3 root root 4096 May 2 17:41 .
drwxr-xr-x 3 root root 4096 May 2 14:20 …
-rw-r–r-- 1 root root 772 May 2 17:40 dns.conf
drwxr-xr-x 2 root root 4096 May 2 17:41 dnsmasq.hosts
-rw-r–r-- 1 root root 150 May 2 17:41 dnsmasq.leases
-rw-r–r-- 1 root root 5 May 2 17:41 dnsmasq.pid
-rw-r–r-- 1 root root 60 May 2 17:41 dnsmasq.raw
I even removed everything (exect dns.conf) and it was all created back by lxd.