Protocol Layering

warmersafternoonNetworking and Communications

Oct 23, 2013 (3 years and 7 months ago)

56 views

Protocol Layering

Chapter 11: Protocol Layering
.

D.E.Comer.
“Internetworking with TCP/IP:
Principles, Protocols and Architecture
”,
Vol. 1, Prentice Hall, 2000

Presented by Wuilbert Jaramillo


2

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline


Part 1


Network problems, protocol and layering concepts


Need for protocols and layering


Part 2


ISO/OSI and TCP/IP models


Comparison


Common points


Final remarks


3

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 1


Existing problems in communication networks


Protocol
-
definition


The need for protocols


Set of protocols: Layering


What is Layering?


Why Layering?


4

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 2


Example: ISO/OSI 7
-
layer model


TCP/IP 5 layer reference model


ISO/OSI vs. TCP/IP


Common points in layering


Summary


5

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Existing Problems in
Communication Networks


Hardware failure


Hosts, routers


Network congestion


Networks have finite capacity


Packet delay


Data corruption


Electric, magnetic interferences


HW failure


Data duplication



6

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Complexity of networks

Networks are complex !!!



Parts of a network:


Hosts


Routers


Media


Applications


Hardware


Software


Different OS


Different protocols


Is there a Solution?



Organize all the
elements under a same
agreement


Better yet, use a
divide
and conquer

approach


Result: the concept of a
communications
protocol



7

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 1


Existing problems in communication networks


Protocol
-
definition


The need for protocols


Set of protocols: Layering


What is Layering?


Why Layering?


8

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Some definitions for Protocol


an original draft, minute, or record of a
document or transactio
n


a code prescribing strict adherence to correct
etiquette and precedence (as in diplomatic
exchange and in the military services)


a set of conventions governing the treatment
and especially the formatting of data in an
electronic communications system


9

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Protocol


Agreement about communication


Specifies


Format of messages


Meaning of messages


Rules for exchange


Procedures for handling problems


Protocols allow to specify or understand
communication without knowing the details of a
particular hardware


10

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 1


Existing problems in communication networks


Protocol
-
definition


The need for protocols


Set of protocols: Layering


What is Layering?


Why Layering?


11

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Need for Protocols


Hardware is low level


Many problems can occur


Bits corrupted or destroyed


Entire packet lost


Packet duplicated


Packets delivered out of order


12

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Need for Protocols

(continued)


Need mechanisms to distinguish among


Multiple computers on a network


Multiple applications on a computer


Multiple copies of a single application on a computer


Different Operating Systems (OS)


13

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 1


Existing problems in communication networks


Protocol
-
definition


The need for protocols


Set of protocols: Layering


What is Layering?


Why Layering?


14

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Set of Protocols


Work together


Each protocol solves part of a communication
problem


Known as


Protocol suite


Protocol family


Designed in layers


15

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Plan for Protocol Design


Intended for protocol designers


Divides protocols into layers


Each layer is devoted to one sub
-
problem



16

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 1


Existing problems in communication networks


Protocol
-
definition


The need for protocols


Set of protocols: Layering


What is Layering?


Why Layering?


17

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

What is layering?


A technique to organize a network system into
a
succession

of logically distinct entities, such
that the service provided by one entity is solely
based on the
service

provided by the previous
entity.


18

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Conceptual Layers of Protocol
Software

Layer n



Layer 2

Layer 1

Layer n



Layer 2

Layer 1

Sender

Receiver

Network

The modules of
Protocol SW are
on each machine
stacked vertically
into layers


19

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Conceptual/Realistic view

High Level

Protocol Layer

Internet

Protocol Layer

Network

Interface Layer

Conceptual Layers

Software Organization

Protocol 1

Protocol 2

Protocol 3

Interface 1

Interface 2

Interface3

IP Module


20

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Example: Internet Protocol Layers


Five layers


Application
: supporting
network applications


ftp, smtp, http


Transport
: host
-
host data
transfer


tcp, udp


Network:

routing of a
datagram from source to
destination


ip,routing protocols


Link
: data transfer between
neighboring network
elements


ppp, ethernet


Physical
: bits “on the wire”

Application

Transport

Network

Link

Physical


21

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Protocol Layering and Data

Application

Transport

Network

Link

Physical

M

M

H

M

H

H

M

H

H

H

Message

Segment

Datagram

Frame


22

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Layers and packet headers


Each layer


Appends header to outgoing packet


Removes header from incoming packet



Receiver uses header as
demultiplexing key


Sender
Multiplexes

among several layers

M

H

H

H


23

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 1


Existing problems in communication networks


Protocol
-
definition


The need for protocols


Set of protocols: Layering


What is Layering?


Why Layering?


24

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Why layering?


Dealing with complex systems:


Explicit structure allows identification of complex
system’s pieces


Modularization eases developing, maintenance,
updating of system


Change of implementation of layer’s service transparent to
rest of system


25

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Example: No layering

Telnet

FTP

HTTP

Coaxial cable

Fiber optic

Packet radio

Application

Transmission

Media

No layering
: each new application hast to be

re
-
implemented for every network technology!


26

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Example: now with Layers

Telnet

FTP

HTTP

Coaxial cable

Fiber optic

Packet radio

Application

Transport

& Network

Transmission

Media

Solution
: introduce an intermediate layer that provides a
common abstraction for various network technologies


27

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 2


ISO/OSI 7
-
layer model


TCP/IP 5 layer reference model


ISO/OSI vs. TCP/IP


Common points in layering


Summary


28

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

ISO 7 layer model


Based on early work done by the International
Organization for Standardization (ISO)


Reference Model of Open System
Interconnection (OSI)


Contains 7 conceptual layers


