You are on page 1of 59

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

ca. wjaramil@sfu.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. Fall 2003 6 –  . Protocol Layering – by Wuilbert Jaramillo.

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 .

wjaramil@sfu.Some definitions for Protocol  an original draft. Fall 2003 8 .ca. Protocol Layering – by Wuilbert Jaramillo. 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. minute.

ca.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. Fall 2003 9 . wjaramil@sfu. Protocol Layering – by Wuilbert Jaramillo.

wjaramil@sfu.ca. Protocol Layering – by Wuilbert Jaramillo. Fall 2003 10 .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.

wjaramil@sfu.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. Fall 2003 11 . Protocol Layering – by Wuilbert Jaramillo.ca.

Fall 2003 12 .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. wjaramil@sfu.ca. Protocol Layering – by Wuilbert Jaramillo.

Fall 2003 13 .ca.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.

Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu. Fall 2003 14 .ca.Set of Protocols  Work together  Each protocol solves part of a communication problem  Known as – – Protocol suite Protocol family  Designed in layers CMPT 880.

wjaramil@sfu. Fall 2003 15 .ca.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.

Protocol Layering – by Wuilbert Jaramillo.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. wjaramil@sfu. Fall 2003 16 .ca.

CMPT 880.ca. such that the service provided by one entity is solely based on the service provided by the previous entity.What is layering?  A technique to organize a network system into a succession of logically distinct entities. Fall 2003 17 . Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu.

ca. Fall 2003 18 . Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu.Conceptual Layers of Protocol Software Sender Layer n … Layer 2 Layer 1 The modules of Protocol SW are on each machine stacked vertically into layers Receiver Layer n … Layer 2 Layer 1 Network CMPT 880.

Fall 2003 19 . Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu.ca.Conceptual/Realistic view Conceptual Layers High Level Protocol Layer Software Organization Protocol 1 Internet Protocol Layer Network Interface Layer Protocol 2 Protocol 3 IP Module Interface 1 Interface 2 Interface3 CMPT 880.

ca. Fall 2003 20 . udp Network: routing of a datagram from source to destination  – ftp.routing protocols Link: data transfer between neighboring network elements  – tcp. smtp.Example: Internet Protocol Layers  Five layers – Application: supporting network applications  – Transport: host-host data transfer  – ip. http ppp. wjaramil@sfu. ethernet Physical: bits “on the wire” Application Transport Network Link Physical CMPT 880. Protocol Layering – by Wuilbert Jaramillo.

ca. Protocol Layering – by Wuilbert Jaramillo. Fall 2003 21 . wjaramil@sfu.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.

wjaramil@sfu.ca. Fall 2003 22 . Protocol Layering – by Wuilbert Jaramillo.Layers and packet headers  Each – – layer Appends header to outgoing packet Removes header from incoming packet H H H  Receiver – M uses header as demultiplexing key Sender Multiplexes among several layers CMPT 880.

wjaramil@sfu. Protocol Layering – by Wuilbert Jaramillo.ca. Fall 2003 23 .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. updating of system  Change of implementation of layer’s service transparent to rest of system CMPT 880. Fall 2003 24 .ca.Why layering?  Dealing – – with complex systems: Explicit structure allows identification of complex system’s pieces Modularization eases developing. wjaramil@sfu. maintenance.

ca. wjaramil@sfu.Example: No layering Application Transmission Media FTP Telnet HTTP Coaxial cable Packet radio Fiber optic No layering: each new application hast to be re-implemented for every network CMPT 880. Fall 2003 25 . Protocol Layering – bytechnology! Wuilbert Jaramillo.

Example: now with Layers Application Telnet FTP HTTP Transport & Network Transmission Media Coaxial cable Fiber optic Packet radio Solution: introduce an intermediate layer that provides a common abstraction for various network technologies CMPT 880. wjaramil@sfu.ca. Fall 2003 26 . Protocol Layering – by Wuilbert Jaramillo.

TCP/IP  Common points in layering  Summary  CMPT 880. Fall 2003 27 .Outline Part 2 ISO/OSI 7-layer model  TCP/IP 5 layer reference model  ISO/OSI vs. Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu.ca.

ca. Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu. protocol CMPT 880.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. Fall 2003 28 .

ca.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. Fall 2003 29 .

wjaramil@sfu. Protocol Layering – by Wuilbert Jaramillo.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. Fall 2003 30 .ca.

