DNS - s50600822/Notes GitHub Wiki

/etc/resolv.conf

check DNS Server

scutil --dns

look up mail exchange server

dig gmail.com MX

; <<>> DiG 9.10.6 <<>> gmail.com MX
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18206
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;gmail.com.			IN	MX

;; ANSWER SECTION:
gmail.com.		3600	IN	MX	40 alt4.gmail-smtp-in.l.google.com.
gmail.com.		3600	IN	MX	30 alt3.gmail-smtp-in.l.google.com.
gmail.com.		3600	IN	MX	5 gmail-smtp-in.l.google.com.
gmail.com.		3600	IN	MX	10 alt1.gmail-smtp-in.l.google.com.
gmail.com.		3600	IN	MX	20 alt2.gmail-smtp-in.l.google.com.

;; ADDITIONAL SECTION:
gmail-smtp-in.l.google.com. 142	IN	AAAA	2404:6800:4003:c01::1a

;; Query time: 158 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue Apr 20 03:16:43 AEST 2021
;; MSG SIZE  rcvd: 189

5, 10, 20, 30, 40 are priority

to be more detail

bash

dig +nocmd @8.8.8.8 hoaphan.net +trace
.			66844	IN	NS	a.root-servers.net.
.			66844	IN	NS	b.root-servers.net.
.			66844	IN	NS	c.root-servers.net.
.			66844	IN	NS	d.root-servers.net.
.			66844	IN	NS	e.root-servers.net.
.			66844	IN	NS	f.root-servers.net.
.			66844	IN	NS	g.root-servers.net.
.			66844	IN	NS	h.root-servers.net.
.			66844	IN	NS	i.root-servers.net.
.			66844	IN	NS	j.root-servers.net.
.			66844	IN	NS	k.root-servers.net.
.			66844	IN	NS	l.root-servers.net.
.			66844	IN	NS	m.root-servers.net.
.			66844	IN	RRSIG	NS 8 0 518400 20210502050000 20210419040000 14631 . qsr95z7k9ROjoa1cBYAidwVaZhSWm0cCSekTR1a5HqisTnbZ+n3lOxH4 of6HkFNGzf01Tn3ADhgaxBGm+4knAztN1NA7N1ErATVU95M3k9hxvdLc 2CzMsH1jIM6WbY/AjuclxUP75ReOedPo/j+F+lwA+Tclb7RM9vcStdyG EVzx3PNkL4hFPWczqlFH62PHxCMYWTDziQ2meiFQ6e2uSHZcV2dw1kjb eepqfBeRrkplIdSLbkJuze6kMAAsbFtbmDQ4Ac5C6etbvoWeNDsApDdi 0lyg9mHEEJlGBpUDAOYWnPBmRr2IEsUh0JIB4Mi73h9/0UubjYDkknVQ zcMSJg==
;; Received 525 bytes from 8.8.8.8#53(8.8.8.8) in 84 ms

net.			172800	IN	NS	a.gtld-servers.net.
net.			172800	IN	NS	b.gtld-servers.net.
net.			172800	IN	NS	c.gtld-servers.net.
net.			172800	IN	NS	d.gtld-servers.net.
net.			172800	IN	NS	e.gtld-servers.net.
net.			172800	IN	NS	f.gtld-servers.net.
net.			172800	IN	NS	g.gtld-servers.net.
net.			172800	IN	NS	h.gtld-servers.net.
net.			172800	IN	NS	i.gtld-servers.net.
net.			172800	IN	NS	j.gtld-servers.net.
net.			172800	IN	NS	k.gtld-servers.net.
net.			172800	IN	NS	l.gtld-servers.net.
net.			172800	IN	NS	m.gtld-servers.net.
net.			86400	IN	DS	35886 8 2 7862B27F5F516EBE19680444D4CE5E762981931842C465F00236401D 8BD973EE
net.			86400	IN	RRSIG	DS 8 1 86400 20210502050000 20210419040000 14631 . PvqXMSu1zrOjUKpkKBKPSsfxYmKBeppkv3biWTLybgVxlwND1m4nNxYD nVEa89OZUwdfoKi9ZbBhDHRdP+CBkdH1YIacWr4ZXDkWjDHVQiSjqeI3 csmI5bEIqIig5tvUywX2xjcdVBdG4Ai1epatQBbp2+GOVFXDE5iELlFO rk+p/QJqDFF5EnQccczluXBrBL6iEvfowgiJ64mMJBMBmN0nJNrhBTWh FA+Nwl47W7TCpqOd/Xy8Ho1tddmuPYVm6wDm90D5MR5N4gK0iOKAhkgO JQySaYl7WGBVRM8dc7M++qeojPVZ4mgPR+3iQWQjtL3u9TuoBj3zMtdi x3RUZg==
;; Received 1168 bytes from 199.9.14.201#53(b.root-servers.net) in 280 ms

