Presentation is loading. Please wait.

Presentation is loading. Please wait.

Domain Names Implementation and specification 陳怡良 RFC #1035.

Similar presentations


Presentation on theme: "Domain Names Implementation and specification 陳怡良 RFC #1035."— Presentation transcript:

1 Domain Names Implementation and specification 陳怡良 cyl@mail.im.tku.edu.tw RFC #1035

2 2 Overview Provide a mechanism for naming resources User’s view Resolver’s view Two kinds of data: Authoritative Cache

3 3 Common configuration User Program Local host User queries User responses Resolver cache responses queries cache additionsreference Foreign Name Server

4 4 Common configuration(cont.) Master files Local host Name Server Foreign Resolver Foreign Name Server Foreign maintenance responses queries maintenance queries responses

5 5 Conventions Preferred name syntax ::= | “ “ ::= “.” ::= [[ ] ] ::= | ::= | “=“ ::= | ::= [A-Z][a-z] ::= [0-9] PS.Labels must be 63 characters or less.

6 6 Conventions(cont.) Data Transmission Order--octets Character Case—case-insensitive Size limits labels63 octets or less names255 octets or less TTLpositive values of a signed 32 bit number UDP messages512 octets or less

7 7 RR definitions-- Format NAME TYPE CLASS TTL RDLENGTH RDATA 111111 0123456789012345

8 8 RR definitions(cont.)-- TYPE values TYPEValue and meaningTYPEValue and meaning A1 a host addressMR9 a mail domain name(EXP) NS2 an authoritative name serverNULL10 a null RR(EXP) MD3 a mail destination(obsolete)WKS11 a well know service description MF4 a mail forwarder(obsolete)PTR12 a domain name pointer CNAME5 the canonical name for an aliasHINFO13 a host information SOA6 marks the start of a zone of authority MINFO14 mailbox or mail list information MB7 a mailbox domain name(EXP)MX15 mail exchange MG8 a mail group(EXP)TXT16 txt strings

9 9 RR definitions(cont.) QTYPE value and meaning AXFR252 A request for a transfer of an entire zone MAILB253 A request for mailbox-related records(MB, MG or MR) MAILA254 A request for mail agent RRs (Obsolete) *255 A request for all records CLASS value and meaning IN1 the Internet CS2 the CSNET class(Obsolete) CH3 the CHAOS class HS4 Hesiod QCLASS value and meaning *255 any class

10 10 RR definitions(cont.) – SOA RDATA format MNAME RNAME SERIAL REFRESH RETRY EXPIRE MINIMUM

11 11 Messages-- Format Header Question Answer Authority Additional ID QROpcodeAATCRDRAZOpcode QDCOUNT ANCOUNT NSCOUNT ARCOUNT 111111 0123456789012345

12 12 Messages(cont.)-- Format OPCODE 0QUERY 1IQUERY 2STATUS 3-15reserved RCODE 0No error condition 1Format error 2Server failure 3Name Error 4Not Implemented 5Refused 6-15reserved

13 13 Messages(cont.)— Question section format 111111 0123456789012345 QNAME QTYPE QCLASS

14 14 Messages(cont.)— Resource record format The answer, authority, and additional sections 111111 0123456789012345 NAME TYPE CLASS TTL RDLENGTH RDATA

15 15 Resolver Implementation & Mail support Transforming a user request into a query Sending the queries Processing responses Using the cache Mail support @

16 16 Master Files 相關範例 — named.conf 節錄 zone "200.13.163.IN-ADDR.ARPA" { type master; file "rev.200"; }; zone "im.tku.edu.tw" { type master; file "hosts.im"; allow-update { none; }; };

17 17 Master Files 相關範例 (cont.)— rev.200 節錄 $TTL 86400; @ IN SOA mail.im.tku.edu.tw. root.mail.im.tku.edu.tw. ( 2000092915 ; Serial 43200 ; Refresh 3600 ; Retry 3600000 ; Expire 2419200 ) ; Minimum IN NS mail.im.tku.edu.tw. IN NS mis.im.tku.edu.tw. IN NS tkgis.tku.edu.tw. ;IMNA Servers 30 IN PTR web.im.tku.edu.tw. 32 IN PTR mis.im.tku.edu.tw. 33 IN PTR sun.im.tku.edu.tw. 37 IN PTR wwwbbs.im.tku.edu.tw. 39 IN PTR ftp.im.tku.edu.tw. 40 IN PTR bbs.im.tku.edu.tw. 222 IN PTR mail.im.tku.edu.tw.

18 18 Master Files 相關範例 (cont.)— hosts.im 節錄 $TTL 86400; @ IN SOA mail.im.tku.edu.tw. root.mail.im.tku.edu.tw. ( 2001092980 ; Serial 10800 ; Refresh 3600 ; Retry 3600000 ; Expire 2419200) ; Time to live IN NS mail.im.tku.edu.tw. IN NS mis.im.tku.edu.tw. IN MX 1 mail.im.tku.edu.tw. IN MX 2 mis.im.tku.edu.tw. mail IN A 163.13.200.222 mis IN A 163.13.200.32 sun IN A 163.13.200.33 www IN CNAME sun wwwbbs IN A 163.13.200.37 IN MX 0 wwwbbs.im.tku.edu.tw. bbs IN A 163.13.200.40


Download ppt "Domain Names Implementation and specification 陳怡良 RFC #1035."

Similar presentations


Ads by Google