Communication and Networks Assignment

profileTubekbay001
0_Lesson6DomainNameSystem.pptx

Communications and Networks

version 1.0

Diploma in Information Technology

Copyright © 2020 by Singapore Institute of Management Pte Ltd. All rights reserved.

Lesson 6: Domain Name System

1

Lesson 6 Learning Outcomes

Explain what is DNS

Describe the purpose of DNS

Explain how DNS works

Describe how DNS cache

Describe the different types of DNS entries

Identify how abbreviations is handled in DNS

2

Lesson 6 Outline

DNS Basics

Implementing DNS Servers

DNS Mapping Process

3

Human-Readable Names

Domain Name System (DNS): provides a service that maps human-readable names to computer addresses

Browsers, mail software, most other Internet applications use the DNS

DNS is an example of client-server interaction!

4

Mapping of Domain Names

Traditionally, mapping of names was done via centrally managed text file

helloworld.com => 123.151.121.131

Inefficient: Text file is distributed to all hosts

DNS allows applications to use domain names

Domain names is then translated into network layer address (IP address)

Hierarchical and fully distributed

5

Resolving Hostname

Mapping is not performed by a single server

Fully distributed: Naming information is distributed to multiple servers on the Internet

Whenever an application needs to translate a name, it becomes a client of the naming system

client sends request message to name server

server finds corresponding address and sends a reply message

6

Temporary Client

Mapping may not be always available

If a server cannot answer a request,

Server temporarily becomes the client of another name server

Until a server is found that can answer the request

7

DNS Syntax

Each name consists of a series of alpha-numeric segments separated by periods

Domain names are hierarchical, most significant part of the name is on the right

Top layer of the hierarchy is the last field

.com, .org, .edu, .net

8

Domain Name Hierarchy Example

Example: mordred.cs.purdue.edu, anakin.cisco.com

Left-most segment “mordred” and “anakin” is the name of individual computer

Other segments identifies the group that owns it

“purdue” gives the name of a university

“cisco” gives the name of a company

9

Top-level Domain

DNS specifies values for the most significant segment called a top-level domain (TLD)

Controlled by Internet Corporation for Assigned Names and Numbers (ICANN)

ICANN designates one or more domain registrars to administer a given top-level domain and approve specific names

But ICANN is responsible for managing 13 top DNS root server

10

TLDs Servers

For each top-level domains are at least 2 DNS servers

Below this level are other delegated authorities to managed them

Some TLDs are generic: they are generally available

Other TLDs are restricted to specific groups or government agencies

11

Domain Registration

An organisation applies for a name under one of the existing top-level domains

most US corporations choose to register under the “.com” domain

DNS allows organisations to use a geographic registration

Corporation For National Research Initiatives

cnri.reston.va.us

12

List of TLDs

Source: Douglas, C (2016) Computer Networks and Internets

13

Mnemonic Names

Domain names are assigned to reflect the service provided

FTP server: ftp.foobar.com

Web server: www.foobar.com

Such names are mnemonic, but not compulsory

14

Using WWW

Use of www for a web server is merely a convention

Any computer can run a web server, even if it does not contain www

A computer with domain name beginning with www is not required to run a web server

15

DNS Example

doc.gold.ac.uk

.uk managed by UK registration authority (Nominet)

.ac.uk and gov.uk managed by UK Education and Research Networking Assocation (UKERNA)

.gold.ac.uk managed by Goldsmiths (a school in a university)

doc.gold.ac.uk managed by Department of Computing in Goldsmiths

16

DNS Explained

Source: https://www.youtube.com/watch?v=72snZctFFtA

17

DNS Process Summary

If local server can resolve name, returns the address

If unable, make request to one of the root servers

If root server can resolve, returns the address

Otherwise, return address of another server that can help

Repeats until name is resolved OR firmly established that name cannot be resolved

Recursive or iterative

18

Practice 6.1

What happens to a request when a name server receives it but does not have an answer to it?

In the URL, “cnri.reston.va.us”, which segment is the TLD? What does the TLD represent?

What does it mean when domain names are mnemonic?

19

Lesson 6 Outline

DNS Basics

Implementing DNS Servers

DNS Mapping Process

20

Implementing the DNS

Each organization is free to choose the details of its servers

A small organization that only has a few computers can contract with an ISP to run a DNS server

Computer

Computer

Computer

Hub

DNS Computer

Computer

Computer

Computer

Hub

ISP DNS Computer

ISP Hub

21

DNS Choices

An organization that runs its own DNS

Can choose to place all names in a single physical server

Can choose to divide its names among multiple servers

candy.foobar.com

soap.foobar.com

foobar.com

candy

soap

22

DNS Server Hierarchy Example

A hypothetical Foobar Corporation could choose to structure servers if the corporation had a candy division and a soap division

Source: Douglas, C (2016) Computer Networks and Internets

23

DNS Autonomy

DNS is designed to allow each organisation to assign or modify domain names without informing a central authority

Autonomy: each organization is permitted to operate DNS servers for its part of the hierarchy

Purdue University operates a server for names ending with purdue.edu

IBM Corporation operates a server for names ending with ibm.com

24

Replicating DNS Servers

Each DNS server can link to other domain name servers up and down the hierarchy

a server can be replicated; multiple physical copies of the server exist

Replication is useful for heavily used servers (like root servers) that provide information about TLDs

Administrators must guarantee all copies are coordinated to provide identical information

25

Name Resolution

Translation of a domain name into an address is called name resolution

The name is said to be resolved to an address

Software that perform this is known as a name resolver or resolver

In socket API, the resolver is invoked by calling function gethostbyname

26

DNS Request and Reply

