Internet Protocols Fall 2003

8 downloads 102 Views 485KB Size Report
Mar 4, 2003 ... by Richard Stevens. • Recommended: Web Protocols and Practice: HTTP/1.1, Networking Protocols, Caching and Traffic Measurements ...
Internet Protocols Fall 2006 Lecture 1 Andreas Terzis [email protected] CS449/Fall06

1

Course Description • Learn about the protocols that make the Internet work – Understand design space and tradeoffs – Compare different protocols at the same level • Protocol examples: Ethernet, WiFi, IP, TCP, HTTP

– Examples from alternative architectures

• Learn how to write code for networked applications CS449/Fall06

2

Text Books • Required: Computer Networks: A Systems Approach (3rd ed.) by Peterson, Davie • Recommended: UNIX Network Programming by Richard Stevens • Recommended: Web Protocols and Practice: HTTP/1.1, Networking Protocols, Caching and Traffic Measurements CS449/Fall06

3

Course Times • Lectures: ThF 2:30-3:45 pm Shaffer 101 • Office Hours: ThF 1-2pm WP 417 and by appt • TA Section: Every second week • TA Office Hours: MT 11-12, WP 425

CS449/Fall06

4

Grading Policies • Grading – – – –

Homework 10%, Projects 35% Midterm 20%, Final 30% Class Participation 5% Different curves for 349/449

• NO LATE HOMEWORK OR PROJECTS ACCEPTED (really) • Project groups DO NOT change CS449/Fall06

5

Course Schedule – – – –

W1 (9/7) Introduction, Internet Architecture W2 (9/14) Link Layer: Ethernet, PPP, IP W3 (9/21) MAC W4 (9/28) IP: Addressing, ARP/RARP, ICMP and examples – W5 (10/5) Intra-domain routing – W6 (10/12) Inter-domain routing, IP Mobility – W7 (10/19) Review, Midterm (10/20)

CS449/Fall06

6

Course Schedule (2) – – – – – – – –

W8 (10/26) Transport layer W9 (11/2) Congestion Control W10 (11/09) QoS, Network Measurements W11 (11/16) DNS, HTTP W12 (11/23) Thanksgiving W13 (11/30) P2P, Streaming Media W14 (12/7) Wrap Up Final TBA

CS449/Fall06

7

Course Projects • Three implementation projects – Learn how to write networked applications (using the TCP/IP API) – Teams of 2-3 – For the last two projects you will create a software router/firewall that handles real traffic • http://yuba.stanford.edu/vns/

CS449/Fall06

8

Logistics • Course website – http://hinrg.cs.jhu.edu/cs349-fall06/ – Check every day • Everything goes there

• Course email list – [email protected] – To subscribe: https://hinrg.cs.jhu.edu/mailman/listinfo/cs349/ CS449/Fall06

9

Short (P)Review • Very high-level overview of networking – Show how the World Wide Web works – Present some of the key ideas behind the Internet architecture • Large Scale • Dealing with failures • Co-operation/Competition

CS449/Fall06

10

World Wide Web • We use it every day • Millions of websites • Webpages contain objects

http://www.google.com/index.html

– HTML, Text, images, etc – Base HTML file contains reference to other objects – Each object addressable by a URL

CS449/Fall06

11

Questions • • • • •

How to express what we are looking for How to find what we are looking for How to transmit bits How to protect against errors How to direct bits towards the right destination • How to share resources CS449/Fall06

12

Solution • Divide and Conquer – Break the problem in smaller parts – Solve each part separately – Put the pieces back together

• Layering • Protocol Stack

CS449/Fall06

application

application

transport

transport

network

network

link

link

physical

physical 13

Physical Layer • Send bits between directly connected machines • Physical Media – – – –

Twisted Pair Coaxial Cable Fiber Optics Radio Link

• Bandwidth • Dedicated vs. shared link CS449/Fall06

14

Data Link Layer • Data Link Layer functions

router base station

– Framing – Error Detection & Correction – Link sharing

mobile hosts

• Examples – Dialup, ADSL – Cable Modems – Wireless (WiFi) CS449/Fall06

15

Internet: Network of Networks local ISP

Tier 3 ISP Tier-2 ISP

local ISP

local local ISP ISP Tier-2 ISP

Tier 1 ISP

?

Tier 1 ISP Tier-2 ISP local local ISP ISP

NAP

Tier 1 ISP

Tier-2 ISP local ISP CS449/Fall06

