19
1 © Jörg Liebeherr, 1998,1999 CS457 Protocol Architecture Layered Protocol Architectures OSI Reference Model TCP/IP Protocol Stack © Jörg Liebeherr, 1998,1999 CS457 Need for Protocols The task of exchanging information between devices requires a high degree of cooperation between the involved parties can be quite complex Protocols are a set of rules and conventions. By enforcing that communicating parties adhere to a common protocol, communication is made possible. The complexity of the communication task is reduced by dividing it into subtasks: Each subtask is implemented independently. Each subtask provides a service to another subtask.

Protocol Architecture Need for Protocols

  • Upload
    vudang

  • View
    236

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Protocol Architecture Need for Protocols

1

© Jörg Liebeherr, 1998,1999 CS457

Protocol Architecture

Layered Protocol ArchitecturesOSI Reference ModelTCP/IP Protocol Stack

© Jörg Liebeherr, 1998,1999 CS457

Need for Protocols

• The task of exchanging information between devices– requires a high degree of cooperation between the involved

parties– can be quite complex

• Protocols are a set of rules and conventions. By enforcing thatcommunicating parties adhere to a common protocol,communication is made possible.

• The complexity of the communication task is reduced by dividing itinto subtasks:– Each subtask is implemented independently.– Each subtask provides a service to another subtask.

Page 2: Protocol Architecture Need for Protocols

2

© Jörg Liebeherr, 1998,1999 CS457

Example: Subtasks of Communications

• Example: The purchasing director of the Italian company“Vendetta”, located in Milan, Italy, wants to ask the SalesDirector of the US company “Crash”, with headquarters inMobile, AL, about the price of the Ultimo 6000 Supercomputerwhich is produced by Crash.

• When we divide the described communication task intosubtasks we see that:– Separate entities in a company perform certain subtasks– Company entities provide services to other entities– An entity responsible for a certain subtask performs the

task by following a protocol

© Jörg Liebeherr, 1998,1999 CS457

Example: Subtasks of Communications

Mailroom WorkerAttaches labelLoads mailbag

Shipping Clerk:Determines route of the shipment

Shipping Manager:Packs shipment

Assigns shipping number

Administrative Assistant:Translates message and prepares a letter

Purchasing Director“Quanta costa

l’Ultimo 6000?”

Mailroom WorkerAttaches labelLoads mailbag

Shipping Clerk:Determines route

of the shipment

Mailroom WorkerAttaches labelLoads mailbag

Shipping Clerk:Determines route

of the shipment

Shipping Manager:Call Italy to

confirm arrival of letter

Administrative Assistant:no action

Sales Director“How much for

the Ultimo 6000?””

Mailroom WorkerAttaches labelLoads mailbag

Shipping Clerk:Determines route

of the shipment

Milan Mobile

Geneva New Orleans

Page 3: Protocol Architecture Need for Protocols

3

© Jörg Liebeherr, 1998,1999 CS457

Network Architecture

• Protocol: A set of rules and conventions used forcommunication of entities in different systems– System: Object that contains several entities

(e.g., the company).

– Entity: Anything capable of sending or receiving information(e.g, the secretary in a company)

• A Network Architecture is a structured set of protocols thatimplement the exchange of information between computers

© Jörg Liebeherr, 1998,1999 CS457

Layered Network Architecture

• In a Layered Network Architecture, the services aregrouped in a hierarchy of layers.– An entity of layer N uses only services of layer N-1.– An entity of layer N provides services only to layer N+1.

• Example: Network Architecture

A

C

E

B

D E

B layer 3

layer 2

layer 1

not layered layered

A

C

D

Page 4: Protocol Architecture Need for Protocols

4

© Jörg Liebeherr, 1998,1999 CS457

Layered Communications

• Each entity of a system is assigned to a layer

• An entity of a particular layer can only communicate with:1. adjacent layer entities via Service Interfaces

above - to provide servicebelow - to receive services

2. peer layer entity using a common protocol (PeerProtocol)

© Jörg Liebeherr, 1998,1999 CS457

Layered Communications

• A communication layer is completely defined by(a) The peer protocol between peer entities at the same

layer(b) The service interface used to offer/provide

services between adjacent layers

• Note: When talking about two adjacent layers,(a) the higher layer is a service user, and(b) the lower layer is a service provider

Page 5: Protocol Architecture Need for Protocols

5

© Jörg Liebeherr, 1998,1999 CS457

Layered Communications

N+1 LayerEntity

N+1 LayerEntity

N+1 Layer ProtocolN+1 Layer

