addressing schemes l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Addressing Schemes PowerPoint Presentation
Download Presentation
Addressing Schemes

Loading in 2 Seconds...

play fullscreen
1 / 40

Addressing Schemes - PowerPoint PPT Presentation


  • 159 Views
  • Uploaded on

Addressing Schemes. Internet. host names: convenient app-to-app communication IP: efficient large-scale network communication MAC: quick-n-easy LAN forwarding. medellin.cs.columbia.edu. 128.119.40.7. 128.119.40.7. 128.119.40.7. 128.119.40.7. 128.119.40.7. E6-E9-00-17-BB-4B. 223.1.1.1.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

Addressing Schemes


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
addressing schemes
Addressing Schemes

Internet

  • host names: convenient app-to-app communication
  • IP: efficient large-scale network communication
  • MAC: quick-n-easy LAN forwarding

medellin.cs.columbia.edu

128.119.40.7

128.119.40.7

128.119.40.7

128.119.40.7

128.119.40.7

E6-E9-00-17-BB-4B

routing example

223.1.1.1

223.1.2.1

E

B

A

223.1.1.2

223.1.2.9

223.1.1.4

223.1.2.2

223.1.3.27

223.1.1.3

223.1.3.2

223.1.3.1

Routing Example

Starting at A, given IP datagram addressed to B:

  • look up network address of B, find B on same network as A
  • link layer sends datagram to B inside link-layer frame

frame source,

dest. address

datagram source,

dest. address

A’s IP

addr

B’s IP

addr

B’s MAC

addr

A’s MAC

addr

IP payload

datagram

frame

translating between addresses
Translating between addresses

Hostname (medellin.cs.columbia.edu)

DNS

IP address (128.119.40.7)

ARP

MAC address (E6-E9-00-17-BB-4B)

internet hostnames
Internet hostnames
  • Internet hosts often have names
    • less so today-- only servers have meaningful names
  • Hostnames are hierarchical
  • Example:

cicada.cs.princeton.edu.

Names processed right-to-left

Trailing period

technically correct,

often omitted

the domain name system dns
The Domain Name System (DNS)
  • Originally, all Internet hosts listed in a hosts.txt file
    • before hierarchical name structure
    • not scalable (obviously)
  • DNS deployed in mid 1980s
  • DNS is not really a traditional application-- called “middleware”
    • an application designed for use by another application
dns uses name servers

User

1

2

user @ cs.princeton.edu

cs.princeton.edu

Name

Mail

server

program

4

192.12.69.5

192.12.69.5

3

TCP

192.12.69.5

5

IP

DNS uses name servers

Applications know

to call for name

resolution

dns domain name system
DNS: Domain Name System

Function

map between (domain name, service)to value, e.g.,

(www.cs.tau.ac.il, Addr) -> 128.36.229.30

(cs.tau.ac.il, Email) -> netra.cs.tau.ac.il

(netra.cs.tau.ac.il, Addr) -> 128.36.229.21

Why use name, instead of IP address directly?

Hostname, Service

Address

clients

DNS

routers

servers

dns domain name system8
DNS: Domain Name System

Naming scheme

a hierarchical naming space divided into zones

each zone is a sub-tree of the global tree

called a zone

distributed management of the domain name space
Distributed Management of the Domain Name Space

A distributed database managed by authoritative name servers

each zone has its own authoritative name servers

an authoritative name server of a zone may delegate a subset (i.e. a sub-tree) of its zone to another name server

called a zone

slide10

Root Zone and Root Servers

  • The root zone is managed by the root name servers
    • 13 root name servers worldwide
    • 13/Anycast
slide12

Linking the Name Servers

  • Each name server knows the addresses of the root servers
  • Each name server knows the addresses of its immediate children (i.e., those it delegates)

Top level domain(TLD)

slide13

DNS Message Flow: Two Types of Queries

Recursive query:

  • Puts burden of name resolution on contacted name server
    • the contacted name server resolves the name completely

Iterated query:

  • Contacted server replies with name of server to contact
    • “I don’t know this name, but ask this server”
slide14

DNS Message Flow: Examples

Local DNS server helps requesting hosts to query the DNS system

Local DNS server is learned from DHCP, or configured, e.g. /etc/resolv.conf

slide15

iterated query

2

3

4

7

local name server

130.132.1.9

TLD name server

5

6

1

8

DNS Message Flow: The Hybrid Case

root name server

authoritative name server

dns.cs.umass.edu

requesting host

cyndra.cs.tau.ac.il