Tier-2 ISP local ISP

16

ISP Topology

CS449/Fall06

17

Network Layer • Networking layer functions – Transport packets from sending to receiving hosts – Packet Switching vs. Circuit Switching application transport network data link physical

application transport network 2. Receive data data link physical

1. Send data

CS449/Fall06

18

Forwarding vs. Routing • Forwarding

Forwarding Table dest nhop F D

– How to send packet to

the next hop towards the destination

packet

• Routing – How to compute the next

Outgoing Links

Incoming Link

hops

• Routing algorithms

5

– Distance Vector (RIP) – Link State (OSPF)

A CS449/Fall06

2 1

B 2

D

3

C 3

1

5

F

1

E

2 19

Transport Layer • Packets get lost

application transport network data link

– Physical errors – Equipment failures – Congestion

physical

g lo

network data link

network data link

physical

t or sp an tr

– Deliver packets reliably – share resources among all network users

physical

d en den al ic

• Transport layer functions

network data link

physical network data link physical application transport network data link physical

CS449/Fall06

20

Reliable Transfer • How to recover from losses

Sender

Receiver 1

– Introduce ACKs – Timers – Stop-and-Wait

A:1

• Sender sends packet set timer • Receiver sends ACK • If no ACK received when timer expires sender retx

2 Timer Expires

CS449/Fall06

2 21

Reliable Transfer (2) • Stop-and-Wait has low Utilization • Pipelining – Senders allows multiple yet-to-be-acked packets (window)

• Two variants – Go-Back-N – Selective repeat

CS449/Fall06

Sender

Receiver

1 2 3 A:1 A:2 A:3

22

Congestion Control • Congestion – Too many sources sending too much data too fast for network to handle

• Results – Lost packets – Long delays

bottleneck router capacity R

• Solutions – End-to-End – Network assisted CS449/Fall06

23

Application Layer-HTTP • So far: data reliably transferred end-to-end • HTTP: hypertext transfer protocol • client/server model

selene

– client: browser that requests, receives, “displays” Web objects – server: Web server sends objects in response to requests

CS449/Fall06

HT TP r

HT TP r

equ est

esp ons e

st e u q

re P nse Server T o running HT esp r P T Apache Web HT server

24

Request/Response Timeline We enter URL www.google.com/index.html (contains text, reference 1a. HTTP client initiates TCP connection to HTTP server (process) at www.google.com

2. HTTP client sends HTTP request message (containing URL). Message indicates that client wants index.html time

to 1 jpeg image)

1b. HTTP server at host www.google.com waiting for TCP connection. “accepts” connection, notifying client

3. HTTP server receives request message, forms response message containing requested object, and sends response 25 CS449/Fall06

Request/Response Timeline (cont.)

5. HTTP client receives time

response message containing html file, displays html. Parsing html file, finds 1 referenced jpeg object

6. Steps 1-5 repeated for jpeg object

CS449/Fall06

26

HTTP Request Message HTTP request message: – ASCII (human-readable format) request line (GET, POST, HEAD commands)

GET /index.html HTTP/1.1 Host: www.google.com User-agent: Mozilla/4.0 header Connection: close lines Accept-language:fr

Carriage return, line feed indicates end of message

(extra carriage return, line feed)

CS449/Fall06

27

HTTP Response Message status line (protocol status code status phrase) header lines

data, e.g., requested HTML file

HTTP/1.1 200 OK Connection close Date: Tue, 04 Mar 2003 07:28:29 GMT Server: GWS/2.0 Content-Length: 2824 Content-Type: text/html data data data data data ...

CS449/Fall06

28

Naming: DNS • Translate from www.google.com to 216.239.51.101 • Domain Name System: – Distributed database implemented in hierarchy of many name servers – Application-layer protocol host, routers, name servers to communicate to resolve names (address/name translation)

CS449/Fall06

29

Name Servers • No server has all name-to-IP address mappings • Local name servers: – Each ISP, company has local (default) name server – Host DNS query first goes to local name server

• Authoritative name server: – For a host: stores that host’s IP address, name – Can perform name/address translation for that host’s name CS449/Fall06

30

DNS Example Root name server:

root name server

• may not know authoritative name server • may know intermediate name server: who to contact to find authoritative name server • Results are cached

2

6 7

local name server 128.220.13.50 1

8

3

4

5

authoritative name server ns1.google.com

requesting host selene.cs.jhu.edu CS449/Fall06

www.google.com

31