Introduction to DNS The need for Hostnames The

  • Slides: 24
Download presentation
Introduction to DNS

Introduction to DNS

The need for Hostnames The Internet uses a four octet addressing scheme (IP Address)

The need for Hostnames The Internet uses a four octet addressing scheme (IP Address) IP address contains information used for routing. The problem with IP address is that they are not user friendly.

Manually mapping domain names Host names can be entered into the /etc/hosts file. Sample

Manually mapping domain names Host names can be entered into the /etc/hosts file. Sample hosts file 207. 245. 216. 100 homer. rcc. on. ca homer 127. 0. 0. 1 localhost 10. 0. 8 as 400. rcc. on. ca as 400

Limitations of the hosts file You can not possible put the entire Internet into

Limitations of the hosts file You can not possible put the entire Internet into the hosts file. Anytime there is a change the whole file must be updated.

The Domain Name Service The domain name service is used to translate a FQDN

The Domain Name Service The domain name service is used to translate a FQDN (Fully qualified domain name) into an IP address. Domain names comprise a hierarchy so that names are unique, yet easy to remember.

DNS Hierarchy edu unc com yahoo org msn ca on nf rcc

DNS Hierarchy edu unc com yahoo org msn ca on nf rcc

Host name structure Each host name is made up of a sequence of labels

Host name structure Each host name is made up of a sequence of labels separated by periods. Each label can be up to 63 characters The total name can be at most 255 characters. Examples: www. whitehouse. gov Bobo. the. monkey. com ross. homer. rcc. on. ca

Domain Name The domain name for a host is the sequence of labels that

Domain Name The domain name for a host is the sequence of labels that lead from the host (leaf node in the naming tree) to the top of the worldwide naming tree. A domain is a sub-tree of the worldwide naming tree. This is referred to as the DMZ (Demarcation zone)

Top level domains edu, gov, com, net, org, mil, … Countries each have a

Top level domains edu, gov, com, net, org, mil, … Countries each have a top level domain (2 letter domain name). New top level domains include: . aero. biz. coop. info. name. pro

DNS Organization Distributed Database The organization that owns a domain name is responsible for

DNS Organization Distributed Database The organization that owns a domain name is responsible for running a DNS server that can provide the mapping between hostnames within the domain to IP addresses. So - some machine run by RCC is responsible for everything within the rcc. on. ca domain.

DNS Distributed Database There is one primary server for a domain, and typically a

DNS Distributed Database There is one primary server for a domain, and typically a number of secondary servers containing replicated databases. RCC DNS server rcc. on. ca DNS DB Authoritative rcc. on. ca rpi. edu DNS DB DNSDB DB Replicas

DNS Clients A DNS client is called a resolver. A call to gethostbyname()is handled

DNS Clients A DNS client is called a resolver. A call to gethostbyname()is handled by a resolver (typically part of the client). Most Unix workstations have the file /etc/resolv. conf that contains the local domain and the addresses of DNS servers for that domain.

/etc/resolv. conf domain students. rcc. on. ca nameserver 10. 0. 5 Nameserver 205. 189.

/etc/resolv. conf domain students. rcc. on. ca nameserver 10. 0. 5 Nameserver 205. 189. 197. 162

DNS Servers handle requests for their domain directly. Servers handle requests for other domains

DNS Servers handle requests for their domain directly. Servers handle requests for other domains by contacting remote DNS server(s). Servers cache external mappings.

Special types of DNS records DNS databases contain more than just hostname-to-address records: Name

Special types of DNS records DNS databases contain more than just hostname-to-address records: Name server records NS Hostname A aliases CNAME Mail Exchangers MX

DNS name servers Why not centralize DNS? local name servers: each ISP, company has

DNS name servers Why not centralize DNS? local name servers: each ISP, company has single point of failure a local (default) name traffic volume server distant centralized host DNS query first database goes to local name maintenance server. no server has all name. The local DNS is then to-IP address mappings responsible for servicing the request.

The root level servers There are 14 root level servers A. ROOT-SERVERS. NET. B.

The root level servers There are 14 root level servers A. ROOT-SERVERS. NET. B. ROOT-SERVERS. NET. C. ROOT-SERVERS. NET. D. ROOT-SERVERS. NET. E. ROOT-SERVERS. NET. F. ROOT-SERVERS. NET. G. ROOT-SERVERS. NET. H. ROOT-SERVERS. NET. I. ROOT-SERVERS. NET. J. ROOT-SERVERS. NET. K. ROOT-SERVERS. NET. L. ROOT-SERVERS. NET. M. ROOT-SERVERS. NET. 198. 41. 0. 4 128. 9. 0. 107 192. 33. 4. 12 128. 8. 10. 90 192. 203. 230. 10 192. 5. 5. 241 192. 112. 36. 4 128. 63. 2. 53 192. 36. 148. 17 198. 41. 0. 10 193. 0. 14. 129 198. 32. 64. 12 202. 12. 27. 33

The Root DNS Servers The root server needs to know the address of the

The Root DNS Servers The root server needs to know the address of the 1 st and many 2 nd level domain name servers. edu unc com yahoo org msn ca on nf

root name server Simple DNS example Host someone. rogers. com wants IP address of

root name server Simple DNS example Host someone. rogers. com wants IP address of rcc. on. ca 2 5 1. Contacts its local DNS server, dns. rogers. com 2. dns. rogers. com contacts root name server, if necessary 3. root name server contacts authoritative name server, dns. on. ca, if necessary local name server dns. rogers. com 1 3 4 authorititive name server dns. ca 6 requesting host Someone. rogers. com rcc. on. ca

root name server DNS example Root name server: may not know authoritative name server

root name server DNS example Root name server: may not know authoritative name server may know intermediate name server: who to contact to find authoritative name server 6 2 7 local name server dns. rogers. com 1 8 requesting host 3 intermediate name server dns. ca 4 5 authoritative name server dns. on. ca Someone. rogers. com rcc. on. ca

DNS: iterated queries recursive query: puts burden of name resolution on contacted name server

DNS: iterated queries recursive query: puts burden of name resolution on contacted name server heavy load? iterated query: contacted server replies with name of server to contact “I don’t know this name, but ask this server” root name server 2 iterated query 3 4 7 local name server dns. rogers. com 1 8 requesting host intermediate name server dns. on. ca 5 6 authoritative name server dns. rcc. on. ca Someone. rogers. com homer. rcc. on. ca

DNS: caching and updating records once (any) name server learns of a mapping, it

DNS: caching and updating records once (any) name server learns of a mapping, it will cache it for a period of time (TTL) cache entries timeout (disappear) after some time update/notify mechanisms under design by IETF (The Internet Engineering Task Force) RFC 2136 http: //www. ietf. org/html. charters/dnsind-charter. html

nslookup is an interactive resolver that allows the user to communicate directly with a

nslookup is an interactive resolver that allows the user to communicate directly with a DNS server. nslookup is usually available on Unix workstations.