N-1 LayerEntity

N-1 LayerEntity

N-1 Layer ProtocolN-1 Layer

N LayerEntity

N LayerEntity

N Layer ProtocolN Layer

layer N+1/Ninterface

layer N/N-1interface

Note:• Layer interfaces define physical data flow.• Peer protocols describe exchange of logical messagesbetween peer layer entities

© Jörg Liebeherr, 1998,1999 CS457

Service Access Points

• A service user accesses services of the service provider atService Access Points (SAPs)

• A SAP has an address that uniquely identifies where theservice can be accessed

Layer-NEntityN Layer

Layer- N-1Entity

N-1Layer

layer N/N-1service interface

LayerN-1SAP

Page 6: Protocol Architecture Need for Protocols

6

© Jörg Liebeherr, 1998,1999 CS457

Exchange of Data

• Assume a layer-N entity at A wants to send data to a layer-Npeer entity to B.

• The unit of data send between peer entities is called a Protocol DataUnit (PDU)

• For now, let us think of a PDU as a single packet

• What actually happens: Layer N passes the PDU to one of A’s SAPs atlayer N-1.

• The layer N-1 entity (at A) then constructs its own PDU which it sends tothe layer N-1 entity at B.

• Note: PDU at layer N-1 = Header + PDU at layer N

N LayerEntity

PDU(at layer N)

N LayerEntity

A B

© Jörg Liebeherr, 1998,1999 CS457

Exchange of Data

Layer-NEntity

N PDU

Layer- N-1Entity

When passed to the SAP, the PDUis called a Service Data Unit(SDU)(Layer-N PDU = Layer- N-1 SDU)

SAPs

control

N PDUcontrolHeader

(of layer N-1) N PDU

PDU of Layer-N-1

Layer-NEntity

Layer- N-1Entity

A B

Page 7: Protocol Architecture Need for Protocols

7

© Jörg Liebeherr, 1998,1999 CS457

Service Primitives

• Communication between adjacent layers is done via functioncalls. The functions are called service primitives

• Almost all communication is done with only four types ofservice primitives:nREQUEST: entity wants service provider to do worknINDICATION: service provider informs entity about an

eventnRESPONSE: entity wants to respond to an eventnCONFIRM: response to an earlier request has come back

© Jörg Liebeherr, 1998,1999 CS457

Service Primitives

N+1 LayerEntity

N+1 LayerEntity

N LayerEntity

N LayerEntity

N+1 Layer Protocol

X. Request X. Indication X. ResponseX. Confirm

Assume the name of a service is called “X”.

Page 8: Protocol Architecture Need for Protocols

8

© Jörg Liebeherr, 1998,1999 CS457

Service Primitives

Recall: A layer N+1 entity sees the lower layers only as aservice provider

N+1 LayerEntity

N+1 LayerEntity

N+1 Layer Protocol

X. Request X. IndicationX. Confirm

Service Provider

X. Response

© Jörg Liebeherr, 1998,1999 CS457

Example: Sending a Letter

• Bob sends a letter to Alice

Bob’smailbox

Bob Alice

Alice’smailbox

Postman

Logical flow of information

Page 9: Protocol Architecture Need for Protocols

9

© Jörg Liebeherr, 1998,1999 CS457

Putting the Example into our Context

• Identify the entities?• Identify layers?

• What is the service?• Who is a service user?• Who is a service provider?• What are the SAPs?• What are the PDUs?• Describe the peer protocol between

Bob and Alice?

• Which service primitives are invoked?

• Bob, Alice, Postman• Layer 2: Bob, Alice

Layer 1: Postman• Deliver_Letter (“L”)• Bob and Alice• Postman• Mailboxes• Letter (at Layer 2)• The protocol is actually complicated: When

Bob sends a letter to Alice, the letter must identify Alice as the recipient.The letter must be written in a language that Alice can read. Bob must beable to write, and Alice must be able to read. Both need to know where theirrespective mailboxes are, and they must be able to operate a mailbox, etc.

• Letter is dropped off by Bob (L.Request);Letter is delivered to Alice’s mailbox(L.Indicate)

© Jörg Liebeherr, 1998,1999 CS457

(Un-)Acknowledged Service

• The example showed only two service primitives:L.Request , L.Indicate

• A service which uses these two primitives is called unconfirmed service

• If Bob asks for a “certificate of delivery” we would need: L.Request,L.Indicate, L.Response, L.Confirm

• The resulting service is called acknowledged service

US Mail

L.Request L.Indicate

L.IndicateL.Confirm

US Mail

L.Request L.Indicate

