funny,
but it doesn’t work for me.
I created a test domain and add a record (t1.test) and a service (myservice._tcp.test)
ubuntu@maas:~$ dig @localhost SRV myservice_.tcp.test
; <<>> DiG 9.18.18-0ubuntu0.22.04.1-Ubuntu <<>> @localhost SRV myservice_.tcp.test
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 30686
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 063803e152ea1b83010000006573375b77ea0b73bdcd9af8 (good)
;; QUESTION SECTION:
;myservice_.tcp.test. IN SRV
;; AUTHORITY SECTION:
test. 30 IN SOA test. nobody.example.com. 893 600 1800 604800 30
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(localhost) (UDP)
;; WHEN: Fri Dec 08 15:33:47 UTC 2023
;; MSG SIZE rcvd: 134
ubuntu@maas:~$ dig @localhost A t1.test
; <<>> DiG 9.18.18-0ubuntu0.22.04.1-Ubuntu <<>> @localhost A t1.test
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52139
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 06c4597470e221e8010000006573376200d6884f76981e02 (good)
;; QUESTION SECTION:
;t1.test. IN A
;; ANSWER SECTION:
t1.test. 30 IN A 192.168.1.1
;; Query time: 4 msec
;; SERVER: 127.0.0.1#53(localhost) (UDP)
;; WHEN: Fri Dec 08 15:33:54 UTC 2023
;; MSG SIZE rcvd: 80