• No results found

Lecture 2 CS An example of a middleware service: DNS Domain Name System

N/A
N/A
Protected

Academic year: 2021

Share "Lecture 2 CS An example of a middleware service: DNS Domain Name System"

Copied!
15
0
0

Loading.... (view fulltext now)

Full text

(1)

Lecture 2 CS 3311

An example of a middleware service:

DNS – Domain Name System

(2)

The problem

• Networked computers have names and IP addresses .

• Applications use names; IP uses for routing purposes IP addresses.

• The role of DNS is to handle the mapping between host

names and IP addresses – the amount of information is huge and distributed.

• Names belong to a name space - set of well-defined names.

Example 1: george.cs.ucc.ie  143.239.201.145 Example 2: connect to www.cs.ucc.ie

1. The browser will contact the local DNS with the name to lookup the IP address.

2. TCP connection is established

……….

(3)

Resolvers

• Resolvers are clients (on the applications’ side) that access name servers. They and their cache memories are part of the host operating system.

• The resolver handles:

– Querying a name server;

– Interpreting responses (can be resource records or an error);

– Returning information to the programs that requested it.

• Usually, the resolver is a set of library routines (i.e.

gethostbyname) that are compiled into applications.

(4)

Name Servers

• Each ISP has a local name server to which the query is sent (the IP address of the local DNS is configured by hand in each host).

• Name servers store information about the domain name space – a part of it, called zone

 the name server has authority for that zone.

• A zone contains domain names and data, except those delegated elsewhere.

• There are two types of name servers:

– Primary master : gets data for the zone it’s authoritative for from files on the host it runs on;

– Secondary master : gets its zone data from a primary master.

• A root name server knows where NS authoritative for all the

top-level domains are.

(5)

The DNS protocol

the chain of events:

1. The resolver sends the query to the local DNS server.

2. If not solved, the local DNS relays it to a root server. If the root name server has a record for the hostname, it’ll send the reply. Otherwise, it will relay the query to an authoritative server for that domain which should have a record of the hostname.

3. The reply message goes to the root and then to the local name server.

4. Queries can be recursive (A sends to B and B acts on behalf

of A) or iterative (if B can not solve the query, A will send it

to another name server). Generally local name servers use the

iterative strategy for root servers.

(6)

Organisation of the name space

“” root

com edu gov mil ie

ucc

(7)

Name Convention

• A domain has a domain name (up to 63 characters in length).

• The full domain name is the sequence of labels from the domain to the root, with “.” separating the labels.

• Sibling nodes (children of the same parent) are named uniquely.

• The depth of the tree is limited to 127 levels.

• While domain names are just indexes into the DNS

database, the “ hosts ” are the domain names that point

to information about individual hosts.

(8)

Name conventions – cnt’d

• Domains at the leaves of the tree generally represent individual hosts – point to IPs, HW information and mail routing information.

• Domain names in the interior of the tree can name a host and can point to structural information about

sub-domains.

• Example : blue.com is both the name of the Blue

company domain and the domain name of a host that

forwards mail between Blue and Internet.

(9)

DNS records

DNS: distributed db storing resource records (RR)

• Type = NS

– name is domain (e.g.

foo.com)

– value is hostname of an authoritative name server for this domain.

RR format:

(name, value, type, ttl)

• Type = A

– name is hostname – value is IP address

• Type = CNAME

– name is alias name for some

“canonical” (the real) name

www.ibm.com is really

servereast.backup2.ibm.com

– value is canonical name

• Type = MX

– value is the canonical name

(10)

DNS features

• The system is implemented by many computers that run the service – it is a multi-server distributed architecture.

• The core component is a distributed database:

– local control of data;

– data is available across the entire network ;

• Robustness and adequate performance are achieved through

– replication and

– caching .

(11)

Speeding up the lookup process

• Delegation : assigns responsibility for a sub- domain to another organisation; the parent

domain contains only pointers to sources of the sub-domain’s data.

• Caching : store data for future reference…there

is negative caching as well.

(12)

DNS messages

DNS protocol : query and reply messages, both with same message format

msg header

• identification: 16 bit id for query, reply to query uses same id

• flags:

– query or reply

– recursion desired

– recursion available

– reply is authoritative

(13)

DNS messages

Name, type fields for a query RRs in response to query records for authoritative servers additional “helpful”

info that may be used

(14)

Exercises

• Create the DNS model for the host sean.cs.ucc.ie which needs the IP address of christine.lab3.lifl.fr, using either the recursive or the iterative strategy.

• What records does an authoritative server store about a sub-domain authoritative server ?

• The concept of name space and name service extends beyond DNS to distributed systems and mobile

computing. Try to find out more about it.

Hint: URN (Universal Resource Name)

(15)

Conclusions

• DNS is a seamless service provided in the Internet that allows distributed applications to use names.

• It is also a protocol supported by an Internet architecture.

• The supporting architecture is distributed and relies on a set of root servers.

• The protocol uses a message with the same format for requests/replies.

• The application’s interface to DNS is the resolver.

• The performance is very important. How is it achieved ?

• See how other systems, e.g. Bluetooth, solve this problem.

References

Related documents

According to the international experience, federal authorities can carry out six groups of functions for support of mechanisms of development of innovative

However, there are some other ideas where the argument is built upon, for example, the fraternal relationship every soldier has with their superior, the importance of

There were three main strands to its economic policy trade and exchange rate reforms, the public sector investment programme PSIP and cuts in food subsidies and there was a series

To assemble the pump, refer to any specific sectional arrangement drawing with the contract. Otherwise section 8 shows the standard sectional drawing for the pump. Note that

The guidelines summarize requirements in order to validate commercially available serological test kits for the testing of plasma pools to ensure that single donations being

Our PFs and MAs who answer phones and schedule our patients, use a triage book to determine how soon a patient needs to be seen.. Another example out of our 99-page triage book

Checklist item 5: If a hidden master is used, the hidden authoritative master server should only accept zone transfer requests from the set of secondary zone name servers and

contacts its master server and, if necessary, copies the zone data files (Albitz & Liu 25), whereas a zone refers to a section of the domain name space (21). But in spite of what