Page 10: Protocol Architecture Need for Protocols

10

© Jörg Liebeherr, 1998,1999 CS457

Protocol Architectures

• There are only few protocol architectures that are relevanttoday:– OSI Reference Model

• Defined as a big effort in the 1970’s by ISO to specify acomprehensive set of protocols for networking.

• The effort failed, in that the defined protocols are not widely used.However, the concepts and terminology defined in the OSI modelare the lingua franca of many networkers

– TCP/IP Protocols Suite• The Internet protocol architecture is not the result of a design effort,

but has evolved over several decades

– ATM Protocol Stack• An example that protocols can be designed by a committee. Future

relevance will depend on the success of ATM

© Jörg Liebeherr, 1998,1999 CS457

OSI Reference Model

• In 1977 the International Standardization Organization (ISO) developed amodel for a layered network architecture

• This effort was completed in 1983 and is known as the Open SystemsInterconnection (OSI) Reference Model

• The OSI model defines seven layers:

Layer 7: Application LayerLayer 6: Presentation LayerLayer 5: Session LayerLayer 4: Transport LayerLayer 3: Network LayerLayer 2: Data Link LayerLayer 1: Physical Layer(Layer 0: Interconnection Media)

Page 11: Protocol Architecture Need for Protocols

11

© Jörg Liebeherr, 1998,1999 CS457

OSI Layers

PhysicalLayer

PhysicalLayer

PhysicalLayer

PhysicalLayer

Data LinkLayer

Data LinkLayer

Data LinkLayer

Data LinkLayer

NetworkLayer

SessionLayer

SessionLayer

TransportLayer

TransportLayer

ApplicationLayer

ApplicationLayer

PresentationLayer

PresentationLayer

NetworkLayer

NetworkLayer

NetworkLayer

Application

HOST

NODE

HOST

NODE

Application

© Jörg Liebeherr, 1998,1999 CS457

OSI Layers and Encapsulation

PhysicalLayer

PhysicalLayer

Data LinkLayer

Data LinkLayer

NetworkLayer

SessionLayer

SessionLayer

TransportLayer

TransportLayer

ApplicationLayer

ApplicationLayer

PresentationLayer

PresentationLayer

NetworkLayer

Application Application

AH

PH

SH

TH

NH

DH

Bits

Data

AH Data

PH AH Data

SH PH AH Data

TH SH PH AH Data

NH TH SH PH AH Data

DataApplication

DataHeader of

ApplicationLayer

Page 12: Protocol Architecture Need for Protocols

12

© Jörg Liebeherr, 1998,1999 CS457

OSI Model in a Switched Communication Network

TransportSession

Presentation

ApplicationTransportSession

Presentation

Application

PhysicalData LinkNetwork

PhysicalData LinkNetwork

PhysicalData LinkNetwork

PhysicalData LinkNetwork

PhysicalData LinkNetwork

PhysicalData LinkNetwork

Station (Host)

Node (Router)

© Jörg Liebeherr, 1998,1999 CS457

A Tour of the OSI Layers

• Physical Layer (Layer 1):Service: Transmission of a raw bit stream over a

communication channelFunctions: Conversion of bits into electrical or optical signalsExamples: X.21, RS-232-C

• Data Link Layer (Layer 2):Service: Reliable transfer of frames over a linkFunctions: synchronization, error Control, flow controlExamples: HDLC, CCITT LAP-D

Page 13: Protocol Architecture Need for Protocols

13

© Jörg Liebeherr, 1998,1999 CS457

A Tour of the OSI Layers

• Network Layer (Layer 3):Service: Moves packets inside the network.Functions: Routing, Addressing, Switching, Congestion Control.Examples: IP, X.25, CLNP.

• Transport Layer (Layer 4):Service: Controls delivery of data between hosts.Functions: Connection establishment/management/termination,

Error Control, Flow Control, Multiplexing.Examples: TCP, UDP, ISO TP0 - TP4.

© Jörg Liebeherr, 1998,1999 CS457

A Tour of the OSI Layers

• Session Layer (Layer 5):Service: Support the dialog between cooperating application

programsFunctions: Session establishment/management/termination,

Synchronization, RecoveryExamples: ISO session protocol, RPC

• Presentation Layer (Layer 6):Service: Provides freedom from compatibility problemsFunctions: Virtual device support, syntax conversion,

encryptionExamples: ISO presentation protocol

• Application Layer (Layer 7):Service: Provides network access to application programsFunctions: Everything is application specificExamples: File Transfer, Electronic Mail

Page 14: Protocol Architecture Need for Protocols