Resolver becomes a client by contacting a DNS server

DNS server returns an answer to the caller

Each resolver is configured with the address of one or more local domain name servers

Resolver forms a DNS request message

Sends the message to the local server

Waits for server to send DNS reply message

27

Name Resolution Paradigm

Resolve can choose to use either stream or message paradigm when communicating with a DNS server

Most resolvers use message paradigm as it imposes less overhead for a small request

Example: chocolate.candy.foobar.com

Resolver will send request to local DNS server for foobar.com

Even if it cannot answer the request, the server knows to contact the server for candy.foobar.com, which can generate an answer

28

Locality of Reference

Locality of reference principle that forms the basis for caching applies to the Domain Name System in two ways

Spatial: A user tends to look up the names of local computers more often than the names of remote computers

Temporal: A user tends to look up the same set of domain names repeatedly

29

Exploiting Locality

DNS exploits spatial locality

Resolver contacts a local server first

To exploit temporal locality

a DNS server caches all lookups

30

DNS Lookup Algorithm

Source: Douglas, C (2016) Computer Networks and Internets

31

Caching in DNS Server

When a request arrives for a name outside the set for which the server is an authority

Server temporarily becomes a client of another name server

When the other server returns an answer, original server caches the answer

Sends a copy of the answer back to the resolver from which the request arrived

Server 1

(authority)

Resolver

i) Help resolve name

ii) Can’t resolve name

Server 2

iii) Ask others

iv) Can resolve name

v) Returns answer

vi) Cache answer

vii) Returns answer

32

Caching Consideration

In addition to knowing the address of all servers down the hierarchy

Each DNS server must know address of a root server

How long items should be cached?

If cached too long, the item will become stale (may become outdated)

DNS will specify a cache timeout for each item

33

Practice 6.2

How does DNS allow autonomy?

Why is there a need to replicate a DNS server?

What kind of communication paradigm does name resolution uses? Which is more commonly used and why?

34

Lesson 6 Outline

DNS Basics

Implementing DNS Servers

DNS Mapping Process

35

Entry Fields

Each entry in a DNS database consists of three fields:

Domain name: human readable names

Record type: specifies how the value is to be interpreted

Value: such as IP address

A query specifies both a domain name and a type

Server only returns a binding that matches the type of the query

36

Binding Classifications

Principal type maps a domain name to an IP address

Known as type A bindings

used by applications such as FTP, or a browser

ftp.web.com -> 192.168.1.0

Another is type MX that specifies a Mail eXchanger

SMTP uses type MX to look up the domain name in an email address

[email protected]

37

Entry Type

Each entry in a DNS server has a type

Resolver must specify the type desired when looking up a name

DNS server returns only entries that match the specified type

38

Mapping Entry Type Efficiently

DNS type system can produce unexpected results

Address returned depends on the type

the name corporation.com can be used for both web and email services

Possible to divide the workload between separate computers

Mapping of type A lookups to one computer and type MX lookups to another

39

Alias and CNAME

The DNS offers a CNAME

Analogous to shortcut in file systems

This provides an alias for another DNS entry

aliases can be useful, suppose Foobar Corporation has two computers, named as:

hobbes.foobar.com and calvin.foobar.com

40

Alias and CNAME Example

Suppose that foobar runs a web server on computer hobbes, and wants to follow the convention of using the name www

EITHER: rename computer hobbes

OR: create a CNAME entry for www.foobar.com that points to hobbes

When resolver sends a request for www.foobar.com, server returns address of computer hobbes

41

Alias Benefits (1/2)

Alias permits an organization to change the computer used for a service without changing the names or addresses:

Foobar Corporation can move its web service from hobbes  calvin

changing the CNAME record in DNS server allows two computers retain their original names and IP addresses

42

Alias Benefits (2/2)

Aliases allows an organization to associate multiple aliases with a single computer

Can run an FTP server and a web server on the same computer

Create CNAME records for:

www.foobar.com

ftp.foobar.com

43

Abbreviations

DNS does not incorporate abbreviations

Server only responds to a full name

Most resolvers can be configured with a set of suffixes that allow a user to abbreviate names

Each resolver at Foobar Coporation might be programmed to look up a name twice:

once with no change

once with the suffix foobar.com appended

44

Abbreviations and DNS

If user enters full domain name

Local server will return address and proceed

If user enters an abbreviated name

Will first try to resolve the name

Receive error because no such name exists

Then it will try appending suffix and looking up the resulting name

45

DNS Character Set Limitations

DNS uses the ASCII character set

Can represent mostly English characters

Languages like Russian, Greek, Chinese, and Japanese each contain special characters

No ASCII representation exists

Many European languages use diacritical (accent) marks that cannot be represented in ASCII

46

IETF Approach to DNS Characters

IETF debated modifications and extensions of the DNS to accommodate international domain names

Chose an approach known as Internationalizing Domain Names in Applications (IDNA)

IDNA uses ASCII to store all names

If a domain name contains a non-ASCII character, IDNA translates the name into a sequence of ASCII characters

Stores the result in the DNS

47

IDNA Translation

IDNA relies on applications to translate between international characters and internal ASCII form

Rules for translating international domain names are complex and uses Unicode

Latest versions of Firefox and Internet Explorer can accept and display non-ASCII domain names as they each implement IDNA

48

Practice 6.3

Describe each of the three fields in a DNS entry.

Describe the type of domain name binding that can be used for a mail exchanger. Give an application example that uses such binding.

49

Reading

Douglas, C. (2016). Computer Networks and Internets, Global Edition (6th ed.). Pearson Education. ISBN: 978-1292061177 Chapter 4

50

End of Lesson

51