Protocol Layering

advertisement
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
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
2
Outline Part 1






Existing problems in communication networks
Protocol -definition
The need for protocols
Set of protocols: Layering
What is Layering?
Why Layering?
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
3
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
4
Existing Problems in
Communication Networks

Hardware failure
–

Network congestion
–


Networks have finite capacity
Packet delay
Data corruption
–
–

Hosts, routers
Electric, magnetic interferences
HW failure
Data duplication
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
5
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
6
Outline Part 1






Existing problems in communication networks
Protocol -definition
The need for protocols
Set of protocols: Layering
What is Layering?
Why Layering?
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
7
Some definitions for Protocol



an original draft, minute, or record of a
document or transaction
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
8
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
9
Outline Part 1






Existing problems in communication networks
Protocol -definition
The need for protocols
Set of protocols: Layering
What is Layering?
Why Layering?
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
10
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
11
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)
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
12
Outline Part 1






Existing problems in communication networks
Protocol -definition
The need for protocols
Set of protocols: Layering
What is Layering?
Why Layering?
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
13
Set of Protocols



Work together
Each protocol solves part of a communication
problem
Known as
–
–

Protocol suite
Protocol family
Designed in layers
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
14
Plan for Protocol Design



Intended for protocol designers
Divides protocols into layers
Each layer is devoted to one sub-problem
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
15
Outline Part 1






Existing problems in communication networks
Protocol -definition
The need for protocols
Set of protocols: Layering
What is Layering?
Why Layering?
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
16
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.
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
17
Conceptual Layers of Protocol
Software
Sender
Layer n
…
Receiver
The modules of
Protocol SW are
on each machine
stacked vertically
into layers
Layer 2
Layer 1
Layer n
…
Layer 2
Layer 1
Network
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
18
Conceptual/Realistic view
Conceptual Layers
High Level
Protocol Layer
Software Organization
Protocol 2
Protocol 1
Internet
Protocol Layer
Network
Interface Layer
Protocol 3
IP Module
Interface 1
Interface3
Interface 2
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
19
Example: Internet Protocol Layers

Five layers
–
Application: supporting
network applications

–
–
tcp, udp
Network
ip,routing protocols
Link
Link: data transfer between
neighboring network
elements

–
Transport
Network: routing of a
datagram from source to
destination

–
ftp, smtp, http
Transport: host-host data
transfer

Application
ppp, ethernet
Physical
Physical: bits “on the wire”
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
20
Protocol Layering and Data
Application
M
Message
H
M
Segment
H H
M
Datagram
H H H
M
Frame
Transport
Network
Link
Physical
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
21
Layers and packet headers

Each layer
–
–
Appends header to outgoing packet
Removes header from incoming packet
H H H

M
Receiver uses header as demultiplexing key
–
Sender Multiplexes among several layers
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
22
Outline Part 1






Existing problems in communication networks
Protocol -definition
The need for protocols
Set of protocols: Layering
What is Layering?
Why Layering?
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
23
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
24
Example: No layering
FTP
Application
Transmission
Media
Telnet
HTTP
Coaxial cable
Packet radio
Fiber optic
No layering: each new application hast to be
re-implemented for every network technology!
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
25
Example: now with Layers
Application
Telnet
FTP
HTTP
Transport
& Network
Transmission
Media
Coaxial cable
Packet radio
Fiber optic
Solution: introduce an intermediate layer that provides a
common abstraction for various network technologies
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
26
Outline Part 2





ISO/OSI 7-layer model
TCP/IP 5 layer reference model
ISO/OSI vs. TCP/IP
Common points in layering
Summary
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
27
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
28
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
29
ISO/OSI Reference Model

Seven Layers
–
–
Lower three layers are hop-by-hop
Next four layers are end-to-end
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Network
Datalink
Datalink
Datalink
Physical
Physical
Physical
Physical Medium
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
30
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)
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
31
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
32
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
33
X.25 and its relation to the ISO model
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
34
Outline Part 2





ISO/OSI 7-layer model
TCP/IP 5 layer reference model
ISO/OSI vs. TCP/IP
Common points in layering
Summary
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
35
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
36
The TCP/IP 5-Layer Reference Model
Conceptual Layer
Application
Objects Passed
Between Layers
Messages or Streams
Transport
Transport Protocol Packets
Internet
IP Datagrams
Network Interface
Network-Specific Frames
Physical
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
37
TCP/IP Layer Description

Layer 5: Application
–

Layer 4: Transport
–

Defines uniform format of packets forwarded across networks
of different technologies and rules for forwarding packets in
routers
Layer 2: Network
–

Provides reliable delivery of data
Layer 3: Internet
–

Used for communicating among applications
Defines formats for carrying packets in hardware frames
Layer 1: Physical
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
38
TCP/IP practical overview
Application
Telnet, FTP,
e-mail, etc.
Transport
TCP, UDP
Internet
Network Interface
IP, ICMP, IGMP
device driver and
interface card
Physical
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
39
Two hosts running FTP
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
40
Two networks connected with a router
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
41
Mail with TCP/IP
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
42
A general background on TCP/IP
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
43
Outline Part 2





ISO/OSI 7-layer model
TCP/IP 5 layer reference model
ISO/OSI vs. TCP/IP
Common points in layering
Summary
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
44
Layers in both ISO and TCP/IP
Application
Presentation
Session
Application
Transport
Transport
Internet
Network
Network Interface
Datalink
Physical
Physical
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
45
Comparison
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
46
Differences between ISO and TCP/IP


Reliability
Locus of Authority and control
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
47
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
48
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
49
Outline Part 2





ISO/OSI 7-layer model
TCP/IP 5 layer reference model
ISO/OSI vs. TCP/IP
Common points in layering
Summary
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
50
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
51
Protocol layering
Host A
Host B
Application
Application
Identical
message
Transport
Internet
Network Interface
Identical
packet
Identical
datagram
Identical
Frame
Transport
Internet
Network Interface
Physical net
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
52
Protocol Layering with a router
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
53
Layering in the presence of Network substructure
Conceptual Layers
Transport
Software Organization
Protocol 1
Internet
Network
Interface
Protocol 2
Protocol 3
IP Module
Interface 1
Interface 2
Interface3
Point-To-Point
(Intranet)
Intranet
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
54
Multiplexing and Demultiplexing
ARP Module
IP Module
RARP Module
Demultiplexing
Based on Frame type
Frame arrives
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
55
More Demultiplexing
UDP Protocol
ICMP Protocol
TCP Protocol
IP Module
Datagram arrives
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
56
Outline Part 2





ISO/OSI 7-layer model
TCP/IP 5 layer reference model
ISO/OSI vs. TCP/IP
Common points in layering
Summary
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
57
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
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
58
CMPT 880. Protocol Layering – by Wuilbert Jaramillo, wjaramil@sfu.ca.
Fall 2003
59
Download