Sei sulla pagina 1di 19

Protocol Architecture

Layered Protocol Architectures


OSI Reference Model
TCP/IP Protocol Stack

Jrg 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.
Jrg Liebeherr, 1998,1999 CS457

1
Example: Subtasks of Communications

Example: The purchasing director of the Italian company


Vendetta, located in Milan, Italy, wants to ask the Sales
Director of the US company Crash, with headquarters in
Mobile, AL, about the price of the Ultimo 6000 Supercomputer
which is produced by Crash.
When we divide the described communication task into
subtasks 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

Jrg Liebeherr, 1998,1999 CS457

Example: Subtasks of Communications

Purchasing Director Sales Director


Quanta costa Milan Mobile How much for
lUltimo 6000? the Ultimo 6000?

Administrative Assistant:
Administrative Assistant:
Translates message
no action
and prepares a letter

Shipping Manager: Shipping Manager:


Packs shipment Geneva New Call Italy to
Assigns shipping number
Orleans confirm arrival of letter

Shipping Clerk: Shipping Clerk: Shipping Clerk: Shipping Clerk:


Determines route Determines route Determines route Determines route
of the shipment of the shipment of the shipment of the shipment

Mailroom Worker Mailroom Worker Mailroom Worker Mailroom Worker


Attaches label Attaches label Attaches label Attaches label
Loads mailbag Loads mailbag Loads mailbag Loads mailbag

Jrg Liebeherr, 1998,1999 CS457

2
Network Architecture

Protocol: A set of rules and conventions used for


communication 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 that


implement the exchange of information between computers

Jrg Liebeherr, 1998,1999 CS457

Layered Network Architecture

In a Layered Network Architecture, the services are


grouped 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


not layered layered

A B A B layer 3

C C layer 2

E D E D layer 1
Jrg Liebeherr, 1998,1999 CS457

3
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 service
below - to receive services
2. peer layer entity using a common protocol (Peer
Protocol)

Jrg 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

Jrg Liebeherr, 1998,1999 CS457

4
Layered Communications

N+1 Layer N+1 Layer Protocol N+1 Layer


N+1 Layer
Entity Entity
layer N+1/N
interface
N Layer N Layer Protocol N Layer
N Layer
Entity Entity
layer N/N-1
interface
N-1 Layer N-1 Layer Protocol N-1 Layer
N-1 Layer
Entity Entity

Note:
Layer interfaces define physical data flow.
Peer protocols describe exchange of logical messages
between peer layer entities
Jrg Liebeherr, 1998,1999 CS457

Service Access Points

A service user accesses services of the service provider at


Service Access Points (SAPs)
A SAP has an address that uniquely identifies where the
service can be accessed

Layer-N
N Layer
Entity

layer N/N-1 Layer


service interface N-1
SAP
N-1 Layer- N-1
Layer Entity

Jrg Liebeherr, 1998,1999 CS457

5
Exchange of Data

Assume a layer-N entity at A wants to send data to a layer-N


peer entity to B.
The unit of data send between peer entities is called a Protocol Data
Unit (PDU)
For now, let us think of a PDU as a single packet

A N Layer PDU N Layer B


Entity (at layer N) Entity

What actually happens: Layer N passes the PDU to one of As SAPs at


layer N-1.
The layer N-1 entity (at A) then constructs its own PDU which it sends to
the layer N-1 entity at B.
Note:1998,1999
Jrg Liebeherr, PDU at layer N-1 = HeaderCS457
+ PDU at layer N

Exchange of Data

A B
Layer-N When passed to the SAP, the PDU
Layer-N
Entity is called a Service Data Unit Entity
(SDU)
(Layer-N PDU = Layer- N-1 SDU)
control N PDU
SAPs

Layer- N-1 Layer- N-1


Entity Entity

Header
(of layer N-1)
N PDU
control N PDU

PDU of Layer-N-1

Jrg Liebeherr, 1998,1999 CS457

6
Service Primitives

Communication between adjacent layers is done via function


calls. The functions are called service primitives

Almost all communication is done with only four types of


service primitives:
nREQUEST: entity wants service provider to do work
nINDICATION: service provider informs entity about an
event
nRESPONSE: entity wants to respond to an event
nCONFIRM: response to an earlier request has come back