gaia.cs.umass.edu

resource records
Resource Records
  • Each name server maintains a collection of resource records

(Name, Value, Type, Class, TTL)

  • Name/Value: not necessarily host names to IP addresses
  • Types of records
  • Class: allow other entities to define types
  • TTL: how long the resource record is valid
    • used for caching
dns records
DNS Records

DNS: distributed db storing resource records (RR)

Type=NS

name is domain (e.g. tau.ac.il)

value is the name of the authoritative name server for this domain

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

  • Type=CNAME
    • name is an alias name for some “canonical” (the real) name
    • value is canonical name
  • Type=A
    • name is hostname
    • value is IP address
  • Type=MX
    • value is hostname of mail server associated with name
  • Type=SRV
    • general extension
dns protocol messages
DNS Protocol, Messages

DNS protocol : over UDP/TCP; queryand reply messages, both with the same message format

DNS Msg header:

  • identification: 16 bit # for query, the reply to a query uses the same #
  • flags:
    • query or reply
    • recursion desired
    • recursion available
    • reply is authoritative
observing dns
Observing DNS

Use the command dig (or nslookup):

force iterated query to see the trace:%dig +trace www.cnn.com

see the manual for more details

Capture the messages using Ethereal

DNS server is at port 53

  • - How does a client locate a server?
  • - Is the application extensible, robust, scalable?
what dns did right
What DNS did Right?

Hierarchical delegation avoids central control, improving manageability and scalability

Redundant servers improve robustness

see http://www.internetnews.com/dev-news/article.php/1486981 for DDoS attack on root servers in Oct. 2002 (9 of the 13 root servers were crippled, but only slowed the network)

see http://www.cymru.com/DNS/index.html for performance monitoring

Caching reduces workload and improve robustness

problems of dns
Problems of DNS

Domain names may not be the best way to name other resources, e.g. files

Relatively static resource types make it hard to introduce new services or handle mobility

Although theoretically you can update the values of the records, it is rarely enabled

Simple query model make it hard to implement advanced query

Early binding (separation of DNS query from application query) does not work well in mobile, dynamic environments

e.g., load balancing, locate the nearest printer

lan addresses and arp
LAN Addresses and ARP

32-bit IP address:

  • network-layer address
  • used to get datagram to destination network

LAN (or MAC or physical) address:

  • used to get datagram from one interface to another physically-connected interface (same network)
  • 48 bit MAC address (for most LANs) burned into the adapter’s ROM
the web some jargon
The Web: Some Jargon

Web page:

consists of “objects”

addressed by a URL

Most Web pages consist of:

base HTML page, and

several referenced objects

URL has two components: host name, port number and path name:

User agent for Web is called a browser, e.g.

Mozilla Firefox

MS Internet Explorer

Server for Web is called Web server:

Apache

MS Internet Information Server

http://www.cs.tau.ac.il:80/index.html

24

the web the http protocol
The Web: the HTTP Protocol

HTTP: hypertext transfer protocol

Web’s application layer protocol

HTTP uses TCP as transport service

client/server model

client: browser that requests, receives, “displays” Web objects

server: Web server sends objects in response to requests

http1.0: RFC 1945

http1.1: RFC 2068

http request

PC running

Explorer

http response

http request

Server

running

Apache Web

server

http response

Linux running

Firefox

25

http 1 0 message flow
HTTP 1.0 Message Flow

Client initiates TCP connection (creates socket) to server, port 80

Server waits for requests from clients

Client sends request for a document

Web server sends back the document

TCP connection closed

Client parses the document to find embedded objects (images)

repeat above for each image

26

http 1 0 message flow more detail
HTTP 1.0 Message Flow (more detail)

Suppose user enters URL www.cs.tau.ac.il/index.html

1a. http client initiates TCP connection to http server (process) at www.cs.tau.ac.il. Port 80 is default for http server.

0.http server at host www.cs.tau.ac.il waiting for TCP connection at port 80.

1b.server “accepts” connection, ack. client

2.http client sends http request message (containing URL) into TCP connection socket

3.http server receives request message, forms response message containing requested object (index.html), sends message into socket (the sending speed increases slowly, which is called slow-start)

time

27

http 1 0 message flow cont
HTTP 1.0 Message Flow (cont.)

5. http client receives response message containing html file, parses html file, finds embedded image

4.http server closes TCP connection.

time

6.Steps 1-5 repeated for each of the embedded images

28

slide28

HTTP Request Message: General Format

  • ASCII (human-readable format)

