IP address of interfaces using DHCP aren't listed in DNS

Started by gareththered, April 15, 2024, 09:08:50 AM

Previous topic - Next topic
I have multiple VLAN interfaces on my new OpnSense install.

I have noticed that those which are configured to issue addresses using DHCP (ISC DHCP v4 - not tried anything else) don't show up when I run `dig` or `drill` to ask the router to resolve it's own FQDN (as set up in System > Settings > General).  Only the interfaces which don't use DHCP are listed.

gareth@admin:~$ dig gw1.example.org

; <<>> DiG 9.18.24-1-Debian <<>> gw1.example.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60738
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;gw1.example.org. IN A

;; ANSWER SECTION:
gw1.example.org. 3600 IN A 172.29.11.1
gw1.example.org. 3600 IN A 172.29.5.1
gw1.example.org. 3600 IN A 172.29.10.1
gw1.example.org. 3600 IN A 172.29.7.1
gw1.example.org. 3600 IN A 172.29.15.1
gw1.example.org. 3600 IN A 172.29.4.1
gw1.example.org. 3600 IN A 172.29.1.1
gw1.example.org. 3600 IN A 192.168.10.197

;; Query time: 0 msec
;; SERVER: 172.29.1.1#53(172.29.1.1) (UDP)
;; WHEN: Mon Apr 15 07:31:30 BST 2024
;; MSG SIZE  rcvd: 185


Notice that 172.29.4.1 and 172.29.5.1 are listed.  After configuring those interfaces to use DHCP, I get:

gareth@admin:~$ dig gw1.example.org

; <<>> DiG 9.18.24-1-Debian <<>> gw1.example.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50886
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;gw1.example.org. IN A

;; ANSWER SECTION:
gw1.example.org. 3600 IN A 172.29.10.1
gw1.example.org. 3600 IN A 172.29.7.1
gw1.example.org. 3600 IN A 172.29.15.1
gw1.example.org. 3600 IN A 172.29.1.1
gw1.example.org. 3600 IN A 192.168.10.197
gw1.example.org. 3600 IN A 172.29.11.1

;; Query time: 0 msec
;; SERVER: 172.29.1.1#53(172.29.1.1) (UDP)
;; WHEN: Mon Apr 15 08:00:40 BST 2024
;; MSG SIZE  rcvd: 153


Notice that 172.29.4.1 and 172.29.5.1 are now missing.

Is there a valid reason for this?  Is it a setting which I've missed?  Or is it a bug?