Re: [Dnsmasq-discuss] Why is a different TTL resturned for bare and FQDN queries?

2019-03-15 Thread Simon Kelley
Sorry for lack of reply to this, I hope you're still there, Wojtek.


I think this may have something to do with your other post about
authoritative mode - one of the answers has the "aa" flag set, and the
other one doesn't.


It would be useful, for both of the situations you describe, to set
--log-queries in dnsmasq and post what it actually logs during these tests.



Cheers,

Simon.


On 02/02/2019 21:56, Wojtek Swiatek wrote:
> 
> switch-3 is a device which gets its IP via DHCP from dnsmasq. When
> trying to resolve it on dnsmasq (which expands hosts):
> 
> 
> root@rpi1 ~# dig @10.200.0.40  switch-3
> 
> ; <<>> DiG 9.11.4-4-Raspbian <<>> @10.200.0.40  switch-3
> ; (1 server found)
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57399
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
> 
> ;; OPT PSEUDOSECTION:
> ; EDNS: version: 0, flags:; udp: 4096
> ;; QUESTION SECTION:
> ;switch-3.                      IN      A
> 
> ;; ANSWER SECTION:
> switch-3.               0       IN      A       10.200.0.123
> 
> ;; Query time: 0 msec
> ;; SERVER: 10.200.0.40#53(10.200.0.40)
> ;; WHEN: Sat Feb 02 22:52:01 CET 2019
> ;; MSG SIZE  rcvd: 53
> 
> 
> 
> root@rpi1 ~# dig @10.200.0.40  switch-3.swtk.info
> 
> 
> ; <<>> DiG 9.11.4-4-Raspbian <<>> @10.200.0.40 
> switch-3.swtk.info 
> ; (1 server found)
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39739
> ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
> 
> ;; OPT PSEUDOSECTION:
> ; EDNS: version: 0, flags:; udp: 4096
> ;; QUESTION SECTION:
> ;switch-3.swtk.info .            IN      A
> 
> ;; ANSWER SECTION:
> switch-3.swtk.info .     600     IN      A   
>    10.200.0.123
> 
> ;; Query time: 0 msec
> ;; SERVER: 10.200.0.40#53(10.200.0.40)
> ;; WHEN: Sat Feb 02 22:52:06 CET 2019
> ;; MSG SIZE  rcvd: 63
> 
> 
> 
> 
> So one response (to the bare query provides a TTL of 0, and the other
> one (FQDN) - 600.
> 
> I do not know whether this normal/expected or not, and whether this is a
> problem or not?
> 
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] Why is a different TTL resturned for bare and FQDN queries?

2019-02-02 Thread Wojtek Swiatek
switch-3 is a device which gets its IP via DHCP from dnsmasq. When trying
to resolve it on dnsmasq (which expands hosts):


root@rpi1 ~# dig @10.200.0.40 switch-3

; <<>> DiG 9.11.4-4-Raspbian <<>> @10.200.0.40 switch-3
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57399
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;switch-3.  IN  A

;; ANSWER SECTION:
switch-3.   0   IN  A   10.200.0.123

;; Query time: 0 msec
;; SERVER: 10.200.0.40#53(10.200.0.40)
;; WHEN: Sat Feb 02 22:52:01 CET 2019
;; MSG SIZE  rcvd: 53



root@rpi1 ~# dig @10.200.0.40 switch-3.swtk.info

; <<>> DiG 9.11.4-4-Raspbian <<>> @10.200.0.40 switch-3.swtk.info
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39739
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;switch-3.swtk.info.IN  A

;; ANSWER SECTION:
switch-3.swtk.info. 600 IN  A   10.200.0.123

;; Query time: 0 msec
;; SERVER: 10.200.0.40#53(10.200.0.40)
;; WHEN: Sat Feb 02 22:52:06 CET 2019
;; MSG SIZE  rcvd: 63




So one response (to the bare query provides a TTL of 0, and the other one
(FQDN) - 600.

I do not know whether this normal/expected or not, and whether this is a
problem or not?
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss