Sie sind auf Seite 1von 34

Computer Networks

Chapter 1:Introduction
Computer Networking: A Top Down Approach ,
4th edition. Jim Kurose, Keith Ross

Last Lecture

Queuing Delay TCP/IP Protocol Stack

Todays Lecture

TCP/IP Protocol Stack Encapsulation Chapter 2 Application Layer

Internet Protocol Stack


To provide structure to design of network protocols, network designers organize protocols in layers Service says what a layer does Protocol says how the service is implemented Advantages Drawbacks When taken together the protocols of various layers are called the Protocol Stack. Internet Protocol Stack consists of Five layers Physical, Link, Network, Transport and Application layers . Organization of Book

Internet Protocol Stack


Application Layer:
Network applications and their application layer protocols reside. Provides user interfaces and support for services such as email, file transfer etc. Hyper Text Transfer Protocol (HTTP) File Transfer Protocol (FTP) Session Initiation Protocol (SIP) An application layer protocol is distributed over multiple end systems The packets of information at the application layer is called as a message.

Internet Protocol Stack


Transport Layer:
Transports application-layer messages between application end points. Transport layer packet is called as a segment Breaks long messages into shorter segments There are two Transport Layer Protocols Transmission Control Protocol (TCP)
Connection Oriented service Guaranteed delivery of application layer messages Flow control Congestion Control

User Datagram Protocol (UDP)


Connectionless service No reliability, flow control and congestion control

Internet Protocol Stack


Network Layer: Responsible for moving network layer packets known as datagrams from one host to another. Transport layer passes a transport layer segment and a destination address to the network layer. Network layer includes IP Protocol Defines the fields in the datagram as well as how end systems and routers act on these fields Different routing protocols. Determine the route that datagrams take between sources and destinations

Internet Protocol Stack


Link Layer: Moves a packet from one node (host or router) to the next node in the route. Divide the stream of bits received from the network layer into manageable data units called frames. Transforms a raw transmission facility to a reliable link. Mechanism to detect and retransmit damaged or lost frames Example of link layer protocols include WiFi, Ethernet etc.

Internet Protocol Stack


Physical Layer:
The job of this layer is to move the individual bits with in frames from one node to next. Representation of bits Physical Layer data consists of a stream of bits (0 or 1) To be transmitted bits must be encoded into signals. The physical layer defines the type of encoding. The protocol in this layer depend on the actual transmission medium of the link.

Internet Protocol Stack


Application: Provides user interfaces and support for services such as e-mail, file transfer etc.

FTP, HTTP

Application Transport

Transport: Transports application-layer messages between application end points.


Segmentation and reassembly TCP, UDP

Network: Routing of Datagrams from source to destination

Network
Link Physical

IP, routing protocols

Link: Move a packet from one node (host or


router) to the next node in the route. Ethernet, WiFi frames from one node to next

Physical: Move the individual bits with in

OSI Reference Model


In 1970 International Organization for

Standardization proposed a seven layered model called Open Systems Interconnection (OSI) model. Presentation Layer: Provide services such as data encryption, compression. Session Layer: Synchronization points (checkpointing) and recovery of data exchange. Internet stack missing these layers! these services, if needed, must be implemented in the application by the application developer.

source
message segment
Ht M M M M

frame Hl Hn Ht

datagram Hn Ht

application transport network link physical

Encapsulation

link physical switch

destination
M

Ht
Hn Ht Hl Hn Ht

M M M

application transport network link physical

Hn Ht Hl Hn Ht

M
M

network link physical

Hn Ht

router

Chapter 2 Application Layer


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

Chapter 2: Application layer


2.1 Principles of network applications

2.2 Web and HTTP


2.3 FTP 2.4 Electronic Mail
SMTP,

POP3, IMAP

2.5 DNS 2.6 P2P applications

Chapter 2: Application Layer


Our goals:
conceptual, learn about protocols

implementation aspects of network application protocols client-server paradigm peer-to-peer paradigm

by examining popular application-level protocols HTTP FTP SMTP / POP3 / IMAP DNS

Some Network Applications


E-mail

Web
Instant messaging Remote login P2P file sharing Multi-user network games Streaming stored video clips Voice over IP Real-time video conferencing Many more interesting applications

Creating a Network Application


write programs that run on (different) end systems communicate over network e.g., web server software communicates with browser software No need to write software for network-core devices Network-core devices do not run user applications Function at lower layers Basic design is to confine application software to the end systems Facilitate rapid network application development and deployment

application transport network data link physical

application transport network data link physical

application transport network data link physical

Application Architectures
Application Architecture is
Designed

by the application developer Dictates how the application is structured over various end systems
Two architectures used in modern day

Network Applications:
Client-Server

Architecture Peer-to-Peer (P2P) Architecture

Client-Server Architecture
Server: Always-on host permanent well defined IP address A single server is incapable of keeping up with all the requests of the clients. A cluster of hosts referred as server farm is often used. Clients: Communicate with server May have dynamic IP addresses Do not communicate directly with each other Client/Server architecture is infrastructure intensive Require service providers to install and maintain servers.

Client/Server

P2P Architecture
Direct communication

between pairs of intermittently connected hosts called peers Peers are not owned by any peer-peer service provider P2P

