[Linux] Checking name servers with the dig command

Tadashi Shigeoka ·  Thu, September 18, 2014

You can use the dig command to check the name servers for a specific domain.

Linux
dig codenote.net NS 

; <<>> DiG 9.8.3-P1 <<>> codenote.net NS
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44299
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;codenote.net.      IN  NS

;; ANSWER SECTION:
codenote.net.    17207  IN  NS  01.dnsv.jp.
codenote.net.    17207  IN  NS  02.dnsv.jp.
codenote.net.    17207  IN  NS  03.dnsv.jp.
codenote.net.    17207  IN  NS  04.dnsv.jp.

;; Query time: 2 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Sep 18 12:03:49 2014
;; MSG SIZE  rcvd: 105

You can check with dig domain_name NS, and the name servers are in the ANSWER SECTION part: 01.dnsv.jp. ~ 04.dnsv.jp.

Reference Information

That’s all from the Gemba.