14

© Jörg Liebeherr, 1998,1999 CS457

TCP/IP Protocol Suite

• The TCP/IP protocol suitewas first defined in 1974

• The TCP/IP protocol suite isthe protocol architecture ofthe Internet

• The TCP/IP suite has fourlayers:Application, Transport,Internet, and NetworkInterface Layer

ApplicationLayer

TransportLayer

Internet

NetworkInterface

telnet, ftp, email

TCP, UDP

IP, ICMP, IGMP

Device Drivers

© Jörg Liebeherr, 1998,1999 CS457

Example: File Transfer

FTPprogram

TCP

IP

EthernetDriver

EthernetDriver

EthernetDriver

IP

FTPprogram

TCP

IP

EthernetDriver

FTP protocol

TCP protocol

IP protocol IP protocol

Ethernetprotocol

Ethernetprotocol

Host A Router Host B

Page 15: Protocol Architecture Need for Protocols

15

© Jörg Liebeherr, 1998,1999 CS457

Encapsulation in the TCP/IP Suite

Application

TCP

IP

EthernetDriver

User data

User dataApplicationHeader

Application dataTCP Header

Application dataTCP HeaderIP Header

Application dataTCP HeaderIP HeaderEthernetHeader

EthernetTrailer

IP datagram

TCP segment

Ethernet frame

• As data is moving down the protocol stack, eachprotocol is adding layer-specific control information.

© Jörg Liebeherr, 1998,1999 CS457

TCP/IP Protocol Suite

• The complete TCP/IP protocol suite contains many pro-tocols. The following graph is far from complete

ApplicationLayer

NetworkLayer

Link Layer

IP

ARP HardwareInterface RARP

Media

ICMP IGMP

TransportLayer

TCP UDP

UserProcess

UserProcess

UserProcess

UserProcess

Page 16: Protocol Architecture Need for Protocols

16

© Jörg Liebeherr, 1998,1999 CS457

Comparison of OSI Model and TCP/IP Suite

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Transport

Internetwork

NetworkAccess

Physical

OSI TCP/IP

© Jörg Liebeherr, 1998,1999 CS457

The B-ISDN ATM Reference Model

• ATM technology has its own protocol architecture

Physical Layer

ATM Layer

ATM Adaptation Layer (AAL)

Upper Layer Upper Layer

Control Plane User Plane

Same as in OSI

Transfer of Cells

End-to-end layer

Page 17: Protocol Architecture Need for Protocols

17

© Jörg Liebeherr, 1998,1999 CS457

Layers of ATM

AAL

ATM Layer

PhysicalLayer

PhysicalLayer

PhysicalLayer

ATM Layer

AAL

ATM Layer

PhysicalLayer

AAL Protocol

l

UpperLayers

UpperLayersUpper Layer Protocol

Host A ATM Switch Host B

© Jörg Liebeherr, 1998,1999 CS457

ATM Layer

• The ATM Layer is responsible for the transport of 53 cellsacross an ATM network

• The ATM Layer can provide a variety of services for cellsfrom an ATM virtual connection:

• Constant Bit Rate (CBR)– guarantees a fixed capacity, similar to circuit switching– guarantees a maximum delay for cells

• Variable Bit Rate (VBR)– guarantees an average throughput– can guarantee maximum delay

• Available Bit Rate (ABR)– guarantees ‘fairness” with respect to other traffic

• Unspecified Bit Rate (UBR)– service is on a “best effort” basis

Page 18: Protocol Architecture Need for Protocols

18

© Jörg Liebeherr, 1998,1999 CS457

ATM Adaptation Layer (AAL)

• AAL provides services which are between upper layers andATM layers.

• An important service is the segmenation and reassembly ofupper layer data

Data

AAL

Data

AAL

Cells CellsATM Network

segmentation reassembly

© Jörg Liebeherr, 1998,1999 CS457

AAL Service Classification

• AAL has 4 different protocols: AAL 1, AAL 2, AAL 3/4, AAL 5• Each protocol provides a different service

Class A Class B Class C Class D

Required Not required

Constant Variable

ConnectionlessConnection-oriented

Timing information in data ?

Bit rate of data:

Mode of connection

AAL protocol tobe used AAL 1 AAL 2 AAL 3/4

AAL 5

Page 19: Protocol Architecture Need for Protocols

19

© Jörg Liebeherr, 1998,1999 CS457

ATM Services and AAL Protocols

CBR rt-VBR nrt-VBR ABR UBR

AAL 1 AAL 2 AAL 3/4 AAL 5