Jrg Liebeherr, 1998,1999 CS457

Service Primitives

Assume the name of a service is called X.

N+1 Layer N+1 Layer Protocol N+1 Layer


Entity Entity

X. Request X. Confirm X. Indication X. Response

N Layer N Layer
Entity Entity

Jrg Liebeherr, 1998,1999 CS457

7
Service Primitives

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


service provider

N+1 Layer N+1 Layer Protocol N+1 Layer


Entity Entity

X. Request X. Confirm X. Indication X. Response

Service Provider

Jrg Liebeherr, 1998,1999 CS457

Example: Sending a Letter

Bob sends a letter to Alice

Bob Logical flow of information Alice

Bobs Alices
mailbox mailbox

Postman
Jrg Liebeherr, 1998,1999 CS457

8
Putting the Example into our Context

Identify the entities? Bob, Alice, Postman


Identify layers? Layer 2: Bob, Alice
Layer 1: Postman
What is the service? Deliver_Letter (L)
Who is a service user? Bob and Alice
Who is a service provider? Postman
What are the SAPs? Mailboxes
What are the PDUs? Letter (at Layer 2)
Describe the peer protocol between The protocol is actually complicated: When
Bob sends a letter to Alice, the letter must identify Alice as the recipient.
Bob and Alice? The letter must be written in a language that Alice can read. Bob must be
able to write, and Alice must be able to read. Both need to know where their
respective mailboxes are, and they must be able to operate a mailbox, etc.

Letter is dropped off by Bob (L.Request);


Which service primitives are invoked Letter is delivered to Alices mailbox
? (L.Indicate)

Jrg 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

US Mail
L.Request L.Indicate

If Bob asks for a certificate of deliverywe would need: L.Request,


L.Indicate, L.Response, L.Confirm
The resulting service is called acknowledged service

L.Request L.Indicate

US Mail
L.Confirm L.Indicate

Jrg Liebeherr, 1998,1999 CS457

9
Protocol Architectures

There are only few protocol architectures that are relevant


today:
OSI Reference Model
Defined as a big effort in the 1970s by ISO to specify a
comprehensive 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 model
are 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
Jrg Liebeherr, 1998,1999 CS457

OSI Reference Model

In 1977 the International Standardization Organization (ISO) developed a


model for a layered network architecture
This effort was completed in 1983 and is known as the Open Systems
Interconnection (OSI) Reference Model
The OSI model defines seven layers:
Layer 7: Application Layer
Layer 6: Presentation Layer
Layer 5: Session Layer
Layer 4: Transport Layer
Layer 3: Network Layer
Layer 2: Data Link Layer
Layer 1: Physical Layer
(Layer 0: Interconnection Media)

Jrg Liebeherr, 1998,1999 CS457

10
OSI Layers

HOST HOST

Application Application

Application Application
Layer Layer

Presentation Presentation
Layer Layer

Session Session
Layer Layer

Transport NODE NODE Transport


Layer Layer

Network Network Network Network


Layer Layer Layer Layer

Data Link Data Link Data Link Data Link


Layer Layer Layer Layer

Physical Physical Physical Physical


Layer Layer Layer Layer

Jrg Liebeherr, 1998,1999 CS457

OSI Layers and Encapsulation

Application
Application Data Data Application
Header of
Application
Application Application
Layer
Layer AH Data Layer

Presentation Presentation
Layer
PH AH Data Layer

Session Session
Layer SH PH AH Data Layer

Transport Transport
Layer TH SH PH AH Data Layer

Network NH TH SH PH AH Data Network


Layer Layer

Data Link Data Link


Layer DH NH TH SH PH AH Data Layer

Physical Physical
Layer Bits Layer

Jrg Liebeherr, 1998,1999 CS457

11
OSI Model in a Switched Communication Network

Node (Router)

Network
Application
Data Link
Presentation
Physical
Network Session
Application
Network Data Link Transport
Presentation
Data Link Physical Network
Session
Physical Data Link
Transport
Physical
Network
Data Link Network
Physical Data Link
Physical

Station (Host)

Jrg Liebeherr, 1998,1999 CS457

A Tour of the OSI Layers

Physical Layer (Layer 1):


Service: Transmission of a raw bit stream over a
communication channel
Functions: Conversion of bits into electrical or optical signals
Examples: X.21, RS-232-C

