TIL: Restricting DiG to UDP only with +ignore

Petr Špaček pspacek at isc.org
Mon Dec 5 12:35:03 UTC 2022


On 05. 12. 22 3:49, Fred Morris wrote:
> If the UDP query returns TC=1 DiG retries with TCP. I want to see the 
> UDP results and am unable to. Specifying +notcp makes no difference. The 
> correct option is +ignore:
> 
>     # dig @127.0.0.1 'web_client\;*\;athena\;*.keys.redis.sophia.m3047' txt +notcp | tail
>     web_client\;*\;athena\;*.keys.redis.sophia.m3047. 30 IN TXT "web_client;194.55.186.216,404;athena;1670154435"
>     web_client\;*\;athena\;*.keys.redis.sophia.m3047. 30 IN TXT "web_client;43.134.92.151,400;athena;1670132664"
>     web_client\;*\;athena\;*.keys.redis.sophia.m3047. 30 IN TXT "web_client;35.162.155.28,200;athena;1670132664"
>     web_client\;*\;athena\;*.keys.redis.sophia.m3047. 30 IN TXT "web_client;159.89.118.246,200;athena;1670132664"
> 
>     ;; Query time: 9 msec
>     ;; SERVER: 127.0.0.1#53(127.0.0.1) (TCP)
>     ;; WHEN: Sun Dec 04 18:42:19 PST 2022
>     ;; MSG SIZE  rcvd: 7500
> 
>     # dig @127.0.0.1 'web_client\;*\;athena\;*.keys.redis.sophia.m3047' txt +ignore | tail
>     web_client\;*\;athena\;*.keys.redis.sophia.m3047. 30 IN TXT "web_client;80.94.92.40,200;athena;1670111034"
>     web_client\;*\;athena\;*.keys.redis.sophia.m3047. 30 IN TXT "web_client;161.35.213.88,200;athena;1670154435"
>     web_client\;*\;athena\;*.keys.redis.sophia.m3047. 30 IN TXT "web_client;103.10.62.92,404;athena;1670176114"
>     web_client\;*\;athena\;*.keys.redis.sophia.m3047. 30 IN TXT "web_client;54.185.160.223,200;athena;1670154435"
> 
>     ;; Query time: 16 msec
>     ;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
>     ;; WHEN: Sun Dec 04 18:42:26 PST 2022
>     ;; MSG SIZE  rcvd: 1193
> 
> The "tell" is that on the footer SERVER line it reports the protocol. 
> Note that in the first case it's TCP, even though +notcp was specified. 
> (The MSG SIZE is also a clue.)
> 
> Searching the intertubes wasn't much help. When I tried to search the 
> list archives I got a Gateway Timeout. :-( Anyway, it's been a minor 
> personal annoyance for a while; hopefully this helps somebody else with 
> a problem they didn't know they had.

If you have a specific proposal for docs we would be happy to improve 
the dig man page.

-- 
Petr Špaček



More information about the bind-users mailing list