"리눅스 nslookup"의 두 판 사이의 차이

 
(다른 사용자 한 명의 중간 판 16개는 보이지 않습니다)
5번째 줄: 5번째 줄:


==실행 예시==
==실행 예시==
===[[구글 퍼블릭 DNS]]===
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# nslookup
[root@zetawiki ~]# nslookup
19번째 줄: 20번째 줄:
Authoritative answers can be found from:
Authoritative answers can be found from:
</source>
</source>
:→[[구글 퍼블릭 DNS]](8.8.8.8) 에 대한 정보 쿼리


===네이버===
<source lang="console">
<source lang="console">
john@ubuntu:~$ nslookup www.naver.com
john@ubuntu:~$ nslookup naver.com
Server: 127.0.0.53
Server: 127.0.0.53
Address: 127.0.0.53#53
Address: 127.0.0.53#53


Non-authoritative answer:
Non-authoritative answer:
www.naver.com canonical name = www.naver.com.nheos.com.
Name: naver.com
www.naver.com.nheos.com canonical name = www.naver.com.edgekey.net.
Address: 125.209.222.141
www.naver.com.edgekey.net canonical name = e6030.a.akamaiedge.net.
Name: naver.com
Name: e6030.a.akamaiedge.net
Address: 210.89.164.90
Address: 173.223.141.49
Name: naver.com
Address: 210.89.160.88
Name: naver.com
Address: 125.209.222.142
</source>
:→ Server: 127.0.0.53 은 내 시스템의 DNS를 가리킴.
:→ "Non-authoritative answer:"는 naver 의 DNS가 아닌 내 시스템의 DNS(캐시 정보)를 통해 정보를 획득 했기 때문임
 
====내 시스템의 DNS가 아닌 네이버 DNS를 통해 직접 확인====
<source lang='console'>
john@ubuntu:~$ nslookup -type=ns naver.com
Server: 127.0.0.53
Address: 127.0.0.53#53
 
Non-authoritative answer:
naver.com nameserver = ns2.naver.com.
naver.com nameserver = ns1.naver.com.
 
Authoritative answers can be found from:
 
john@ubuntu:~$ nslookup naver.com ns1.naver.com
Server: ns1.naver.com
Address: 125.209.248.6#53
 
Name: naver.com
Address: 125.209.222.141
Name: naver.com
Address: 210.89.164.90
Name: naver.com
Address: 210.89.160.88
Name: naver.com
Address: 125.209.222.142
</source>
:→ Naver DNS를 "nslookup -type=ns naver.com" 명령으로 확인하면 ns1.naver.com, ns2.naver.com 의 2개로 운영됨이 확인 가능함. ns1.naver.com DNS를 통해 "nslookup naver.com ns1.naver.com" 명령으로 확인하면 "Non-authoritative answer:" 가 사라짐을 확인 할 수 있음
 
===내 시스템의 DNS 정보 확인===
Ubuntu 18.04 에서 아래와 같이 확인 가능
<source lang='console'>
john@ubuntu:~$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
 
nameserver 127.0.0.53
</source>
</source>


47번째 줄: 103번째 줄:
*https://en.wikipedia.org/wiki/Nslookup
*https://en.wikipedia.org/wiki/Nslookup


[[분류: nslookup]]
[[분류: /usr/bin]]
[[분류: /usr/bin]]
[[분류: 리눅스 네트워크]]
[[분류: 리눅스 네트워크]]

2020년 7월 11일 (토) 22:56 기준 최신판

1 개요[ | ]

리눅스 nslookup
/usr/bin/nslookup
  • 도메인 네임서버의 정보를 쿼리하기 위해 사용

2 실행 예시[ | ]

2.1 구글 퍼블릭 DNS[ | ]

[root@zetawiki ~]# nslookup
> exit
[root@zetawiki ~]# nslookup 8.8.8.8
Server:		210.220.163.82
Address:	210.220.163.82#53

Non-authoritative answer:
8.8.8.8.in-addr.arpa	name = google-public-dns-a.google.com.

Authoritative answers can be found from:

2.2 네이버[ | ]

john@ubuntu:~$ nslookup naver.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	naver.com
Address: 125.209.222.141
Name:	naver.com
Address: 210.89.164.90
Name:	naver.com
Address: 210.89.160.88
Name:	naver.com
Address: 125.209.222.142
→ Server: 127.0.0.53 은 내 시스템의 DNS를 가리킴.
→ "Non-authoritative answer:"는 naver 의 DNS가 아닌 내 시스템의 DNS(캐시 정보)를 통해 정보를 획득 했기 때문임

2.2.1 내 시스템의 DNS가 아닌 네이버 DNS를 통해 직접 확인[ | ]

john@ubuntu:~$ nslookup -type=ns naver.com
Server:		127.0.0.53
Address:	127.0.0.53#53

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

Authoritative answers can be found from:

john@ubuntu:~$ nslookup naver.com ns1.naver.com
Server:		ns1.naver.com
Address:	125.209.248.6#53

Name:	naver.com
Address: 125.209.222.141
Name:	naver.com
Address: 210.89.164.90
Name:	naver.com
Address: 210.89.160.88
Name:	naver.com
Address: 125.209.222.142
→ Naver DNS를 "nslookup -type=ns naver.com" 명령으로 확인하면 ns1.naver.com, ns2.naver.com 의 2개로 운영됨이 확인 가능함. ns1.naver.com DNS를 통해 "nslookup naver.com ns1.naver.com" 명령으로 확인하면 "Non-authoritative answer:" 가 사라짐을 확인 할 수 있음

2.3 내 시스템의 DNS 정보 확인[ | ]

Ubuntu 18.04 에서 아래와 같이 확인 가능

john@ubuntu:~$ cat /etc/resolv.conf 
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}