session and connection coordination) Layer 6: Presentation (data representation) Layer 7: Application (individual application program) CMPT 880. end-to-end) Layer 5: Session (login and passwords. Protocol Layering – by Wuilbert Jaramillo.ca. wjaramil@sfu. routing) Layer 4: Transport (reliability. Fall 2003 31 .ISO Layers        Layer 1: Physical (underlying hardware) Layer 2: Data Link (hardware frame definitions) Layer 3: Network (packet forwarding.

ca. Fall 2003 32 .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 Signaling & Wiring Hardware Protocol Layering – by Wuilbert CMPT 880. wjaramil@sfu. Jaramillo.

Protocol Layering – by Wuilbert Jaramillo. Fall 2003 33 . wjaramil@sfu.ca.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.25 and its relation to the ISO model CMPT 880. wjaramil@sfu. Fall 2003 34 .X.ca.

Fall 2003 35 . wjaramil@sfu. Protocol Layering – by Wuilbert Jaramillo. TCP/IP  Common points in layering  Summary  CMPT 880.ca.Outline Part 2 ISO/OSI 7-layer model  TCP/IP 5 layer reference model  ISO/OSI vs.

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. wjaramil@sfu. Fall 2003 36 .ca. Protocol Layering – by Wuilbert Jaramillo.

Protocol Layering – by Wuilbert Jaramillo.The TCP/IP 5-Layer Reference Model Conceptual Layer Application Transport Internet Network Interface Objects Passed Between Layers Messages or Streams Transport Protocol Packets IP Datagrams Network-Specific Frames Physical CMPT 880. Fall 2003 37 . wjaramil@sfu.ca.

ca.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. Fall 2003 38 . wjaramil@sfu.

ca. wjaramil@sfu. e-mail. etc.TCP/IP practical overview Application Telnet. Protocol Layering – by Wuilbert Jaramillo. UDP Internet Network Interface IP. Fall 2003 39 . ICMP. FTP. Transport TCP. IGMP device driver and interface card Physical CMPT 880.

Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu.Two hosts running FTP CMPT 880.ca. Fall 2003 40 .

wjaramil@sfu.Two networks connected with a router CMPT 880. Protocol Layering – by Wuilbert Jaramillo.ca. Fall 2003 41 .

Mail with TCP/IP CMPT 880. Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu.ca. Fall 2003 42 .

Fall 2003 43 . wjaramil@sfu.ca.A general background on TCP/IP CMPT 880. Protocol Layering – by Wuilbert Jaramillo.

TCP/IP  Common points in layering  Summary  CMPT 880. Fall 2003 44 . Protocol Layering – by Wuilbert Jaramillo.Outline Part 2 ISO/OSI 7-layer model  TCP/IP 5 layer reference model  ISO/OSI vs. wjaramil@sfu.ca.

ca. wjaramil@sfu.Layers in both ISO and TCP/IP Application Presentation Application Session Transport Transport Internet Network Network Interface Datalink Physical Physical CMPT 880. Protocol Layering – by Wuilbert Jaramillo. Fall 2003 45 .

wjaramil@sfu. Fall 2003 46 . Protocol Layering – by Wuilbert Jaramillo.ca.Comparison CMPT 880.

ca.Differences between ISO and TCP/IP  Reliability  Locus of Authority and control CMPT 880. Fall 2003 47 . wjaramil@sfu. Protocol Layering – by Wuilbert Jaramillo.

wjaramil@sfu.ca. Fall 2003 48 . Protocol Layering – by Wuilbert Jaramillo.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.

flow control.Locus of Authority and Control  ISO/X. Protocol Layering – by Wuilbert Jaramillo.ca.g.25 – – – Network layer is service to transport layer Network handles routing. acknowledgements internally Complex independent systems working for simple hosts  TCP/IP – – – Host participates in network protocols Host participates in e. wjaramil@sfu. Fall 2003 49 . flow control Simple package delivery system with intelligent hosts CMPT 880. routing.

TCP/IP  Common points in layering  Summary  CMPT 880.Outline Part 2 ISO/OSI 7-layer model  TCP/IP 5 layer reference model  ISO/OSI vs.ca. Fall 2003 50 . Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu.

Protocol Layering – by Wuilbert Jaramillo.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. Fall 2003 51 . wjaramil@sfu.ca.

Fall 2003 52 . wjaramil@sfu.Protocol layering Host A Host B Application Application Transport Internet Network Interface Identical message Identical packet Identical datagram Identical Frame Transport Internet Network Interface Physical net CMPT 880.ca. Protocol Layering – by Wuilbert Jaramillo.

Protocol Layering with a router CMPT 880.ca. Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu. Fall 2003 53 .

wjaramil@sfu. Fall 2003 54 . Protocol Layering – by Wuilbert Jaramillo.ca.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.

ca. Protocol Layering – by Wuilbert Jaramillo.Multiplexing and Demultiplexing ARP Module IP Module RARP Module Demultiplexing Based on Frame type Frame arrives CMPT 880. Fall 2003 55 . wjaramil@sfu.

Fall 2003 56 . wjaramil@sfu.ca. Protocol Layering – by Wuilbert Jaramillo.More Demultiplexing UDP Protocol ICMP Protocol TCP Protocol IP Module Datagram arrives CMPT 880.

ca. Protocol Layering – by Wuilbert Jaramillo.Outline Part 2      ISO/OSI 7-layer model TCP/IP 5 layer reference model ISO/OSI vs. Fall 2003 57 . wjaramil@sfu. TCP/IP Common points in layering Summary CMPT 880.

wjaramil@sfu. inefficient implementations Can introduce overhead Could lead to inefficiency CMPT 880. Fall 2003 58 . Protocol Layering – by Wuilbert Jaramillo.ca.Summary  Advantages – – Breaks down complex problem into more manageable components Implementation details of one layer are abstracted away from other layers  Disadvantages – – – Information hiding.

Protocol Layering – by Wuilbert Jaramillo. wjaramil@sfu.CMPT 880. Fall 2003 59 .ca.