OSI: conceptually define service, interface,
protocol


29

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

OSI Model concepts***


Service

says what a layer does


Interface

says how to access the service


Protocol

says how the service is implemented


A set of rules and formats that govern the
communications between two peers


30

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

ISO/OSI Reference Model


Seven Layers


Lower three layers are hop
-
by
-
hop


Next four layers are end
-
to
-
end

Application

Presentation

Session

Transport

Network

Datalink

Physical

Application

Presentation

Session

Transport

Network

Datalink

Physical

Network

Datalink

Physical

Physical Medium


31

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

ISO Layers


Layer 1: Physical (underlying hardware)


Layer 2: Data Link (hardware frame definitions)


Layer 3: Network (packet forwarding, routing)


Layer 4: Transport (reliability, end
-
to
-
end)


Layer 5: Session (login and passwords, session and
connection coordination)


Layer 6: Presentation (data representation)


Layer 7: Application (individual application program)


32

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

ISO Graphical View

Layer 7

Application

Message Passing

Layer 6

Presentation

Encoding

Layer 5

Session

Authentication &
Encryption

Layer 4

Transport

Streams &
Segments

Layer 3

Network

Datagrams

Layer 2

Data Link

Frames & Packets

Layer 1

Physical
Hardware

Signaling & Wiring


33

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

X.25 and its relation to the ISO model


Best known and most widely used


Established as a recommendation of the ITU


Specially popular en Europe


Operates much like a telephone system


Consists of complex packet switches


Hosts attach to one of the packet switches


34

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

X.25 and its relation to the ISO model


35

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 2


ISO/OSI 7
-
layer model


TCP/IP 5 layer reference model


ISO/OSI vs. TCP/IP


Common points in layering


Summary


36

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

TCP/IP History


It originated from research


Developed by the Department of Defense (DOD)


Network of networks


Network of lowest bidders


The Army puts a bid on a computer and DEC wins
the bid


The Air Force puts out a bid and IBM wins


The Navy bid is won by Unisys


37

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

The TCP/IP 5
-
Layer Reference Model

Physical

Conceptual Layer

Objects Passed

Between Layers

Application

Transport

Internet

Network Interface

Messages or Streams

Transport Protocol Packets

IP Datagrams

Network
-
Specific Frames


38

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

TCP/IP Layer Description


Layer 5: Application


Used for communicating among applications


Layer 4: Transport


Provides reliable delivery of data


Layer 3: Internet


Defines uniform format of packets forwarded across networks
of different technologies and rules for forwarding packets in
routers


Layer 2: Network


Defines formats for carrying packets in hardware frames


Layer 1: Physical


39

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

TCP/IP practical overview

Physical

Application

Transport

Internet

Network Interface

Telnet, FTP,
e
-
mail, etc.

TCP, UDP

IP, ICMP, IGMP

device driver

and
interface card


40

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Two hosts running FTP


41

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Two networks connected with a router


42

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Mail with TCP/IP


43

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

A general background on TCP/IP


44

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 2


ISO/OSI 7
-
layer model


TCP/IP 5 layer reference model


ISO/OSI vs. TCP/IP


Common points in layering


Summary


45

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Layers in both ISO and TCP/IP

Physical

Application

Transport

Internet

Network Interface

Physical

Application

Presentation

Network

Datalink

Session

Transport


46

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Comparison


47

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Differences between ISO and TCP/IP


Reliability


Locus of Authority and control


48

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Reliability


ISO/X.25


Connection Oriented


Complex protocols
guarantee error free
transport on every layer


Retransmission of
corrupted packages


Flow control on every
layer


TCP/IP


Connection less


Reliability is an end
-
to
-
end
problem


Freedom on handling
corrupted packets


Flow control on transport
layer



49

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Locus of Authority and Control


ISO/X.25


Network layer is service to
transport layer


Network handles routing,
flow control,
acknowledgements
internally


Complex independent
systems working for
simple hosts


TCP/IP


Host participates in
network protocols


Host participates in e.g.
routing, flow control


Simple package delivery
system with intelligent
hosts


50

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 2


ISO/OSI 7
-
layer model


TCP/IP 5 layer reference model


ISO/OSI vs. TCP/IP


Common points in layering


Summary


51

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Protocol layering principle


Layered protocols are designed so that layer
N

at the destination receives exactly the same
object sent by layer
N

at the source


52

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Protocol layering

Application

Transport

Internet

Network Interface

Host A

Host B

Application

Transport

Internet

Network Interface

Physical net

Identical

message

Identical

packet

Identical

datagram

Identical

Frame


53

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Protocol Layering with a router


54

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Layering in the presence of Network substructure

Transport

Internet


Network

Interface

Intranet

Software Organization

Conceptual Layers

Protocol 1

Protocol 2

Protocol 3

Interface 1

Interface 2

Interface3

IP Module

Point
-
To
-
Point

(Intranet)


55

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Multiplexing and Demultiplexing

IP Module

ARP Module

RARP Module

Demultiplexing

Based on Frame type

Frame arrives


56

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

More Demultiplexing

ICMP Protocol

UDP Protocol

TCP Protocol

IP Module

Datagram arrives


57

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Outline Part 2


ISO/OSI 7
-
layer model


TCP/IP 5 layer reference model


ISO/OSI vs. TCP/IP


Common points in layering


Summary


58

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003

Summary


Advantages


Breaks down complex
problem into more
manageable components


Implementation details of
one layer are abstracted
away from other layers


Disadvantages


Information hiding,
inefficient implementations


Can introduce overhead


Could lead to inefficiency



59

CMPT 880. Protocol Layering


by Wuilbert Jaramillo,
wjaramil@sfu.ca
.

Fall 2003