1 / 31

제목 : DNS - DDDS

제목 : DNS - DDDS. 2005. 4. 11( 월 ) 한 민 규 icemk@mclab.hufs.ac.kr. DNS(Domain Name System) IPv4/v6 DNS DDDS(Dynamic Delegation Discovery System) NAPTR RR. Content. DNS – What is DNS?. DNS( D omain N ame S ystem)

dennis
Download Presentation

제목 : DNS - DDDS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 제목 : DNS - DDDS 2005. 4. 11(월) 한 민 규 icemk@mclab.hufs.ac.kr

  2. DNS(Domain Name System) IPv4/v6 DNS DDDS(Dynamic Delegation Discovery System) NAPTR RR Content

  3. DNS – What is DNS? • DNS(Domain Name System) • A database that is used by TCP/IP applications to map between hostnames and IP addresses, and to provide E-mail routing information • Characteristics of DNS • A hierarchical namespace for hosts and IP addresses • A host table implemented as a distributed database • A Client/Server system • Components of DNS • Namespace and Resource Record • Name Server • Resolver(Client)

  4. Query for add. A “.” “.” Name Server Local Name Server Referral to kr NS Query for add. A “kr” Name Server “kr” “jp” “com” Referral to ac.kr NS Query for add. A “ac.kr” Name Server “ac” “co” Referral to hufs.ac.kr NS Answer Query for add. A “hufs.ac.kr” Name Server Resolver Query “hufs” “…” Answer to mclab.hufs..ac.kr Resolver  add. A ::= mclab.hufs.ac.kr DNS – What is DNS?(Con’t)

  5. DNS – What is DNS?(Con’t) • Namespace • DNS namespace is a tree of “domains” • Resource Records(RR) • RRs contain the data associated with domain names • Name Server • The server programs that store information about the domain name space • Resolver(Client) • The programs that extract information from name servers in response to client requests • gethostbyname(3) : hostname -> IP address • gethostbyaddr(3) : IP address -> hostname

  6. DNS – What is BIND? • BIND(Berkeley Internet Name Domain system) • A open source software package that implements the DNS protocol and provides name service on systems(UNIX & NT) • Characteristics of BIND • Same as DNS, a Client/Server system • Client side : resolver / Server side : named • Components of BIND • DNS Server(named) • DNS Resolver library • Tools for verifying the proper operation of the DNS server

  7. DNS – What is BIND?(Con’t) • BIND – DNS Implement S/W • BIND Configuration Step • /etc/named.conf – BIND환경설정 • /etc/resolve.conf – 네임서버 지정 • /etc/hosts – 원격호스트의 호스트 이름과 IP주소지정 • /var/named/*.zone – Forward Zone file(실제 호스트에 대한 정보) • /var/named/*.rev – Reverse Zone file

  8. DNS – What is BIND(Con’t) • DNS Server(named) • Answers queries about hostname and IP addresses. • Asks other servers and caches their responses • zone transfers • DNS Resolver library • Contains the routines that you need to write your application. • Mayuse the generate query or the name server library routines • Tools for verifying the proper operation of the DNS server • Provide a command-line interface for excuting DNS queries • e.g. – dig : same as “nslookup”, but more information. nslookup : query name servers interactively

  9. 0 15 16 31 Flag Identification Number of questions Number of answer RRs 12 byte Number of authority RRs Number of additional RRs Questions Answers (variable number of RRs) Authority (variable number of RRs) Additional information (variable number of RRs) DNS-Message

  10. DNS – Message(Header) QR : Query or Response Query Request : 0 Response : 1 OPCODE : Query Request side set 0 : Standard Query 1 : Inverse Query 2 : Server state Request(STATUS) 3 – 15 : unused AA : Authoritative Answer TC : Truncation(512 byte) RD : Recursion Desired RA : Recursion Available Z : Reserved RCODE : Response Code 0 : No error condition 1 : Format Error 2 : Server Failure 3 : Name Error 4 : Not Completed 5 : Refused 6 – 15 : unused • Header Format 0 15 ID QR (1) Opcode (4) AA (1) TC (1) RD (1) RA (1) Z (3) RCODE (3) QDCOUNT (Number of Question) ANCOUNT (Variable number of answer RRs) NSCOUNT (Variable number of Authority RRs) ARCOUNT (Variable number of Additional RRs)

  11. QR opcode AA TC RD RA (zero) rcode 1 1 1 1 1 3 4 4 0 31 15 16 Query name Query type Query class i 4 m t l 4 s k k u 2 a c 2 k r 0 count count count count count DNS-Message(Con’t) • Flag • Query message • Representation of domain name

  12. 0 31 15 16 Domain name type class Time-to-live Resource data length Resource data DNS-RR’s • Basic format of RR(RFC 1035 Based)

  13. DNS – RR’s(Con’t) • Type

  14. DNS – RR’s (example)

  15. DNS – RR’s (example)

  16. IP datagram UDP datagram DNS message UDP header IP header DNS header Question Answer #1(RR) Answer #2(RR) 20 8 12 25 16 16 Domain name (6gemini3tuc4noao3edu0) qtype (1) qclass (1) ptr (12) type (1) class (1) length (4) TTL IP addr 21bytes 2 2 2 2 2 4 2 4 DNS – RR’s(example)

  17. DNSv6 Issue • Fragmentation • DNS Response Size • 13개의 Root NameServer • UDP를 사용한 DNS 메시지는 512바이트로 최대 길이가 제한 • 512byte 초과시 TC bit Set  TCP 연결요구

  18. DNSv6 Issue(con’t) • Lame Delegation • 잘못된 위임정보  캐슁 리졸버의 레코드 유지 • 전환메커니즘과의 연동 • IP Layer에서의 DNS 관점 • Public IPv4/IPv6 Host • Host관점에서의 전환메커니즘 • IPv4/IPv6 Connectivity 보장

  19. Configuration File - /etc/named.conf

  20. Zone File – Forward

  21. Zone File - Reverse

  22. DNS – Query Flow(A/AAAA) • IPv4/IPv6 Support DNS

  23. DDDS (Dynamic Delegation Discovery System) • 목표 • 인터넷 식별 체계는 URN 체계에 기반하고 있으며, URN 기반 식별 체계는 궁극적으로 URL이나 기타 원하는 정보 형태로 변환하여 서비스되어야 한다. 이러한 변환 기능에 대한 국제적으로 통일된 체계를 제공함으로써 상호간의 운용성과 확장성을 제공하기 위하여 표준을 제정

  24. DDDS Algorithm • 용어정의 • AUS (Application Unique String) • Rewrite Rule (or Rewrite Rule Set) • FWKR (First Well Known Rule) • Terminal Rule • Application • Rule Database • 위임 단계에서 사용되는 것을 나타내는 키를 가진 규칙 DB • Service • Flag • 응용에 신호를 보내기 위한 규칙을 위한 방법

  25. DDDS – Algorithm Flow AUS FWKR First Key Key Lookup Key in DDDS DB RuleSet Non Empty 결과가 나올 때 까지 AUS에 규칙 적용 Key No 매칭규칙 종료? 마지막 규칙 결과가 응용이 원하는 결과

  26. DDDS – Rule Structure • Preference • 규칙 중에서 어느 것이 우선권을 가지는지 나타내는 숫자 • Flag • 규칙이 마지막으로 적용될지 결정하는 속성을 명시 • 마지막 규칙은 종료 규칙 • Service • 위임의 의미적 속성 • Replacement • DDDS 마지막 결과인 문자열을 만드는 다시 쓰기 규칙 • 종료 규칙의 결과로써 위임 서버 연결정보

  27. DDDS Rule Structure (Con’t) AUS URI System1 Rule System1 DDDS DB Rule NAPTR RR Rules & Domain Names System1 Rule System n DDDS DB : DNS Key Format : DNS Domain Name Lookup Request : 주어진 Key의 RuleSet을 위하여 NAPTR RR 요청 Lookup Response : 연속적 NAPTR 레코드

  28. DDDS DB – DNS Match(NAPTR) • NAPTR 형식 • Order : NAPTR 레코드 순서 • Preference • 같은 Order를 가진 레코드가 처리해야 하는 순서 • Flag • Rewrite와 필드해석에 대한 제어를 위한 1글자 • Services • 위임경로에 적용하는 서비스 매개변수를 나타내는 문자열 스트링 • Regexp • 다음 도메인을 찾기에 적용하기 위하여, 하나의 스트링에 적용하는 대체 표현을 포함하는 스트링 • Replacement • Flag 필드에서 발견된 값에 의존한 다음 도메인 이름

  29. DDDS DNS DB - URN Example • URI : urn:cid:1234567@bar.example.com • FWKR : cid(첫 번째 “:”과 두 번째 “:”사이 글자 추출 • DB에 유효한 키를 만들기 위하여 ‘urn.arpa’가 FWKR에 붙여져, ‘cid.urn.arpa’를 만든다. • cid.urn.arpa domain을 위한 NAPTR 레코드의 DNS Query cid.urn.arpa ;; order pref flags service regexp replacement IN NAPTR 100 10 “” “” “!urn:cid:.+@([^\.]+\.)+\.)(.*)$!\2! . Regexp의 \2 부분은 ‘example.com’스크링을 돌려준다. Flag 필드가 비어있으므로 Lookup은 종료가 아님. 다음 검사는 새로운 도메인인 ‘example.com’의 NAPTR레코드이다. example.com ;; order pref flags service regexp replacement IN NAPTR 100 10 “a” “http+N2L+N2C+N2R” “” www.example.com Service field = [[protocol]*(+” rs)] : rs filed 32 char N2L(URNURL), N2R(URN->Resource), N2C(URN->RUC)

  30. NAPTR – Flag field • Field Value = ‘S’ ‘A’ ‘U’ ‘P’ • ‘S’ : 다음 lookup이 DNS SRV(DNS specifying the location service)레코드임을 의미한다. • ‘A’ : 다음 lookup이 A, AAAA 레코드임을 의미한다. • ‘U’ : 다음 과정은 DNS lookup이 아니라 Regexp 필드의 결과임을 나타낸다. • ‘P’ : 이후의 과정이 프로토콜에 의존적인 것이므로 더 이상 DNS 질의를 하지 않아야 한다는 것을 의미한다. ‘S’ ‘A’ ‘U’ – Terminating Rule onspc.com ;; order pref flags service regexp replacement IN NAPTR 0 0 “u” “EPC+epcis” “!^.*$!http://example.com/cgi-bin/epcis! .

  31. DDDS DB – ONS • RFID CODE – EPC vs NIDA • <item reference>.<Company prefix>.<header value>.sgtin.id.onsepc.com • urn:epc:id:sgtin:2.24.400 • Remove the ‘urn:epc:’ header (leaving id:sgtin:2.24.400) • Remove the item field(leaving id:sgtin:2.24) • Invert the order of the remaining fields(leaving 24.2:sgtin:id) • Convert the “:” to “.” (leaving 24.2.sgtin.id) • Append ‘.onsepc.com’(ending up with 24.3.sgtin.id.onsepc.com) • <item reference>.<Company prefix>.<Code Type>.ods.or.kr

More Related