Introduction to DNS

Post on 13-Jan-2016

34 views 0 download

Tags:

description

Introduction to DNS. 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. - PowerPoint PPT Presentation

Transcript of Introduction to DNS

Introduction to DNS

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 hosts file207.245.216.100 homer.rcc.on.ca homer

127.0.0.1 localhost

10.10.0.8 as400.rcc.on.ca as400

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 (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 com org ca

onunc nf

rcc

yahoo msn

Host name structureEach host name is made up of a sequence of labels separated by periods.

Each label can be up to 63 charactersThe total name can be at most 255 characters.

Examples:www.whitehouse.govBobo.the.monkey.comross.homer.rcc.on.ca

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 domain (2 letter domain name).New top level domains include:.aero .biz .coop .info .name .pro

DNS Organization

Distributed DatabaseThe 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.

rpi.eduDNS DB

rpi.eduDNS DB

DNS Distributed DatabaseThere is one primary server for a domain, and typically a number of secondary servers containing replicated databases.

rcc.on.caDNS DB

Authoritative

rcc.on.caDNS DB

Replicas

RCC DNS server

DNS ClientsA 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.10.0.5

Nameserver 205.189.197.162

DNS Servers

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 server records NSHostname Aaliases CNAMEMail Exchangers MX

DNS name serverslocal name servers:

each ISP, company has a local (default) name serverhost DNS query first goes to local name server.The local DNS is then responsible for servicing the request.

Why not centralize DNS?single point of failuretraffic volumedistant centralized databasemaintenanceno server has all name-to-IP address mappings

The root level servers There are 14 root level servers A.ROOT-SERVERS.NET. 198.41.0.4B.ROOT-SERVERS.NET. 128.9.0.107C.ROOT-SERVERS.NET. 192.33.4.12D.ROOT-SERVERS.NET. 128.8.10.90E.ROOT-SERVERS.NET. 192.203.230.10F.ROOT-SERVERS.NET. 192.5.5.241G.ROOT-SERVERS.NET. 192.112.36.4H.ROOT-SERVERS.NET. 128.63.2.53I.ROOT-SERVERS.NET. 192.36.148.17J.ROOT-SERVERS.NET. 198.41.0.10K.ROOT-SERVERS.NET. 193.0.14.129L.ROOT-SERVERS.NET. 198.32.64.12M.ROOT-SERVERS.NET. 202.12.27.33

The Root DNS Servers

The root server needs to know the address of the 1st and many 2nd level domain name servers.

edu com org ca

onunc nfyahoo msn

Simple DNS example

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

requesting hostSomeone.rogers.com

rcc.on.ca

root name server

authorititive name serverdns.ca

local name serverdns.rogers.com

1

23

4

5

6

Host someone.rogers.com wants IP address of rcc.on.ca

DNS exampleRoot name

server:may not know authoritative name servermay know intermediate name server: who to contact to find authoritative name server

requesting hostSomeone.rogers.com

rcc.on.ca

root name server

local name serverdns.rogers.com

1

23

4 5

6

authoritative name serverdns.on.ca

intermediate name serverdns.ca

7

8

DNS: iterated queriesrecursive query:

puts burden of name resolution on contacted name serverheavy load?

iterated query:contacted server replies with name of server to contact“I don’t know this name, but ask this server”

requesting hostSomeone.rogers.com

homer.rcc.on.ca

root name server

local name serverdns.rogers.com

1

23

4

5 6

authoritative name serverdns.rcc.on.ca

intermediate name serverdns.on.ca

7

8

iterated query

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 2136http://www.ietf.org/html.charters/dnsind-charter.html

nslookup

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

nslookup is usually available on Unix workstations.