Data Link Layer (Layer 2):


Service: Reliable transfer of frames over a link
Functions: synchronization, error Control, flow control
Examples: HDLC, CCITT LAP-D

Jrg Liebeherr, 1998,1999 CS457

12
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.

Jrg Liebeherr, 1998,1999 CS457

A Tour of the OSI Layers


Session Layer (Layer 5):
Service: Support the dialog between cooperating application
programs
Functions: Session establishment/management/termination,
Synchronization, Recovery
Examples: ISO session protocol, RPC
Presentation Layer (Layer 6):
Service: Provides freedom from compatibility problems
Functions: Virtual device support, syntax conversion,
encryption
Examples: ISO presentation protocol
Application Layer (Layer 7):
Service: Provides network access to application programs
Functions: Everything is application specific
Examples: File Transfer, Electronic Mail
Jrg Liebeherr, 1998,1999 CS457

13
TCP/IP Protocol Suite

The TCP/IP protocol suite


was first defined in 1974 Application
telnet, ftp, email
The TCP/IP protocol suite is Layer
the protocol architecture of
Transport
the Internet Layer
TCP, UDP
The TCP/IP suite has four
layers: Internet IP, ICMP, IGMP
Application, Transport,
Internet, and Network
Network
Interface Layer Device Drivers
Interface

Jrg Liebeherr, 1998,1999 CS457

Example: File Transfer

Host A Router Host B

FTP FTP
FTP protocol
program program

TCP TCP protocol TCP

IP IP protocol IP IP protocol IP

Ethernet Ethernet Ethernet Ethernet Ethernet Ethernet


Driver protocol Driver Driver protocol Driver

Jrg Liebeherr, 1998,1999 CS457

14
Encapsulation in the TCP/IP Suite

As data is moving down the protocol stack, each


protocol is adding layer-specific control information.
User data

Application
Application
Header User data
TCP
TCP Header Application data

IP TCP segment

IP Header TCP Header Application data


Ethernet
IP datagram
Driver
Ethernet Ethernet
Header
IP Header TCP Header Application data Trailer

Ethernet frame
Jrg 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
User User User User Application
Process Process Process Process Layer

TCP UDP Transport


Layer

ICMP IP IGMP Network


Layer

Hardware
ARP RARP Link Layer
Interface

Media
Jrg Liebeherr, 1998,1999 CS457

15
Comparison of OSI Model and TCP/IP Suite

OSI TCP/IP

Application

Presentation Application

Session
Transport
Transport

Network Internetwork
Network
Data Link Access

Physical Physical

Jrg Liebeherr, 1998,1999 CS457

The B-ISDN ATM Reference Model

ATM technology has its own protocol architecture

Control Plane User Plane

Upper Layer Upper Layer


End-to-end layer
ATM Adaptation Layer (AAL)
Transfer of Cells
ATM Layer
Same as in OSI
Physical Layer

Jrg Liebeherr, 1998,1999 CS457

16
Layers of ATM

ATM
Host A Host B
Switch

Upper Upper
Upper Layer Protocol
Layers Layers

AAL AAL Protocol AAL

ATM Layer l ATM Layer ATM Layer

Physical Physical Physical Physical


Layer Layer Layer Layer

Jrg Liebeherr, 1998,1999 CS457

ATM Layer

The ATM Layer is responsible for the transport of 53 cells


across an ATM network
The ATM Layer can provide a variety of services for cells
from 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
Jrg Liebeherr, 1998,1999 CS457

17
ATM Adaptation Layer (AAL)

AAL provides services which are between upper layers and


ATM layers.
An important service is the segmenation and reassembly of
upper layer data

Data Data

AAL segmentation AAL reassembly

Cells Cells
ATM Network

Jrg 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


Timing
information Required Not required
in data ?

Bit rate of data: Constant Variable

Mode of
connection
Connection-oriented Connectionless

AAL protocol to
be used AAL 1 AAL 2 AAL 3/4

AAL 5
Jrg Liebeherr, 1998,1999 CS457

18
ATM Services and AAL Protocols

CBR rt-VBR nrt-VBR ABR UBR

AAL 1 AAL 2 AAL 3/4 AAL 5

Jrg Liebeherr, 1998,1999 CS457

19

Potrebbero piacerti anche