기록

Chapter 3. DNS 본문

[Study]/etc

Chapter 3. DNS

Dannnnnn 2018. 4. 4. 23:00
반응형

DNS : domain name system


people : many identifiers

 -> SSN, name, passport number

 

Internet hosts, routers

 - IP address (32bit)

 - 도메인과 같은 문자로 된 주소 체계 필요


 Domain Name System

 - 분산 데이터베이스와 같은 역할

 - 다수의 네임서버 존재

 

 application-layer protocol으로 볼 수 있음 

 - 5계층에서 동작함

 - 호스트와 네임서버간에서 네임을 매핑하는 것을 담당하는 프로토콜

 - 네트워크 edge쪽에 존재하여 복잡도 올라감

 

DNS : service, structure

 DNS service

 - hostname과 IP address의 상호변환이 목적

 - host aliasing

canonical form : 정확한 도메인의 이름 

alias names : canonical form을 간단히 쓰는 별칭

이 둘의 상호변환 역할도 DNS가 해 줌

replicated Web servers : many IP addresses correspond to one name

 why not centrlize DNS?

 - 고장나면 전세계 인터넷이 마비된다

 - 모든 DNS쿼리, 앤써 보내기 때문에 헤비한 데이터 크기

 - 멀리 접속해야해서 불편

 - 유지보수도 힘듬

 => 이러한 이유로 분산될 수 밖에 없다

 

 DNS : a distributed, hierarchical database

 

 DNS : root name servers

 - 매핑 정보를 모를 때 해당 기관 네임서버에 접속하여 주소 알아내서 리턴하는 역할

 

 TLD, authoritative server (top-level domain)

 - responsible for com, org, net, edu, aero, job ...

   and all top-level country domains, e.g.:uk, fr, ca, ip


 autoritative DNS servers:

 - organization's own DNS server(s)

 - can be maintained by organization or service provider

 

 Local DNS name server

 - does not strictly belong to hierarchy

 - each ISP (residental ISP, company, university) has one

    => default name server라 불림

 - when host makes DNS query, query는 로컬 DNS 서버에 보내진다

 - 원격에 있는 다른 DNS 서버의 proxy (대리) 역할을 한다.

 - 호스트가 질의하면 계층구조에 따라 다른 곳에 전달

 

 DNS name resolution example

 - iterated query

   : contacted server replies with name of server to contact

   : I don't know this name, but ask this server

   

 - recursive query

   : 

   

 DNS : caching, updating records

 - 네임 서버가 매핑 법을 배우면 그것을 로컬 서버에 저장

 - 일정 시간 후에 사용 안되면 엔트리들은 구식이 되어 사라짐 (when TTLs expire)

 

 DNS records

 DNS : 리소스 레코드(RR)들을 저장하는 분산 데이터베이스

 RR format : (name, value, type, ttl)

 

 type = A

 - DNS에서 가장 많이 쓰는 보편적인 타입

 - name is hostname (단말기, 컴 이름)

 - value is IP address

 - type : A로 처리

 - ttl : 얼마동안 존재하느냐인데 생략 가능

 eg: (relay.1.var.foo.com,145.37.93.126,A)

 

 type = NS

 - name is domain (e.g.. foo.com)

 - value : hostname of authoritative name server for this domain

 - DNS 쿼리를 바깥으로 루팅할 때 목적일 때 사용

 eg: (foo.com, dns.foo.com, NS)

 

 type = CNAME

 - name is alias name for some "canonical"

 - value is a canonical hostname for the alias hostname name

 - 호스트네임에 대한 캐노니칼 네임을 제공할 때 사용

 eg: (foo.com, relay.1.var.foo.com,CNAME)

 

 type=MX

 - value : 메일 서버에 대한 캐노니칼 네임

 - name : alias host name

 eg: (foo.com, mail.bar.foo.com, MX)

 

 DNS protocol, message

 - 쿼리와 응답 주고받는 메세지 포맷. 둘 다 동일한 포맷 사용

 - msg header

- identification : 쿼리인지 리플라이에 대한 16비트 번호

- flags : 쿼리이냐 리플라이이냐를 나타내는 것

  recursion desired

  name type fields for a query

  RRs in response to query

  

 Inserting records into DNS

 A registrar is a  commercial entity that verifies the uniqueness of the domain name,

 enter the domain name into thee DNS database and collects a fee

 

 register name newworkuptopia.com at DNS registrar

 

 Attacking DNS

 - DDos attacks (denial of service)

Bombard root servers with traffic

- Traffic 필터링 기능이 막아줌 (여태까지 성공 X)

- 로컬 DNS서버에서 커버쳐줘서 root DNS서버까지 갈 일 없음

- 이론적으론 뭐.. 가능 할 수도.

Bombard TLD servers

- 루트서버 공격보다 더 위험

 - Redirect attacks

- 중간에 사람이 관여하여 쿼리 인터셉트

- DNS poisoning

: 위장된 리플라이를 보냄 (A가 아닌 B로 접속하도록..)

 

 - Exploit DNS for DDoS

- DNS를 디도스 공격의 수단으로 씀

- 공격자들이 IP주소를 위장..

 

반응형

'[Study] > etc' 카테고리의 다른 글

Xamarin 소개 -2 (Window .ver)  (0) 2018.10.30
Xamarin 소개 -1 (Window .ver)  (0) 2018.10.30
유클리드 호제법  (0) 2018.10.03
Chapter 2. Application Layer  (0) 2018.03.27
Chapter 1. Introduction  (0) 2018.03.20