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