hoaphan.net.		172800	IN	NS	ns-144.awsdns-18.com.
hoaphan.net.		172800	IN	NS	ns-521.awsdns-01.net.
hoaphan.net.		172800	IN	NS	ns-1345.awsdns-40.org.
hoaphan.net.		172800	IN	NS	ns-1965.awsdns-53.co.uk.
A1RT98BS5QGC9NFI51S9HCI47ULJG6JH.net. 86400 IN NSEC3 1 1 0 - A1RUUFFJKCT2Q54P78F8EJGJ8JBK7I8B  NS SOA RRSIG DNSKEY NSEC3PARAM
A1RT98BS5QGC9NFI51S9HCI47ULJG6JH.net. 86400 IN RRSIG NSEC3 8 2 86400 20210426053121 20210419042121 6203 net. p3frHZfGNUv47idw86w/wJdcuCDx5HVsJclf9l5mQ8ng694u/onG8/Wz QYzhelNJ1pCTqR/7V0dHWRsFG1CbUDj2yyXkf19oer+sCPPKgK1YTIkv +kMtbtobyzDH2eg6ljO1CVtAz9K8adJwiMJrx6zowSy16fF1sB55NcYI /C1TP4GYwuW4DJ6naAwTpp7OtCzkHfZ0Srb6CvBVIa2hDQ==
DLOSSTSUTHN8FQIAKF7VVFUR8DSPKK43.net. 86400 IN NSEC3 1 1 0 - DLOULVG4DAI669UC8CLLMIFFKCKG23L9  NS DS RRSIG
DLOSSTSUTHN8FQIAKF7VVFUR8DSPKK43.net. 86400 IN RRSIG NSEC3 8 2 86400 20210425052545 20210418041545 6203 net. Z5BQkID6C1h0l3LVzf3jUHJjeqsRf9j6VeTUWtvu8oPKO6At+UPu84y3 1spe6yFXE2Srno1ZVXG/atrpx3X5i8ypGwSHPSpQ1UuTXTo3tEQsKz+z 2PrvF4/TplvRqVdsIvvNd9WR3+gIeDIGvRi40x4UQ5LbMSHLa+SQXJUk emMDHcJlg2/W84wMkatWmYJRLRbHk3TFDtcWaBpPge/Rfw==
;; Received 742 bytes from 192.26.92.30#53(c.gtld-servers.net) in 252 ms

hoaphan.net.		60	IN	A	65.8.129.20
hoaphan.net.		60	IN	A	65.8.129.63
hoaphan.net.		60	IN	A	65.8.129.93
hoaphan.net.		60	IN	A	65.8.129.115
hoaphan.net.		172800	IN	NS	ns-1345.awsdns-40.org.
hoaphan.net.		172800	IN	NS	ns-144.awsdns-18.com.
hoaphan.net.		172800	IN	NS	ns-1965.awsdns-53.co.uk.
hoaphan.net.		172800	IN	NS	ns-521.awsdns-01.net.
;; Received 241 bytes from 205.251.192.144#53(ns-144.awsdns-18.com) in 115 ms