본문 바로가기
IT

[네트워크] DNS (Domain Name System)

by Dblog 2021. 8. 5.
728x90

DNS(Domain Name System) https://ko.wikipedia.org/wiki/%EB%8F%84%EB%A9%94%EC%9D%B8_%EB%84%A4%EC%9E%84_%EC%8B%9C%EC%8A%A4%ED%85%9C

 

도메인 네임 시스템 - 위키백과, 우리 모두의 백과사전

도메인 네임 시스템(Domain Name System, DNS)은 호스트의 도메인 이름을 호스트의 네트워크 주소로 바꾸거나 그 반대의 변환을 수행할 수 있도록 하기 위해 개발되었다. 특정 컴퓨터(또는 네트워크로

ko.wikipedia.org

 

우리는 DNS를 DNS가 있어야 www.naver.com, www.google.com에 접속할 수 있다 정도만 알고 있는 경우가 많습니다.

최근 DNS 설정을 안 해줘서 상당히 오랜 시간 삽질을 해서 기록으로 남겨야겠다는 생각이 들어 글을 씁니다.


우리는 naver, google에 접속할 때 www.으로 시작하는 주소를 입력하는데 구글의 실제 ip주소는 8.8.8.8과 8.8.4.4입니다. 원래는 이 ip주소로 접속해야 구글에 접속할 수 있는데 DNS 서버가 도메인 주소로 접속할 수 있도록 도와줍니다.

그러면 이 DNS주소 어떻게 설정하고 어떤 주소를 설정해야 할까요

 

보통 통신사마다 고정 DNS 서버를 가지고 있습니다. 사용자의 통신사에 맞게 설정하면 됩니다.

윈도우, 우분투 GUI에 경우 네트워크 툴을 열어서 설정하면 됩니다. linux의 경우는 툴이 없으니 vi, namo 같은 에디터로 설정해야 합니다.

저는 KT 통신사라 KT DNS를 설정했습니다.

/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
nameserver 168.126.63.1
options edns0

 

DNS 서버가 설정이 잘 안 됐을 때는 이런 에러가 발생하고 ping www.google.com을  을 했을 때 ping이 가지 않습니다.

 

ping이 정상적으로 보내져야 DNS 설정이 완료된 것입니다.

728x90

'IT' 카테고리의 다른 글

[Linux] bash shell if,  (0) 2021.10.16
[Linux] dd명령어 활용, dump  (0) 2021.09.01
[OPTEE-64bit] Optee_os, Optee_client, Optee_example  (0) 2021.07.16
MYSql Server8.0.17~19 'member' 예약어 이슈  (0) 2021.07.07
CPU scheduling, 노예의 탄생  (0) 2021.07.06

댓글