본문 바로가기

Ubuntu/linux Command

Linux System Command (nslookup)

728x90

domain 관련 조회를 할 수 있는 명령어

 

 

용례1 : nslookup google.com

   google.com 의 IP 를 출력

 

Server:		210.220.163.82            // dns server address
Address:	210.220.163.82#53

Non-authoritative answer:
Name:	google.com
Address: 216.58.220.110               // google.com IP 주소
;; Got recursion not available from 210.220.163.82, trying next server
;; Got recursion not available from 219.250.36.130, trying next server
Name:	google.com
Address: 2404:6800:4004:810::200e

 

 

용례2 : nslookup -type=ns naver.com

-type=ns : name server 에 대한 정보를 가져온다.

 

$nslookup -type=ns naver.com

Server:		210.220.163.82
Address:	210.220.163.82#53

Non-authoritative answer:
naver.com	nameserver = ns2.naver.com.
naver.com	nameserver = e-ns.naver.com.
naver.com	nameserver = ns1.naver.com.

 

 

용례2 : nslookup -query=mx google.com

  -query=mx : Mail Record 확인

 

$nslookup -query=mx naver.com

Server:		210.220.163.82
Address:	210.220.163.82#53

Non-authoritative answer:
naver.com	mail exchanger = 10 mx2.naver.com.
naver.com	mail exchanger = 10 mx3.naver.com.
naver.com	mail exchanger = 10 mx1.naver.com.

 

 

용례4 : nslookup -q=cname google.com

  -q=cname  : canonical name field 조회.

 

A Type vs cname Type

A record type이란  도메인(domain) name에 IP Address를 매핑하는 방식
cname Type이란 하나의 도메인에 도메인 별칭을 부여하는 방식 (도메인의 또 다른 도메인 이름)

hobbycoding.site -> hobbycoding.tistory.com (CNAME) 
hobbycoding.tistory.com -> 211.231.99.250 (A record)

'Ubuntu > linux Command' 카테고리의 다른 글

Linux System Command (PS) - Process Status  (0) 2021.08.07
Linux System Command (whois)  (0) 2021.08.06
Linux System Command (source)  (0) 2021.08.05
Linux System Command (locale)  (0) 2021.08.05
Linux Basic Command (ln)  (0) 2021.08.05