1
OSI Model
• OSI means Open System Interconnect model.
• Developed by the International Organization for
Standardization in 1974.
• It consists of seven layers.
• Each layer has a different but specific processing
function.
2
OSI Model Layers
Layer - 7 Application
Application
Upper Layer
Layer - 6 Presentation
Presentation or
Software Layer
Layer - 5 Session
Session
Layer - 4 Transport
Transport Heart of OSI
Layer - 3 Network
Network
Lower Layer
Layer - 2 Data
Data Link
Link or
Hardware Layer
Layer - 1 Physical
Physical
3
Application Layer
Application Layer is
Application
Application
Application
Application responsible for providing
Networking Services to the
Presentation
Presentation user. It is also known as
Desktop Layer. Identification of
Session
Session Services is done using Port
Numbers.
Transport
Transport
Ports are Entry and Exit Points
Network
Network to the Layer
Data
Data Link
Link Total No. Ports 0 –
65535
Physical
Physical
Reserved Ports 0 – 1023
Open Client Ports 1024 – 65535
4
Example of HTTP request
[Link]
Client Web Server
5
Example of HTTP request
HTTP Request
HTTP Request
Received HTTP Reply Listen on
http:// [Link]
[Link] Port 80
Webpage Sending HTTP Reply
Webpage
Client Web Server
6
Example of FTP request
[Link]
Client FTP Server
7
Example of FTP request
FTP Request
FTP Request
Received FTP Reply Listen on
[Link]
[Link] Port 21
Sending FTP Reply
Client FTP Server
8
Examples of Networking Services
Service Port No.
HTTP 80
FTP 21
SMTP 25
TELNET 23
TFTP 69
9
Data flow from Application Layer
Application
Application Data
80 21 25 53 67 69
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical
10
Presentation Layer
Presentation Layer is
Application
Application responsible for converting data
into standard format.
Presentation
Presentation
Examples : ASCII, EBCDIC,
Session
Session JPEG, MPEG, BMP, MIDI, WAV,
MP3
Transport
Transport
Network Following tasks are perform at
Network
Presentation layer :
Data
Data Link
Link
Encoding – Decoding
Physical
Physical Encryption – Decryption
Compression – Decompression
11
Data flow from Presentation Layer
Application
Application Data
Presentation
Presentation Data
Session
Session
Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical
12
Session Layer
Session Layer is responsible for
Application
Application establishing, maintaining and
terminating session.
Presentation
Presentation Session ID works at Session
Layer.
Session
Session
Transport
Transport
Examples :
Network
Network
RPC Remote Procedure Call
Data
Data Link
Link SQL Structured Query Language
NFS Network File System
Physical
Physical
13
Data flow from Session Layer
Application
Application Data
Presentation
Presentation Data
Session
Session Data
Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical
14
Transport Layer
Transport Layer is
Application
Application responsible for end-to-end
connectivity. It is also known as
Presentation
Presentation the heart of OSI Layers.
Following tasks are performed at
Session
Session the Transport Layer : -
Transport
Transport
Transport
Transport • Identifying Service
Network
Network • Multiplexing & De-multiplexing
• Segmentation
Data
Data Link
Link
• Sequencing & Reassembling
Physical
Physical • Error Correction
• Flow Control
15
Identifying Service
TCP UDP
• Transmission Control • User Datagram
Protocol Protocol
• Connection Oriented • Connection Less
• Acknowledgement • No Acknowledgement
• Reliable • Unreliable
• Slower • Faster
• Port No. 6 • Port No. 17
• e.g. HTTP, FTP, SMTP • e.g. DNS, DHCP, TFTP
16
Multiplexing & De-multiplexing
Application
Application
Presentation
Presentation
Session
Session
80 21 25 53 67 69
Transport
Transport
TCP - 6 UDP - 17
Network
Network
Data
Data Link
Link
Physical
Physical
17
Segmentation
Hello! How are you ?
Hello!
How are
you ? Hello! How Are You ?
A B
18
Sequencing & Reassembling
you
Hello! HowHow
You Hello! are ?
you
Are? Hello!
Hello!
How are How ?
you ? Hello!
You Hello!
How AreHow You? Are? are
A B
19
Sequencing & Reassembling
Hello! How are you ? Hello!
Hello!
How are
How are
you ? Hello! How Are You ? you ?
1/5 2/5 3/5 4/5 5/5
You Hello! How ? Are
4/5 1/5 2/5 5/5 3/5
A B
20
Error Correction
Segment Missing
Hello! How are you ? Hello!
Hello!
How are
How are
you ? Hello! How Are You ? you ?
1/5 2/5 3/5 4/5 5/5
You Hello! How ? Are
4/5 1/5 2/5 5/5 3/5
A B
21
Flow Control - Windowing
Ack-Rec- PC-A
PC-A
Ack.
Sending
3 Received
Received- can
can send
send 44 Segments
Segments
3-window
Sending 3-window
4-window
4 at
5-window at aa time
time to
to
PC-B
PC-B
A B
22
Data flow from Transport Layer
Application
Application Data
Presentation
Presentation Data
Session
Session Data
Transport TH
Segment
Data
Transport
Network
Network
Data
Data Link
Link
Physical
Physical
23
Network Layer
Network Layer is
Application
Application responsible for providing best
path for data to reach the
Presentation
Presentation destination. Logical Addressing
works on this layer. Router is a
Session
Session Network Layer device.
Transport
Transport It is divided into two parts
Network
Network • Routed Protocols
Network
Network
e.g. IP, IPX, Apple Talk.
Data
Data Link
Link • Routing Protocols
Physical
Physical e.g. RIP, IGRP, OSPF, EIGRP
24
Routed Protocols
Segment
Hello!
Hello!
How are
How are
you ?
Source IP
[Link]
you ?
Destination
Segment IP
[Link]
A B
[Link] [Link]
25
Routing Protocols
[Link]
26
Data flow from Network Layer
Application
Application Data
Presentation
Presentation Data
Session
Session Data
e.g. Router Transport
Transport Segment
Network
Network NHPacket
Segment
Data
Data Link
Link
Physical
Physical
27
Datalink Layer
Datalink Layer is
Application
Application divided into two Sub Layers :
Presentation
Presentation
• LLC – Logical Link Control
Session It talks about Wan protocols e.g.
Session
PPP, HDLC, Frame-relay
Transport
Transport
• MAC – Media Access Control
Network
Network It talks about Physical Address.
It is a 48 bit address i.e. 12 digit
Data
Data Link
Link Hexadecimal Number.
It is also responsible for Error
Physical
Physical Detection
Devices working on Data Link
Layer are Switch, Bridge, NIC.
28
Error Detection – CRC Check
Packet
PC-A
PC-A
CRC
CRC No. No. 33333
33333
Hello!
How are
PC-B
PC-B
Source MAC
you ? CRC
CRC No.
No. 11114
11114
00-20-18-C0-07-71
Error 33333
11114
46323
99434
43434
99323
55434
89696
22222
32434
00000
Detected
Error
Error Detected
Detected
Destination
Packet MAC
00-20-18-C0-07-72
For
For Error
Error Correction
Correction
Contact
Contact Source
Source Transport
Transport layer
layer
A B
[Link] [Link]
00-20-18-C0-07-71 00-20-18-C0-07-72 29
Error Detection – CRC Check
Packet
Hello!
How are
Source MAC
00-20-18-C0-07-71
you ?
20202
11114
46323
99434
43434
99323
55434
89696
22222
32434
00000
Destination
Packet MAC
00-20-18-C0-07-72
A B
[Link] [Link]
00-20-18-C0-07-71 00-20-18-C0-07-72 30
Data flow from Data Link Layer
Application
Application Data
Presentation
Presentation Data
Session
Session Data
Transport
Transport Segment
e.g. Switch Network
Network Packet
Data
Data Link
Link DH Frame
Packet DT
Physical
Physical
31
Physical Layer
Physical Layer is
Application
Application responsible for electrical,
mechanical and procedural checks.
Presentation
Presentation Data will be converted into Binary
(i.e) 0’s & 1’s. Data will be in the
Session
Session form of electrical pulses if it is
Coaxial or Twisted Pair cable and in
Transport
Transport the form of Light if it is Fiber Optic
Cable.
Network
Network
Devices working at Physical Layer
Data
Data Link
Link are Hubs, Repeaters, Cables,
Modems etc.
Physical
Physical
32
Physical Layer Example
Frame
Hello!
How are
you ?
1010101010101010
Frame
A 0101011010101010101010101
1010101101010101010101010
0101011010101010101010101 B
33
Data flow from Physical Layer
Application
Application Data
Presentation
Presentation Data
Session
Session Data
Transport
Transport Segment
Network
Network Packet
e.g. Hub Data
Data Link
Link Frame
Physical
Physical Bits
34
Data Encapsulation & De-capsulation
A B
Application Data Data Application
Application Application
Presentation
Presentation Data Data Presentation
Presentation
Session
Session Data Data Session
Session
Transport
Transport
TH Data
Segment TH
Segment
Data TransportTH
Transport
Network
Network NHPacket
Segment NHPacket
Segment Network NH
Network
Data DHFrameDT
Packet DTFrameDH
Packet
Packet DH
DT
DataLink
Link DataLink
Data Link
Physical
Physical Bits Bits Physical
Physical
35
Comparing OSI with TCP/IP Layers
OSI Layers TCP/IP Layers
Application
Application
Presentation
Presentation Application
Application
Session
Session
Transport
Transport Transport
Transport
Network
Network Internet
Internet
Data
Data Link
Link Network
Network
Access
Access
Physical
Physical
36
37
Example of HTTP request
[Link]
38
[Link]
39
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
C:\> telnet [Link]
Connecting .....
================================
Welcome to Hyderabad Router
================================
User Access Verification
password :
40
[Link]
41
[Link]
xyz@[Link]
xyz
******
42