1
OSI Reference Model
2
Agenda
The Layered Model Layers 1 & 2: Physical &
Data Link Layers Layer 3: Network Layer Layers 4–7: Transport,
Session, Presentation, and Application Layers
3
The Layered Model
4
Layered Communication
Source: Tanenbaum, 1996
I like rabbits
L: DutchIk hou vankonijnen
Fax #:---L: DutchIk hou vankonijnen
Message
Information for the Remote Translator
Informationfor the RemoteSecretary
Location A
5
Layered Communication
I like rabbits
L: DutchIk hou vankonijnen
L: DutchIk hou vankonijnen
Fax #:---L: DutchIk hou vankonijnen
Fax #:---L: DutchIk hou vankonijnen
J’aimeles lapins
Information for the Remote Translator
Informationfor the RemoteSecretary
Location A Location B
Message
6
Layered Communication
I like rabbits
L: DutchIk hou vankonijnen
L: DutchIk hou vankonijnen
Fax #:---L: DutchIk hou vankonijnen
Fax #:---L: DutchIk hou vankonijnen
J’aimeles lapins
Information for the remote translator
Informationfor the remotesecretary
Location A Location B
1
2
3Layers
Message
7
Why a Layered Network Model?
7 Application
6 Presentation
5 Session
4 Transport
3 Network
2 Data Link
1 Physical
• Reduces complexity (one big problem to seven smaller ones)
• Standardizes interfaces
• Facilitates modular engineering
• Assures interoperable technology
• Accelerates evolution
• Simplifies teaching and learning
8
Devices Function at Layers
7 Application
6 Presentation
5 Session
4 Transport
3 Network
2 Data Link
1 Physical
NIC Card
Hub
9
Host & Media Layers
7 Application
6 Presentation
5 Session
4 Transport
3 Network
2 Data Link
1 Physical
Host layers:Host layers: Provide accurate data delivery between computers
Media layers:Media layers: Controlphysical delivery of messages over the network}}
10
Layer Functions
Provides network services to application processes (such as electronic mail, file transfer, and terminal emulation)
7 Application
11
Layer Functions
Network services to applicationsNetwork services to applications
• Ensures data is readable by receiving system
• Format of data• Data structures• Negotiates data transfer
syntax for application layer
7 Application
6 Presentation Data representation
12
Layer Functions
Inter-host communication• Establishes, manages, and
terminates sessions between applications
7 Application
6 Presentation
5 Session
Network services to applicationsNetwork services to applications
Data representationData representation
13
Layer Functions
7 Application
6 Presentation
5 Session
Transport4
Inter-host communicationInter-host communication
Network services to applicationsNetwork services to applications
Data representationData representation
End-to-end connection reliability
• Concerned with data transport issues between hosts
• Data transport reliability• Establishes, maintains, and
terminates virtual circuits• Fault detection and recovery• Information flow control
14
Layer Functions
7 Application
6 Presentation
5 Session
Transport4
Network3
Inter-host communicationInter-host communication
Network services to applicationsNetwork services to applications
Data representationData representation
End-to-end connection End-to-end connection reliabilityreliability
Addresses and best path• Provides connectivity and path
selection between two end systems
• Domain of routing
15
Layer Functions
7 Application
6 Presentation
5 Session
Transport4
Network3
Data Link2
Inter-host communicationInter-host communication
Network services to applicationsNetwork services to applications
Data representationData representation
End-to-end connection End-to-end connection reliabilityreliability
Addresses and best pathAddresses and best path
Access to media• Provides reliable transfer of data
across media• Physical addressing, network
topology, error notification, flow control
16
Layer Functions
7 Application
6 Presentation
5 Session
Transport4
Network3
Data Link2
Physical1
Inter-host communicationInter-host communication
Network services to applicationsNetwork services to applications
Data representationData representation
End-to-end connection End-to-end connection reliabilityreliability
Addresses and best pathAddresses and best path
Access to mediaAccess to media
Binary transmission• Wires, connectors, voltages,
data rates
17
7 Application
6 Presentation
5 Session
4 Transport
3 Network
2 Data Link
1 Physical
Host A
Peer-to-Peer Communications
Application
Presentation
Session
Transport
Network
Data Link
PhysicalBits
Frames
Packets
Segments
Host B
18
Data Encapsulation
Application
Presentation
Session
Transport
Network
Physical
Data Link
Application
Presentation
Session
Transport
Network
Physical
Data Link
Data} {DataNetwork
Header
Frame
HeaderFrame
TrailerDataNetwork
Header
0101101010110001
Host A Host B
19
Layers 1 & 2: Physical & Data Link Layers
20
Physical and Logical Addressing
0000.0c12.3456
21
MAC Address
24 bits
ROMRAM
24 bits
0000.0c12. 3456Serial NumberVendor Code
• MAC address is burned into ROM on a network interface card
22
Layer 3: Network Layer
23
Network Layer: Path Determination
Which Path?Which Path?
• Layer 3 functions to find the best path through the internetwork
24
Network Layer: Communicate Path
1
2
3
4
5
6
7
8
9
10 11
Addresses represent the path of media connections
Routing helps contain broadcasts
25
Addressing—Network and Node
Network Node
1
2
123
1
3 1
1.1
2.1
3.1
1.2
1.3
• Network address—Path part used by the router
• Node address—Specific port or device on the network
26
Protocol Addressing Variations
Network Node
1 1
GeneralExample
Network Host
10. 8.2.48
TCP/IPExample (Mask 255.0.0.0)
Network Node
1aceb0b. 0000.0c00.6e25
Novell IPXExample
27
Network Layer Protocol Operations
Each router provides its services to support upper layer functions
X Y
AA
CC
28
Network Layer Protocol Operations
Each router provides its services to support upper layer functions
BB
X Y
AA
CC
Presentation
Data LinkPhysical
Data LinkPhysical
Router A Router B Router C
Data LinkPhysical
Data LinkNetworkTransportSessionPresentationApplication
Physical
Host X Host Y
Data LinkNetworkTransportSession
Application
Physical
Network Network Network
29
Routed Versus Routing Protocol
• Routed protocol used between routers to direct user traffic
1.02.03.0
1.12.13.1
DestinationNetwork
NetworkProtocol
Protocol Name
Examples: IP, IPX, AppleTalk, DECnet Exit Port
to Use
30
Routed Versus Routing Protocol
• Routed protocolused betweenrouters to directuser traffic
Examples: IP, IPX, AppleTalk, DECnet
• Routing protocolused only betweenrouters to maintainrouting tables
Examples: RIP, IGRP, OSPF
31
Static Versus Dynamic Routes
Uses a protocol route that a networkadministrator enters into the router
Static Route
Uses a route that a network protocoladjusts automatically for topology ortraffic changes
Dynamic Route
32
Static Route Example
Point-to-point orcircuit-switched
connection
“Stub” network
Only a single networkconnection with no need
for routing updates
AA
BB
Fixed route to address reflects administrator’s knowledge
33
Adapting to Topology Change
AA BB
CCDD
Can an alternate route substitute for a failed route?
34
Adapting to Topology Change
AA BB
CCDD
XX
Can an alternate route substitute for a failed route?
YesYes—With dynamic routing enabled
35
LAN-to-LAN Routing Example
Network 1
Network 3
E0E1 To0
Host 5Host 4 Network 2
TokenRing
802.3 Net 2, Host 5
Routing Table
DestinationNetwork
Outgoing Interface
123
E0To0E1
36
LAN-to-LAN Routing
Network 1
Network 3
E0E1 To0
Host 5Host 4 Network 2
TokenRing
802.3 Net 2, Host 5
Routing Table
Net 2, Host 5802.5
From LAN to LAN
DestinationNetwork
Outgoing Interface
123
E0To0E1
37
LAN-to-WAN Routing
Data
1.3 2.4 Data
AA
TokenRing
2.4
Token Ring 1.3 2.4 Data
BB
1.3From LAN
Frame Relay 1.3 2.4 DataFrame Relay
1.3 2.4 Data
To WAN
Ethernet
Data
1.3 2.4 Data
1.3 2.4 Data
To LAN
1.3 2.4 Data
38
Layers 4–7: Transport, Session, Presentation, and Application Layers
39
Transport Layer
Segments upper-layer applications Establishes an end-to-end connection Sends segments from one end host to another Optionally, ensures data reliability
40
Transport Layer— Segments Upper-Layer Applications
Electronic
File
Transfer
Application
Presentation
Session
Segments
DataApplication
PortTransport Data
Application
Port
Terminal
Session
41
Transport Layer— Establishes Connection
Synchronize
Synchronize
Acknowledge
Negotiate Connection
Receiver
Data Transfer
Connection Established
(Send Segments)
Sender
42
Transport Layer— Sends Segments with Flow Control
Transmit
Buffer FullNot Ready
StopProcessSegments
Buffer OKReadyGo
Resume Transmission
ReceiverSender
43
Transport Layer— Reliability with Windowing
•Window Size = 1
Sender
Send 1 Receive 1
Receiver
Ack 2
Send 2 Receive 2Ack 3
Sender
Send 1Send 2
Receive 1Receive 2
Receiver
•Window Size = 3
Send 3 Receive 3Ack 4
Send 4
44
Transport Layer— An Acknowledgement Technique
Sender Receiver
Send 2Send 1
Send 3Ack 4
Send 5Send 4
Send 6Ack 5
Send 5Ack 7
1 2 3 4 5 6 7 1 2 3 4 5 6 7
45
Transport to Network Layer
End-to-End SegmentsEnd-to-End Segments
Routed PacketsRouted Packets
46
Session Layer
• Network File System (NFS)
• Structured Query Language (SQL)
• Remote-Procedure Call (RPC)
• X Window System
• AppleTalk Session Protocol (ASP)
• DEC Session Control Protocol (SCP)
Service Request
Service Reply
Coordinates applications as they interact on different hosts
47
Presentation Layer
ASCIIEBCDICEncrypted
• Text• Data
login:
PICTTIFFJPEGGIF
• Graphics• Visual images
• Sound
• VideoMPEGQuickTime
MIDI
Provides code formatting and conversion for applications
48
Application Layer
Word Processor
Presentation Graphics
Spreadsheet
Database
Design/Manufacturing
Project Planning
Others
COMPUTERAPPLICATIONS
Electronic Mail
File Transfer
Remote Access
Client-Server Process
Information Location
Network Management
Others
NETWORKAPPLICATIONS INTERNETWORK
APPLICATIONS
Electronic Data Interchange
World Wide Web
E-Mail Gateways
Special-Interest Bulletin Boards
Financial Transaction Services
Internet Navigation Utilities
Conferencing (Voice, Video, Data)
Others
49