Peers communicate without passing through any dedicated server

e.g. Bit Torrent, eMule, Skype Security issues

Highly Distributive

Cost Effective Detailed study later on in the

chapter

What Transport Service does an Application need?


Data Loss Loss Tolerant Applications

Other apps (e.g., file transfer,

Some apps (e.g., audio, VoIP) can tolerate some loss 2% tolerable for VoIP

email) require 100% reliable data transfer Timing Application may require timing guarantee Tight timing constraints
multiplayer games, VoIP, teleconferencing. In Non-real time lower delays are preferred but no tight constraint on end-to-end delays.

Throughput Bandwidth sensitive applications (e.g., multimedia) require minimum amount of throughput Other apps (elastic apps) make use of whatever throughput they get e.g .Email, file transfer Security Encryption and decryption

Transport Service Requirements of Common Applications


Application file transfer e-mail Web documents real-time audio/video Data loss no loss no loss no loss loss-tolerant loss-tolerant loss-tolerant Throughput Time Sensitive no no no yes, 100s msec

stored audio/video interactive games

elastic elastic elastic audio: 5kbps-1Mbps video:10kbps-5Mbps same as above few kbps -10kbps

yes, few secs yes, 100s msec

Internet transport protocols services


TCP service:

UDP service:
unreliable data transfer

connection-oriented: setup

required between client and server processes reliable transport between sending and receiving process flow control: sender wont overwhelm receiver congestion control: throttle sender when network overloaded does not provide: timing, minimum throughput guarantees, security

between sending and receiving process does not provide: connection setup, reliability, flow control, security Throughput and timing guarantee not provided

Internet Applications: application, transport protocols


Application Application layer protocol SMTP [RFC 2821] Telnet [RFC 854] HTTP [RFC 2616] FTP [RFC 959] RTP [RFC 1889] Underlying transport protocol TCP TCP TCP TCP UDP UDP

e-mail remote terminal access Web file transfer streaming multimedia


Internet telephony

SIP, Skype

Application -layer Protocol Defines


Types of messages

exchanged,

e.g., request, response

Message syntax: what fields in messages

Message semantics meaning of information in fields


Rules for when and how

Public-domain protocols: defined in RFCs allows for interoperability e.g., HTTP, SMTP Proprietary protocols: e.g., Skype

processes send & respond to messages

Addressing processes
To receive messages,

process must have

To identify the receiving process

identifier

host device has unique 32-

bit IP address

Q: does IP address of host


on which process runs suffice for identifying the process?

A: No, many processes

can be running on same host

two pieces of information need to be specified: IP address of the host Port number Identifier that specifies the receiving process in the destination host Popular applications have been assigned a specific port number. Example port numbers: HTTP server: 80 Mail server: 25 www.iana.org (well known port numbers for all protocols) More in chapter 3

Hyper Text Transfer Protocol (HTTP)


HTTP defined in RFC 1945 and RFC 2616 HTTP implemented on both client and server sides

HTTP defines structure of messages exchanged between client and server. How the client and server exchange the messages Web browsers implement the client side of HTTP
Web Servers implement the server side of HTTP Host web objects each addressable by a URL Web page consists of objects Object can be HTML file, JPEG image, audio file Web pages consist of base HTML file and several

referenced objects Each object is addressable by a URL

HTTP overview
HTTP: hypertext transfer protocol
Webs application layer

protocol client/server model client: browser that requests, receives, displays Web objects server: Web server sends objects in response to requests

PC running Explorer

Server running Apache Web server

Linux running Firefox

HTTP overview (continued)


Uses TCP: Client initiates TCP connection 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 loss HTTP is stateless Server maintains no information about past client requests

HTTP connections
Nonpersistent HTTP At most one object is sent over a TCP connection. Persistent HTTP Multiple objects can be sent over single TCP connection between client and server.

Nonpersistent HTTP
(contains text, Suppose user enters URL references to 10 www.someSchool.edu/someDepartment/home.index jpeg images)

1a. HTTP client initiates TCP

connection to HTTP server (process) at www.someSchool.edu on port 80

1b. HTTP server at host


www.someSchool.edu waiting for TCP connection at port 80. accepts connection, notifying client

2. HTTP client sends HTTP


request message (containing URL) into TCP connection socket. Message indicates that client wants object someDepartment/home.index
time

3. HTTP server receives request


message, forms response message containing requested object, and sends message to the client

Nonpersistent HTTP (cont.)


4. HTTP server closes TCP 5. HTTP client receives response
message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects
connection.

time

6. Steps 1-4 repeated for each


of 10 jpeg objects

When the user requests the webpage 11 TCP connections are generated

Non-Persistent HTTP: Response time


Definition of RTT: time for a packet to travel from client to server and back. Response time: one RTT to initiate TCP connection one RTT for HTTP request response
total = 2RTT+transmit

initiate TCP connection

RTT
request file RTT file received time time to transmit file

time

time

Persistent HTTP
Nonpersistent HTTP issues: Requires 2 RTTs per object Maintain TCP buffers in both client and server Burden on the Web Server High overhead Persistent HTTP Server leaves TCP connection open after sending response Subsequent HTTP messages between same client/server sent over open connection Default mode is Persistent with pipelining

Das könnte Ihnen auch gefallen