230 likes | 357 Views
MIS 4700 Dr. Garrett. Domain Name Services (Part 2). DNS Configuration Files And Resource Record Formats. domain.dns addr.in-addr.arpa.dns Start of Authority (SOA) Record Address (A) and Canonical Name (CNAME) Records. Start of Authority (SOA) Record.
E N D
MIS 4700 Dr. Garrett Domain Name Services(Part 2)
DNS Configuration Files And Resource Record Formats • domain.dns • addr.in-addr.arpa.dns • Start of Authority (SOA) Record • Address (A) and Canonical Name (CNAME) Records
Start of Authority (SOA) Record • tree.com IN SOA apple.tree.com. sue.pear.tree.com ( 1 ; Serial 10800 ; Refresh after 3 hours 3600 ; Retry after 1 hour 604800 ; Expire after 1 week 86400 ) ; Minimum TTL of 1 day • “IN” indicates the record is an Internet class of record types • “SOA” indicates the record is a Start of Authority record
Address (A) and Canonical Name (CNAME) Records • ; Host addresses localhost.tree.com. IN A 127.0.0.1 pear.tree.com. IN A 172.16.1.2 apple.tree.com. IN A 172.16.1.3 peach.tree.com. IN A 172.16.1.4 ; Multi-homed host hedge.tree.com. IN A 172.16.1.1 hedge.tree.com. IN A 172.16.2.1 ; Aliases pr.tree.com IN CNAME pear.tree.com h.tree.com IN CNAME hedge.tree.com a.tree.com IN CNAME apple.tree.com h1.tree.com IN CNAME 172.16.1.1 h2.tree.com IN CNAME 172.16.2.1
Mapping Addresses to Names • Records in the db.addr file are provided to support reverse DNS lookups • Reverse address lookups are used to determine if the IP address that a user presents matches the domain name from which the user claims to originate • Reverse DNS lookups are classful
Handling The Loopback Address 0.0.127.in-addr-arpa. IN SOA apple.tree.com. sue.pear.tree.com ( 1 ; Serial 10800 ; Refresh after 3 hours 3600 ; Retry after 1 hour 604800 ; Expire after 1 week 86400 ) ; Minimum TTL of 1 day 0.0.127.in-addr-arpa. IN NS apple.tree.com 0.0.127.in-addr-arpa. IN NS hedge.tree.com 1.0.0.127.in-addr-arpa. IN PTR localhost
Obtaining and Storing Root Server Data • DNS implementations make it possible to pre-load the name-and-address information • InterNIC’s FTP server at ftp.rs.internic.net • Named.root • Rename file to cache.dns
Examining the named.root File ; last update: Nov 5, 2002 ; related version of root zone: 2002110501 ; ; ; formerly NS.INTERNIC.NET ; . 3600000 IN NS A.ROOT-SERVERS.NET. A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 ; ; formerly NS1.ISI.EDU ; . 3600000 NS B.ROOT-SERVERS.NET. B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107 ; ; formerly C.PSI.NET
The NSLOOKUP Command • General name server lookup • Queries the default name server specified in the current machine’s TCP/IP configuration • It is an essential tool for • Testing • Configuration and troubleshooting
Using NSLOOKUP • Identify your default domain name server • NSLOOKUP command with no arguments • NSLOOKUP command mode • Symbolized by the > prompt • Use the set OPTION command to examine specific types of resource records • ls -a command (list canonical names and aliases) • ls -d command (list all records)
DNS Query/Response Packet Formats • DNS response packets include the original question and the reply • Four sections in the DNS response packets • Question section • Answer section • Authority section • Additional section
DNS Query Packet Fields • ID Number Field • QR (Query/Response) Field • Opcode (Operation Code) Field • AA (Authoritative Answer) Field • TC (Truncation) Field
DNS Query Packet Fields (cont.) • RD (Recursion Desired) Field • RA (Recursion Available) Field • Z (Reserved) Field • Rcode (Response Code) Field • Question Count Field
DNS Query Packet Fields (cont.) • Answer Count Field • Name Server Count Field • Additional Records Count Field • Question Name Field • Question Type Field • Question Class Field
DNS Query Packet Fields (cont.) • Name Field • Type Field • Class Field • Time to Live Field • Resource Data Length Field • Resource Data Field
DNS Implementation • DNS implementations have two major purposes • Provide name resolution to your users • Providing the authoritative hostname-to-IP mapping for services you choose to provide • Load Balancing
The Trouble With DNS • DNS database updates normally require that a qualified administrator • Use special-purpose tools • NSUPDATE in the UNIX environment • Propagation delay • TTLs associated with a database entries