Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction 1-1 03 - Protocol Layers. Introduction 1-2 Chapter 1 Introduction Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition.

Similar presentations


Presentation on theme: "Introduction 1-1 03 - Protocol Layers. Introduction 1-2 Chapter 1 Introduction Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition."— Presentation transcript:

1 Introduction 1-1 03 - Protocol Layers

2 Introduction 1-2 Chapter 1 Introduction Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004. A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following:  If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!)  If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright 1996-2004 J.F Kurose and K.W. Ross, All Rights Reserved

3 Introduction 1-3 Protocol “Layers” Networks are complex!  many “pieces”: m hosts m routers m links of various media m applications m protocols m hardware, software Questions: Is there any hope of organizing structure of network? Or at least our discussion of networks?

4 Introduction 1-4 Organization of air travel : a layered view Layers: each layer implements a service m via its own internal-layer actions m relying on services provided by layer below ticket (purchase) baggage (check) gates (load) runway takeoff airplane routing ticket (complain) baggage (claim) gates (unload) runway landing airplane routing

5 Introduction 1-5 Distributed implementation of layer functionality ticket (purchase) baggage (check) gates (load) runway takeoff airplane routing ticket (complain) baggage (claim) gates (unload) runway landing airplane routing Departing airport arriving airport intermediate air traffic sites airplane routing

6 Introduction 1-6 Why layering? Dealing with complex systems:  explicit structure allows identification, relationship of complex system’s pieces m layered reference model for discussion  modularization eases maintenance, updating of system m change of implementation of layer’s service transparent to rest of system m e.g., change in gate procedure doesn’t affect rest of system

7 Introduction 1-7 Internet protocol stack  application: supporting network applications m FTP, SMTP  transport: process-process data transfer  network: routing of datagrams from source host to destination host m IP, routing protocols  link: data transfer between neighboring network elements m PPP, Ethernet  physical: bits “on the wire” application transport network link physical 5 4 3 2 1

8 Introduction 1-8 Layering: logical communication application transport network link physical application transport network link physical application transport network link physical application transport network link physical network link physical Each layer:  distributed  “entities” implement layer functions at each node  entities perform actions, exchange messages with peers

9 Introduction 1-9 Layering: logical communication application transport network link physical application transport network link physical application transport network link physical application transport network link physical network link physical data E.g.: transport  take data from app  add addressing, reliability check info to form “datagram”  send datagram to peer  wait for peer to ack receipt data transport ack

10 Introduction 1-10 Layering: physical communication application transport network link physical application transport network link physical application transport network link physical application transport network link physical network link physical data

11 Introduction 1-11 Protocol layering and data Each layer takes data from above  adds header information to create new Protocol Data Unit (PDU) – may also break into smaller segments  passes new data unit to layer below application transport network link physical application transport network link physical source destination M M M M H t H t H n H t H n H l M M M M H t H t H n H t H n H l message segment datagram frame

12 Introduction 1-12 Chapter 1: Summary Covered a “ton” of material!  Internet overview  what’s a protocol?  network edge, core, access network m packet-switching versus circuit-switching  Internet/ISP structure  performance: loss, delay  layering and service models You now have:  context, overview, “feel” of networking  more depth, detail to follow!

13 2: Application Layer 13 World Wide Web (WWW)

14 2: Application Layer 14 Processes communicating across network  process sends/receives messages to/from its socket  socket analogous to door m sending process shoves message out door m sending process assumes transport infrastructure on other side of door will deliver message to socket at receiving process process TCP with buffers, variables socket host or server process TCP with buffers, variables socket host or server Internet controlled by OS controlled by app developer

15 2: Application Layer 15 Addressing processes:  For a process to receive messages, it must have an identifier  Every host has a unique 32-bit IP address  Q: Does the IP address of the host on which the process runs suffice for identifying the process?  Answer: No, many processes can be running on same host  Identifier includes both the IP address and port numbers associated with the process on the host.  Example port numbers: m HTTP server: 80 m Mail server: 25  More on this later

16 2: Application Layer 16 What transport service does an app need? Data loss  some apps (e.g., audio) can tolerate some loss  other apps (e.g., file transfer, telnet) require 100% reliable data transfer Timing  some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” Bandwidth rsome apps (e.g., multimedia) require minimum amount of bandwidth to be “effective” rother apps (“elastic apps”) make use of whatever bandwidth they get

17 2: Application Layer 17 Internet transport protocols services TCP service:  connection-oriented: setup required between client and server processes  reliable transport between sending and receiving process  flow control: sender won’t overwhelm receiver  congestion control: throttle sender when network overloaded  does not provide: timing, minimum bandwidth guarantees UDP service:  unreliable data transfer between sending and receiving process  does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee  No setup required.

