• No results found

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

N/A
N/A
Protected

Academic year: 2021

Share "CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng."

Copied!
33
0
0

Loading.... (view fulltext now)

Full text

(1)

CS 355

Computer Networking

(2)

Chapter 2: Application Layer

Overview:

• Principles of network applications?

• Introduction to Wireshark

• Web and HTTP

• FTP

• Electronic Mail: SMTP, POP3, IMAP

• DNS: Domain Name System (or Service)

• P2P applications

(3)

DNS:

• Introduction to DNS

• DNS naming structure

• DNS components: some concepts

• How DNS works: a rough idea

(4)

An Introduction to DNS:

• Why DNS?

• What is DNS?

• What is DNS services?

(5)

Why DNS: naming issues on the Internet

• An address is how you get to an endpoint – Typically, hierarchical (for scaling): e.g.

• 950 Charter Street, Redwood City CA, 94063 • A name is how an endpoint is referenced

– Typically, no structurally significant hierarchy • “David”, “Tokyo”, “itu.int”

• Computers work with numbers; Humans work with names ==> IP addresses are NUMBERS

?

1011011011101110110110

Q: map between IP addresses and name?

(6)

What is DNS

Domain Name System:

• distributed database implemented in hierarchy of many name servers • application-layer protocol in host, routers, name servers to

communicate to resolve names (address/name translation)

– note: core Internet function, implemented as application-layer protocol

– complexity at network’s “edge”

Why not centralize DNS?

• single point of failure • traffic volume

• distant centralized database • maintenance

(7)

What is DNS service

DNS services

• hostname to IP address translation • host aliasing

– Canonical, alias names • mail server aliasing

• load distribution

(8)

What is domain (sub-domain) name?

• A domain name is the sequence of labels from a node

to the root, separated by dots (“.”s), read left to right

• For example domain names:

– cs.keene.edu – yahoo.com

• one domain is a

sub-Domain

of another if its domain

name ends in the other’s domain name

– So cs.keene.edu is a subdomain of • keene.edu

• edu

(9)

Naming Structure of DNS

• Top-level domain

• Second-level domain

(10)

DNS Naming Structure

• Top Level Domains (TLDs) defined by global authority

– com, org,

– edu

• ccTLD: country code TLDs .

– ca

• 2nd Level Domains.

– google.ca

– microsoft.com

(11)
(12)

Country code domains: an example

• Top level domains are US-centric

• Geographic TLDs used for organizations in other countries:

TLD Country

.uk United Kingdom

.ru Russia

.cn China

• Countries define their own internal hierarchy:

gov.cn, org.cn ,net.cn , edu.cn and com.cn are used for organizations in China

(13)

Second/Third-level domains

• Within every top-level domain there is a huge list of 2

nd

/3

rd

level domains

• For example, in the COM second-level domain, we have:

– yahoo

– msn

– microsoft

(14)

DNS naming structure: an example

TLD ccTLD 3rd LD 2ndLD

• Examples:

Google.com

hust.edu.cn

2nd LD

(15)

Distributed, hierarchical naming structure

Root DNS Servers

com DNS servers org DNS servers edu DNS servers keene.edu DNS servers unh.edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers

Client wants IP for www.amazon.com:

• client queries a root server to find com DNS server

• client queries com DNS server to get amazon.com

DNS server

• client queries amazon.com DNS server to get IP

address for www.amazon.com

(16)

Naming a Domain Naming a Directory

yahoo.com.au. C:\windows\system32\d

rivers\ Start Here Start Here A “.” is used as separator A “\” is used as separator

(17)

DNS Components:

• DNS Servers

• Resource Record in DNS Database

• DNS Name Resolution Approach

(18)

• contacted by local name server that can not resolve name • root name server:

– contacts authoritative name server if name mapping not known – gets mapping

– returns mapping to local name server

13 root name

servers worldwide

b USC-ISI Marina del Rey, CA l ICANN Los Angeles, CA e NASA Mt View, CA

f Internet Software C. PaloAlto, CA (and 36 other locations)

i Autonomica, Stockholm (plus 28 other locations) k RIPE London (also 16 other locations)

m WIDE Tokyo (also Seoul, Paris, SF)

a Verisign, Dulles, VA

c Cogent, Herndon, VA (also LA) d U Maryland College Park, MD g US DoD Vienna, VA

h ARL Aberdeen, MD

j Verisign, ( 21 locations)

