5b7916f1427f9a173faf5dcdce6a578f.ppt
- Количество слайдов: 17
Writing Zone Files Olaf M. Kolkman Okolkman@ripe. net slideset 1 February 2003
Writing a zone file. n n February 2003 2 Zone file is written by the zone administrator Zone file is read by the master server and it’s content is replicated to slave servers What is in the zone file will end up in the database Because of timing issues it might take some time before the data is actually visible at the client side. Jump to first page
First attempt n The ‘header’ of the zone file u Start with a SOA record u Include authoritative name servers and, if needed, glue u Add other information n Add other RRs n Delegate to other zones February 2003 3 Jump to first page
The SOA record Line break Comments secret-wg. org. 3600 IN SOA bert. secret-wg. org. ( olaf. kolkman. ripe. net. 2002021301 ; serial 1 h ; refresh 30 M ; retry 1 W ; expiry 3600 ) ; neg. answ. ttl n n Olaf. Kolkman@ripe. net olaf. kolkman. ripe. net Serial number: 32 bit circular arithmetic u People often use date format u To be increased after editing n The timers above qualify as reasonable February 2003 4 Jump to first page
Authoritative NS records and related A records secret-wg. org. bert. secret-wg. org. NS 2. secret-wg. org. n 3600 IN IN NS bert. secret-wg. org. NS NS 2. secret-wg. org. A 193. 0. 0. 4 A 193. 0. 0. 202 NS record for all the authoritative servers. u They need to carry the zone at the moment you publish n A records only for “in-zone” name servers. u Delegating February 2003 5 NS records might have glue associated. Jump to first page
Other ‘APEX’ data secret-wg. org. 3600 IN MX 50 mailhost. secret-wg. org. 150 mailhost 2. secret-wg. org. 3600 IN LOC ( 52 21 23. 0 N 04 57 05. 5 E 0 m 100 m ) secret-wg. org. 3600 IN TXT “Demonstration and test zone” Examples: n MX records for mail (see next slide) n February 2003 6 TXT records A records KEY records for dnssec Location records Jump to first page
Intermezzo: MX record n n n SMTP (simple mail transfer protocol) uses MX records to find the destination mail server. If a mail is sent to olaf@ripe. net the sending mail agent looks up ‘ripe. net MX’ MX record contains mail relays with priority. u The n February 2003 7 lower the number the higher the priority. Don’t add MX records without having a mail relay configured. Jump to first page
Other data in the zone localhost. secret-wg. org. 3600 IN A 127. 0. 0. 1 bert. secret-wg. org. www. secret-wg. org. n n 4500 IN A 193. 0. 0. 4 3600 IN CNAME bert. secret-wg. org. Add all the other data to your zone file. Some notes on notation. u Note the fully qualified domain name including trailing dot. u Note TTL and CLASS February 2003 8 Jump to first page
Zone file format short cuts nice formatting secret-wg. org. 3600 IN SOA bert. secret-wg. org. ( olaf. kolkman. ripe. net. 2002021301 ; serial 1 h ; refresh 30 M ; retry 1 W ; expiry 3600 ) ; neg. answ. Ttl IN NS bert. secret-wg. org. IN NS NS 2. secret-wg. org. IN MX 50 mailhost. secret-wg. org. IN MX 150 mailhost 2. secret-wg. org. 3600 secret-wg. org. 3600 IN LOC secret-wg. org. 3600 IN TXT bert. secret-wg. org. 4500 IN A NS 2. secret-wg. org. 3600 IN A localhost. secret-wg. org. 3600 IN A bert. secret-wg. org. www. secret-wg. org. February 2003 9 ( 52 21 23. 0 N 04 57 05. 5 E 0 m 100 m ) “Demonstration and test zone” 193. 0. 0. 4 193. 0. 0. 202 127. 0. 0. 1 3600 IN A 193. 0. 0. 4 3600 IN CNAME bert. secret-wg. org. Jump to first page
Zone file format short cuts: repeating last name secret-wg. org. 3600 3600 IN SOA bert. secret-wg. org. ( olaf. kolkman. ripe. net. 2002021301 ; serial 1 h ; refresh 30 M ; retry 1 W ; expiry 3600 ) ; neg. answ. Ttl IN NS bert. secret-wg. org. IN NS NS 2. secret-wg. org. IN MX 50 mailhost. secret-wg. org. IN MX 150 mailhost 2. secret-wg. org. 3600 IN LOC bert. secret-wg. org. NS 2. secret-wg. org. localhost. secret-wg. org. bert. secret-wg. org. www. secret-wg. org. February 2003 10 3600 IN TXT 3600 IN A 4500 IN A ( 52 21 23. 0 N 04 57 05. 5 E 0 m 100 m ) “Demonstration and test zone” 193. 0. 0. 4 193. 0. 0. 202 127. 0. 0. 1 3600 IN A 193. 0. 0. 4 3600 IN CNAME bert. secret-wg. org. Jump to first page
Zone file format short cuts: default TTL $TTL 3600 ; Default TTL directive secret-wg. org. IN SOA bert. secret-wg. org. ( olaf. kolkman. ripe. net. 2002021301 ; serial 1 h ; refresh 30 M ; retry 1 W ; expiry 3600 ) ; neg. answ. Ttl IN NS bert. secret-wg. org. IN NS NS 2. secret-wg. org. IN MX 50 mailhost. secret-wg. org. IN MX 150 mailhost 2. secret-wg. org. IN LOC bert. secret-wg. org. NS 2. secret-wg. org. IN TXT IN A localhost. secret-wg. org. IN A ( 52 21 23. 0 N 04 57 05. 5 E 0 m 100 m ) “Demonstration and test zone” 193. 0. 0. 4 193. 0. 0. 202 127. 0. 0. 1 bert. secret-wg. org. 4500 IN A 193. 0. 0. 4 www. secret-wg. org. IN CNAME bert. secret-wg. org. February 2003 11 Jump to first page
Zone file format short cuts: ORIGIN $TTL 3600 ; Default TTL directive $ORIGIN secret-wg. org. @ IN SOA bert ( IN IN NS NS MX MX IN LOC bert NS 2 50 mailhost 150 mailhost 2 olaf. kolkman. ripe. net. 2002021301 ; serial 1 h ; refresh 30 M ; retry 1 W ; expiry 3600 ) ; neg. answ. Ttl bert NS 2 IN A ( 52 21 23. 0 N 04 57 05. 5 E 0 m 100 m ) IN TXT “Demonstration and test zone” 193. 0. 0. 4 193. 0. 0. 202 localhost IN A 127. 0. 0. 1 bert www February 2003 12 4500 IN A 193. 0. 0. 4 IN CNAME bert Jump to first page
Delegating a zone (becoming a parent) n Delegate authority for a sub domain to another party (splitting of disi. ripe. net from ripe. net) • edu com • • disi ftp • disi. ripe. net zone www ws 2 February 2003 13 google tislabs • • isi sun moon ripe. net zone • net www ws 1 Jump to first page
Concept: Glue n Delegation is done by adding NS records: disi. ripe. net. n n NS NS ns 1. disi. ripe. net. ns 2. disi. ripe. net. How to get to ns 1 and ns 2… We need the addresses. Add glue records to so that resolvers can reach ns 1 and ns 2. ns 1. disi. ripe. net. A 10. 0. 0. 1 ns 2. disi. ripe. net. A 10. 0. 0. 2 February 2003 14 Jump to first page
Concept: Glue (continued) n n Glue is ‘non-authoritative’ data Don’t include glue for servers that are not in sub zones disi. ripe. net ns 1. disi. ripe. net. NS NS NS A ns 1. disi. ripe. net. ns 2. ripe. net. ns. bert. secret-wg. org. 10. 0. 0. 1 Only this record needs glue February 2003 15 Jump to first page
Delegating disi. ripe. net. from ripe. net. disi. ripe. net n Setup minimum two servers n Create zone file with NS records n Add all disi. ripe. net data February 2003 16 ripe. net n Add NS records and glue n Make sure there is no other data from the disi. ripe. net. zone in the zone file. ` Jump to first page
Becoming a child In general n n n Buy your domain at favorite registry Set up your name servers Register the name servers: your registry will communicate the name servers to the registrar who will make sure the name servers are published. u This n February 2003 17 process might take hours-days. Registrars may require a sensible setup Jump to first page