29

http request message example get
HTTP Request Message Example: GET

request line

(GET, POST,

HEAD commands)

GET /somedir/page.html HTTP/1.0Host: www.somechool.eduConnection: close

User-agent: Mozilla/4.0

Accept: text/html, image/gif, image/jpeg

Accept-language: en

(extra carriage return, line feed)

header

lines

Carriage return,

line feed

indicates end

of message

30

http response message
HTTP Response Message

status line

(protocol

status code

status phrase)

HTTP/1.0 200 OK

Date: Wed, 23 Jan 2008 12:00:15 GMT

Server: Apache/1.3.0 (Unix)

Last-Modified: Mon, 22 Jun 1998 …...

Content-Length: 6821

Content-Type: text/html

data data data data data ...

header

lines

data, e.g.,

requested

html file

31

http response status codes
HTTP Response Status Codes

200 OK

request succeeded, requested object later in this message

301 Moved Permanently

requested object moved, new location specified later in this message (Location:)

400 Bad Request

request message not understood by server

404 Not Found

requested document not found on this server

505 HTTP Version Not Supported

In the first line of the server->client response message. A few sample codes:

32

trying out http client side for yourself
Trying out HTTP (client side) for yourself

1. Telnet to your favorite Web server:

Opens TCP connection to port 80

(default http server port) at www.tau.ac.il.

Anything typed in sent

to port 80 at www.tau.ac.il

telnet www.tau.ac.il 80

2. Type in a GET http request:

By typing this in (hit carriage

return twice), you send

this minimal (but complete)

GET request to http server

GET /index.html HTTP/1.0

3. Look at response message sent by the http server.

33

http 1 0 delay
HTTP/1.0 Delay

For each object:

TCP handshake --- 1 RTT

client request and server responds --- at least 1 RTT (if object can be contained in one packet)

Discussion: how to reduce delay?

34

http message flow persistent http
HTTP Message Flow: Persistent HTTP

Default for HTTP/1.1

On same TCP connection: server parses request, responds, parses new request, …

Client sends requests for all referenced objects as soon as it receives base HTML

Fewer RTTs

35

browser cache and conditional get
Browser Cache and Conditional GET

Goal: don’t send object if client has up-to-date stored (cached) version

client: specify date of cached copy in http request

If-modified-since: <date>

server: response contains no object if cached copy up-to-date:

HTTP/1.0 304 Not Modified

http response

HTTP/1.0

304 Not Modified

server

client

http request msg

If-modified-since: <date>

object

not

modified

http request msg

If-modified-since: <date>

object

modified

http response

HTTP/1.1 200 OK

<data>

36

http message extension form
HTTP Message Extension: Form

if an HTML page contains forms, they are encoded in message body

37

http message flow extensions keeping state
HTTP Message Flow Extensions: Keeping State

Why do we need to keep state?

In FTP, the server keeps the connection open with each client, and thus the state (e.g., current dir/password). Why does’t HTTP use this approach?

38

user server interaction cookies
User-server Interaction: Cookies

Goal: no explicit application level session

Server sends “cookie” to client in response msg

Set-cookie: 1678453

Client presents cookie in later requests

Cookie: 1678453

Server matches presented-cookie with server-stored info

authentication

remembering user preferences, previous choices

usual http request msg

Cookie: #

usual http request msg

Cookie: #

usual http response msg

usual http response msg

server

client

usual http request msg

usual http response +

Set-cookie: #

cookie-

specific

action

cookie-

specific

action

39

user server interaction authentication
User-Server Interaction: Authentication

Authentication goal: control access to server documents

stateless: client must present authorization in each request

authorization: typically name, password

Authorization: header line in request

if no authorization presented, server refuses access, sends

WWW-authenticate:

header line in response

usual http request msg

+ Authorization:line

usual http request msg

+ Authorization:line

usual http response msg

usual http response msg

time

server

client

usual http request msg

401: authorization req.

WWW-authenticate:

Browser caches name & password so

that user does not have to repeatedly enter it.

40

summary http
Summary: HTTP

HTTP message format

ASCII (human-readableformat) requests, header lines, entity body,and responses line

HTTP message flow

stateless server

each request is self-contained; thus cookie andauthentication,are neededin each message

reducing latency

persistent HTTP

the problem is introduced by layering !

conditional GET reduces server/network workload and latency

cache and proxy reduce traffic and latency

  • - How does a client locate a server?
  • - Is the application extensible, robust, scalable?

41