(19)

• Top-level domain (TLD) servers:

– responsible for com, org, net, edu, etc, and all top-level

country domains uk, fr, ca, jp.

– Network Solutions maintains servers for com TLD

– Educause for edu TLD

• Authoritative DNS servers:

– organization’s DNS servers, providing authoritative

hostname to IP mappings for organization’s servers

(e.g., Web, mail).

– can be maintained by organization or service provider

(20)

• does not strictly belong to hierarchy

• each ISP (residential ISP, company, university) has one.

– also called “default name server”

• when host makes DNS query, query is sent to its local

DNS server at first

– acts as proxy, forwards query into hierarchy

(21)

DNS:

distributed database storing resource records

(RR)

RR format: (name, ttl, class, type, value)

DNS Resource Record

• TTL is a timing parameter

• IN class is widest used, means Internet

• There are multiple types (4 typical types) of RR records • Everything after the type identifier is called value

name ttl

class

type value

(22)

• Type=NS

– name is domain (e.g. foo.com)

– value is hostname of authoritative name server for this domain r Type=A

 name is hostname

 value is IP address

r 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

r Type=MX

 value is name of mailserver

associated with name

(23)

DNS Record: Type A Record

• means the “Address” record

• Contains an IPv4 Address (the address computers use to uniquely identify each other on the internet)

the record here defines the host uniquely identifiable as “cs.keene.edu” to be reachable at the IPv4 Address

158.65.110.24

(24)

cs.keene.edu IN A 158.65.110.24

(25)

DNS Record: Type CNAME Record

• A CNAME (canonical name) defines an alias

• The alias will then be resolved, if another CNAME is encountered then the process continues until an A record is found

• defines the name uniquely identifiable as “www.keene.edu” to be and alias to “suncook.keene.edu”, i.e. both of them have the same IP

suncook.keene.edu IN A 158.65.2.147

(26)

suncook.keene.edu IN A 158.65.2.147

www.keene.edu IN CNAME suncook.keene.edu

(27)

• An MX record defines the mail servers for a particular domain

• Mail eXchange records hold the name of hosts, and their priorities, able to deliver mail for the domain.

In the ksc.mailcruiser.com domain, defines the mail server

mail.campuscruiser.com to be the priority 5 mail server for the “ksc.mailcruiser.com” domain.

DNS Record: Type MX Record

(28)

Type MX Record: an example

(29)

• An NS record defines the authoritative Name servers for the domain

• defines the host “nic.keene.edu” to be a name sever for the domain “keene.edu”

DNS Record: Type NS Record

(30)

Type NS Record: an example

(31)

requesting host cs.keene.edu gaia.cs.umass.edu root DNS server local DNS server nic.keene.edu 1 2 3 4 5 6 authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server

• Host at cs.keene.edu

wants IP address for

gaia.cs.umass.edu

iterated query: r contacted server

replies with name of server to contact r “I don’t know this

name, but ask this server”

(32)

requesting host cs.keene.edu gaia.cs.umass.edu root DNS server local DNS server nic.keene.edu 1 2 4 5 6 authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server 3 recursive query:

r puts burden of name resolution on

contacted name server

(33)

Thank you for your attendance

Any questions?

References

Related documents

Application Layer 2-18 requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 3 4 5 6 authoritative DNS server dns.cs.umass.edu 7 8

Like to your meal online order your email address to the group to cook your guests are giving consent to satisfy your own food was completely served cold.. Helping us extra mayo, we

The estimated coefficients on each of the three strategic choices, product and process innovation and internationalisation, are positive and significant at the 1% level in

On Petition for a Writ of Certiorari to the Supreme Court of the State of Kansas BRIEF FOR KANSAS COALITION AGAINST SEXUAL AND DOMESTIC VIOLENCE, LEGAL MOMENTUM, NATIONAL

missible levels of monetary aggregation for the Euro area. We find that the Euro area mone­  tary  assets  in  M2  and  M3  are  weakly  separable  and 

Així, com a principals novetats, destaca la referència en el preàmbul a la llengua catalana com a “element vertebrador” de la identitat de la societat de les Illes

requesting host allspice.cs.swarthmore.edu gaia.cs.umass.edu root DNS server local DNS server dns.cs.swarthmore.edu 1 2 3 4 5 6 authoritative DNS server dns.cs.umass.edu

requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 3 4 5 6 authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server Recursive