18 2: Application Layer 18 Web and HTTP First some jargon  Web page consists of objects  Object can be HTML file, JPEG image, Java applet, audio file,…  Web page consists of base HTML-file which includes several referenced objects  Each object is addressable by a URL  Example URL: www.someschool.edu/someDept/pic.gif host name path name

19 2: Application Layer 19 HTTP overview HTTP: HyperText Transfer Protocol  Web’s application layer protocol  client/server model m client: browser that requests, receives, “displays” Web objects m server: Web server sends objects in response to requests  HTTP 1.0: RFC 1945  HTTP 1.1: RFC 2068 *NetCraft's Web Server SurveyNetCraft's Web Server Survey PC running Explorer Server running Apache Web server* Mac running Navigator HTTP request HTTP response

20 2: Application Layer 20 HTTP overview (continued) Uses 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)  TCP connection closed HTTP is “stateless”  server maintains no information about past client requests Protocols that maintain “state” are complex! rpast history (state) must be maintained rif server/client crashes, their views of “state” may be inconsistent, must be reconciled aside

21 2: Application Layer 21 HTTP connections Nonpersistent HTTP  At most one object is sent over a TCP connection.  HTTP/1.0 uses nonpersistent HTTP Persistent HTTP  Multiple objects can be sent over single TCP connection between client and server.  HTTP/1.1 uses persistent connections in default mode

22 2: Application Layer 22 Nonpersistent HTTP Suppose user enters URL www.someSchool.edu/someDepartment/home.index 1a. HTTP client initiates TCP connection to HTTP server (process) at www.someSchool.edu on port 80 2. HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object someDepartment/home.index 1b. HTTP server at host www.someSchool.edu waiting for TCP connection at port 80. “accepts” connection, notifying client 3. HTTP server receives request message, forms response message containing requested object, and sends message into its socket time (contains text, references to 10 jpeg images)

23 2: Application Layer 23 Nonpersistent HTTP (cont.) 5. HTTP client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects 6. Steps 1-5 repeated for each of 10 jpeg objects 4. HTTP server closes TCP connection. time

24 2: Application Layer 24 Response time modeling Definition of Round Trip Time (RTT): time to send a small packet to travel from client to server and back. Response time:  one RTT to initiate TCP connection  one RTT for HTTP request and first few bytes of HTTP response to return  file transmission time total = 2RTT+transmit time time to transmit file initiate TCP connection RTT request file RTT file received time

25 2: Application Layer 25 Persistent HTTP Nonpersistent HTTP issues:  requires 2 RTTs per object  browsers often open parallel TCP connections to fetch referenced objects  server must maintain a separate connection for each object Persistent HTTP  server leaves connection open after sending response  subsequent HTTP messages between same client/server are sent over connection Persistent without pipelining:  client issues new request only when previous response has been received  one RTT for each referenced object Persistent with pipelining:  default in HTTP/1.1  client sends requests as soon as it encounters a referenced object  as little as one RTT for all the referenced objects

26 2: Application Layer 26 HTTP request message  two types of HTTP messages: request, response  HTTP request message: m ASCII (human-readable format) GET /somedir/page.html HTTP/1.1 Host: www.someschool.edu User-agent: Mozilla/4.0 Connection: close Accept-language:fr (extra carriage return, line feed) request line (GET, POST, HEAD commands) header lines Carriage return, line feed indicates end of message

27 2: Application Layer 27 HTTP request message: general format

28 2: Application Layer 28 Uploading form input Post method:  Web page often includes form input  Input is uploaded to server in entity body URL method:  Uses GET method  Input is uploaded in URL field of request line: www.somesite.com/animalsearch?monkeys&banana

29 2: Application Layer 29 Method types HTTP/1.0  GET  POST  HEAD m asks server to leave requested object out of response HTTP/1.1  GET, POST, HEAD  PUT m uploads file in entity body to path specified in URL field  DELETE m deletes file specified in the URL field

30 2: Application Layer 30 HTTP response message HTTP/1.1 200 OK Connection: close Date: Thu, 06 Aug 1998 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... status line (protocol status code status phrase) header lines data, e.g., requested HTML file

31 2: Application Layer 31 HTTP response status codes 200 OK m request succeeded, requested object later in this message 301 Moved Permanently m requested object moved, new location specified later in this message (Location:) 400 Bad Request m request message not understood by server 404 Not Found m requested document not found on this server 505 HTTP Version Not Supported In first line in server->client response message. A few sample codes:

32 2: Application Layer 32 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.rose-hulman.edu. Anything typed in sent to port 80 at www.rose-hulman.edu telnet www.google.com 80 2. Type in a GET HTTP request: GET /index.html HTTP/1.1 By typing this in (hit carriage return twice), you send this minimal (but complete) GET request to HTTP server 3. Look at response message sent by HTTP server!


Download ppt "Introduction 1-1 03 - Protocol Layers. Introduction 1-2 Chapter 1 Introduction Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition."

Similar presentations


Ads by Google