Top Banner
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
19

Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Jan 18, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Chapter 2Application Layer Computer

Networking: A Top Down Approach, 4th edition. Jim Kurose, Keith RossAddison-Wesley, July 2007.

Page 2: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Last Lecture

HTTPRequest/Response

Conditional GET messageSimple Mail Transfer Protocol (SMTP)Comparison with HTTP

Page 3: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Today’s Lecture

Domain Name System(DNS)

Page 4: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

HTTP overviewUses TCP: Client initiates TCP connection (creates socket)

to server, port 80 Server accepts TCP connection from client HTTP messages (application-layer protocol

messages) exchanged between browser (HTTP client) and Web server (HTTP server)

Advantage of Layered architecture HTTP does not worry about lost data or how

TCP recovers from lossHTTP is “stateless”

Server maintains no information about past client requests

Page 5: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Conditional GET

Problem: The copy of the object residing in the cache may be stale The object may have been modified since the

copy was cached HTTP has a mechanism that allows a cache to

verify that its objects are up to date

Conditional GET message

(1) The request message uses the GET method (2) The request message includes an If-Modified-

Since header line.

Page 6: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Conditional GET

Goal: Don’t send object if cache has up-to-date cached version

Cache: specify date of cached copy in HTTP requestIf-modified-since:

<date> Server: Response contains

no object if cached copy is up-to-date: HTTP/1.0 304 Not

Modified Waste bandwidth Increases response time

Cache Server

HTTP request msgIf-modified-since:

<date>

HTTP responseHTTP/1.0

304 Not Modified

Object not

Modified

HTTP request msgIf-modified-since:

<date>

HTTP responseHTTP/1.0 200 OK

<data>

Object Modified

Page 7: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Electronic Mail

Asynchronous Medium

Three major components: • User Agents • Mail Servers • Simple Mail Transfer

Protocol: SMTP

User Agent• a.k.a. “mail reader”• composing, editing, reading

mail messages• e.g., Eudora, Outlook,

Mozilla Thunderbird• Sends message to the mail

server

user mailbox

outgoing message queue

mailserver

useragent

useragent

useragent

mailserver

useragent

useragent

mailserver

useragent

SMTP

SMTP

SMTP

Page 8: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Electronic Mail

Mail Servers Each recipient has a mailbox

located in one of the mail servers Mailbox manages and maintains

the messages that have been sent to him.

Message queue of outgoing (to be sent) mail messages

Simple Mail Transfer Protocol (SMTP) between mail servers to send email messages Client and Server Both client and sever sides of

SMTP run on every mail server. Runs on TCP at port 25. RFC 2821

mailserver

useragent

useragent

useragent

mailserver

useragent

useragent

mailserver

useragent

SMTP

SMTP

SMTP

Page 9: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

SMTP SMTP uses persistent connections

Can send all of the messages over the same TCP connection

Comparison with HTTP: HTTP transfer files from web server to web client

SMTP from one mail server to another

Both use Persistent Connections

HTTP: pull

Someone loads information on a web server and users use HTTP to pull this info

TCP connection is initiated by the machine that wants to receive the file

SMTP: push

Sending mail sever pushes the file to the receiving mail server

TCP connection is initiated by the machine that wants to send the file

Page 10: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

DNS: Domain Name System

People: many identifiers: SSN, name, passport

#

Internet hosts: IP address (32 bit) “name”, e.g.,

ww.yahoo.com - used by humans

Q: map between IP addresses and name ?

Domain Name System: Distributed Database

implemented in hierarchy of many DNS servers

An application-layer protocol

that allows hosts to query the distributed database

DNS uses UDP over port number 53.

RFC 1034 and RFC 1035

Page 11: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

DNS

Simple design would have one DNS server that contains all the mappings

Why not centralize DNS? Single point of failure Traffic volume Distant centralized database Maintenance

A centralized database in a single DNS server doesn’t scale!

Page 12: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Root DNS Servers

com DNS servers org DNS servers edu DNS servers

poly.eduDNS servers

umass.eduDNS servers

yahoo.comDNS servers

amazon.comDNS servers

pbs.orgDNS servers

Distributed, Hierarchical Database

Client wants IP for www.amazon.com: Client first queries a root server The root server returns the IP addresses for TLD servers for

the top level domain com The client then contacts one of the TLD servers which returns

the IP address of an authoritative server for amazon.com The authoritative server then returns the IP address for the

host name www.amazon.com

Page 13: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

DNS: Root Name Servers

13 root DNS servers world wide Each server is a cluster of replicated servers

security and reliability purposes. For more information see www.root-servers.org

b USC-ISI Marina del Rey, CAl ICANN Los Angeles, CA

e NASA Mt View, CAf Internet Software C. Palo Alto, 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, VAc Cogent, Herndon, VA (also LA)d U Maryland College Park, MDg US DoD Vienna, VAh ARL Aberdeen, MDj Verisign, ( 21 locations)

Page 14: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

TLD and Authoritative Servers Top-level Domain (TLD) Servers:

Responsible for com, org, net, edu, etc, and all top-level country domains uk, fr, jp.

Network Solutions maintains servers for com TLD

Educause for edu TLD Authoritative DNS Servers:

Every organization with publicly accessible hosts provide accessible DNS records.That maps the names of those hosts to IP addresses

Authoritative DNS servers houses these DNS records

Page 15: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Local Name Server

Does not strictly belong to hierarchy Each company, university has one.

Also called “default name server” When host makes DNS query, query is

sent to its local DNS server acts as proxy, forwards query into hierarchy

Page 16: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

requesting hostcis.poly.edu

gaia.cs.umass.edu

root DNS server

local DNS serverdns.poly.edu

1

23

4

5

6

authoritative DNS serverdns.cs.umass.edu

78

TLD DNS server

DNS name resolution example

Host at cis.poly.edu wants IP address for gaia.cs.umass.edu

Iterated query: Contacted server

replies with name of server to contact

“I don’t know this name, but ask this server”

Page 17: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

requesting hostcis.poly.edu

gaia.cs.umass.edu

root DNS server

local DNS serverdns.poly.edu

1

2

45

6

authoritative DNS serverdns.cs.umass.edu

7

8

TLD DNS server

3Recursive Query: Puts burden of

name resolution on other server

DNS Caching Extensively used Cache entries timeout

(disappear) after some time

TLD servers typically cached in local name servers

Thus root name servers not often visited

DNS name resolution example

Page 18: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Home Assignment

• Root name servers use Anycast technique? Why? Advantages?

• How to enter record into DNS?

• What is a whois database?

Page 19: Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.