When I execute dig example.com
, one of the returned line states:
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
Can you explain the meaning of each of the components in this line?
When I execute dig example.com
, one of the returned line states:
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
Can you explain the meaning of each of the components in this line?
(127.0.0.53)
: the target DNS server for the query was127.0.0.53
;127.0.0.53#53
: the target DNS server was resolved to127.0.0.53
and contacted on port #53
;(UDP)
: the name resolution happened via UDP.Why
127.0.0.53
is picked as the target DNS server for the query is explained down below; but if you tried and switch things up by askingdig
to resolve the name using a specific DNS server (specifying a domain name instead of an IP address) via TCP, such as in:That would've resulted in:
Note that
127.0.0.53
is actually your own machine (which can easily be told by the range the address falls in), and what's listening on port #53
is (most likely)systemd-resolved
's DNS stub listener.Here
127.0.0.53
is queried because, as perman dig
:And, by deafult,
/etc/resolv.conf
contains an entry for127.0.0.53
: