You are on page 1of 38

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.

OSI Model Layers

Layer - 7

Application
Application

Advice
Upper Layer
Person or
Software Layer

Layer - 6

Presentation
Presentation

Layer - 5

Session
Session

Layer - 4

Transport
Transport

Heart of OSI
Take

Layer - 3

Network
Network

Not

Layer - 2

Data
Data Link
Link

Layer - 1

Physical
Physical

Sales

Lower Layer
or
Do
Hardware Layer

Please

Application Layer
Application
Application
Application
Application
Presentation
Presentation
Session
Session

Application Layer is
responsible for providing
Networking Services to user.
It also known as Desktop Layer.
Identification of Services is
done using Port Numbers.

Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical

Ports are nothing but Socket i.e.


Entry and Exit Point to the Layer
Total No. Ports
0 65535
Reserved Ports
0 1023
Open Ports
1024 65535

http://www.iantindia.com

ftp://ftp.microsoft.com

Example of FTP request

FTP Request
Received
FTP Reply
ftp://ftp.microsoft.com
ftp://ftp.microsoft.com

Client

FTP Request
Listen on
Port 21
Sending FTP Reply

FTP Server

Examples of Networking Services


Service

Port No.

HTTP

80

FTP

21

SMTP

25

TELNET

23

TFTP

69

How data flows from Application Layer


Application
Application
80 21 25

53 67 69

Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical

Data

Presentation Layer

Application
Application
Presentation
Presentation
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical

Presentation Layer is
responsible for converting data
into standard format.
Examples : ASCII, EBCDIC, JPEG,
MPEG, BMP, MIDI, WAV, MP3
Following tasks are perform at
Presentation layer :
Encoding
Decoding
Encryption Decryption
Compression Decompression

How data flows from


Presentation Layer

Application
Application

Data

Presentation
Presentation

Data

Session
Session
Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical

Session Layer

Application
Application
Presentation
Presentation
Session
Session
Session
Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical

Session Layer is responsible


establishing, maintaining and
terminating session.
Session ID also works at Session
Layer.
Examples :
RPC Remote Procedure Call
SQL Structured Query language
NFS Network File System

How data flows from Session Layer

Application
Application

Data

Presentation
Presentation

Data

Session
Session

Data

Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical

Transport Layer

Application
Application
Presentation
Presentation
Session
Session

Transport Layer is
responsible for end-to-end
connectivity. It is also known as
heart of OSI Layers. Following
task are performed at Transport
Layer : -

Transport
Transport
Transport
Transport

Identifying Service

Network
Network

Multiplexing & De-multiplexing

Data
Data Link
Link
Physical
Physical

Segmentation
Sequencing & Reassembling
Flow Control
Error Correction

Identifying Service
TCP
Transmission Control
Protocol

UDP
User Datagram
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

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

Segmentation

Hello! How are you ?


Hello!
How are
you ?Hello! How Are You
?

Sequencing & Reassembling

you
Hello!
Hello!
HowHow
are ?
you
You Hello!
Are? Hello!
How are
How ?
you ? You Hello! How ? Are
Hello! How Are You
? are

Sequencing & Reassembling

Hello!
Hello! How are you ? Hello!
How are
How are
you ? Hello! How Are You
? you ?
1/5

You
4/5

2/5

3/5

Hello! How
1/5

2/5

4/5

5/5

5/5

Are
3/5

Error Correction

Segment Missing
Hello!
Hello! How are you ? Hello!
How are
How are
you ? Hello! How Are You
? you ?
1/5

You
4/5

2/5

3/5

Hello! How
1/5

2/5

4/5

5/5

5/5

Are
3/5

Flow Control - Windowing

Ack-RecAck.
Sending
3
Received3-window
Sending
4
5-window

PC-A
PC-A
Received
can
send
4
Segment
can send 4 Segment
3-window
4-window
at
at aa time
time to
to
PC-B
PC-B
B

How data flows from Transport


Layer

Application
Application

Data

Presentation
Presentation

Data

Session
Session

Data

Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical

TH
Segment
Data

Network Layer

Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Network
Network
Data
Data Link
Link
Physical
Physical

Network Layer is
responsible for providing best
path to data to reach destination.
Logical Addressing sits on this
layer. Device working on Network
Layer is Router.
It is divided into two parts
Routed Protocols
e.g. IP, IPX, Apple Talk.
Routing Protocols
e.g. RIP, IGRP, OSPF, EIGRP

Routed Protocols

Segment

Hello!
How are
you ?

Source IP
192.168.1.1

Hello!
How are
you ?

Destination
Segment IP
192.168.1.2

192.168.1.1

192.168.1.2

Routing Protocols

www.iantindia.com

How data flows from Network Layer

e.g. Router

Application
Application

Data

Presentation
Presentation

Data

Session
Session

Data

Transport
Transport

Segment

Network
Network

Segment
NHPacket

Data
Data Link
Link
Physical
Physical

Data link Layer

Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Data
Data
Link
Data
Link
DataLink
Link
Physical
Physical

Data link Layer is


divided into two Sub Layers :
LLC Logical Link Control
It talks about Wan protocols e.g.
PPP, HDLC, Frame-relay
MAC Media Access Control
It talks about Physical Address.
It is 48 bit Addressing
i.e. 12 digit Hexadecimal No.
It is also responsible for Error
Detection
Device working on Data Link
Layer is Switch, Bridge, NIC.

Error Detection CRC Check

Packet

Hello!
How are
you ?

PC-A
PC-A
CRC
CRC No.
No. 33333
33333
PC-B
PC-B
Source MAC
CRC
No.
00-20-18-C0-07-71
CRC
No. 11114
11114
Error
33333
11114
46323
99434
43434
99323
55434
89696
22222
32434
00000
Detected
Destination
MAC
Error
Detected
Packet
Error
Detected
00-20-18-C0-07-72

For
ForError
ErrorCorrection
Correction
Contact
ContactSource
SourceTransport
Transportlayer
layer

192.168.1.1
00-20-18-C0-07-71

192.168.1.2
00-20-18-C0-07-72

Error Detection CRC Check

Packet

Source MAC
00-20-18-C0-07-71

Hello!
How are
you ?

20202
11114
46323
99434
43434
99323
55434
89696
22222
32434
00000

Destination
Packet MAC
00-20-18-C0-07-72

192.168.1.1
00-20-18-C0-07-71

192.168.1.2
00-20-18-C0-07-72

How data flows from Data Link


Layer

e.g. Switch

Application
Application

Data

Presentation
Presentation

Data

Session
Session

Data

Transport
Transport

Segment

Network
Network

Packet

Data
Data Link
Link
Physical
Physical

Packet DT
DH Frame

Physical Layer

Application
Application
Presentation
Presentation
Session
Session
Transport
Transport

Physical Layer is
responsible for electrical,
mechanical or procedural checks.
Data will be converted in Binary
that is 0s & 1s. Data will be in the
form of electrical pulses if it is
Coaxial or Twisted Pair cable and in
the form of Light if it is Fiber Optic
Cable.

Network
Network
Data
Data Link
Link
Physical
Physical
Physical
Physical

Devices working at Physical Layer


are Hubs, Repeaters, Cables,
Modems etc.

Physical Layer Example

Frame

Hello!
How are
you ?
1010101010101010
Frame

0101011010101010101010101
1010101101010101010101010
0101011010101010101010101

How data flows from Physical Layer

e.g. Hub

Application
Application

Data

Presentation
Presentation

Data

Session
Session

Data

Transport
Transport

Segment

Network
Network

Packet

Data
Data Link
Link

Frame

Physical
Physical

Bits

Data Encapsulation & De-capsulation

Application
Application

Data

Data

Application
Application

Presentation
Presentation

Data

Data

Presentation
Presentation

Session
Session

Data

Data

Session
Session

Transport
Transport

TH
Data
Segment

Segment
Data
TH

TransportTH
Transport

Network
Network

Packet
Segment
NH

Segment
NHPacket

Network NH
Network

Data
DataLink
Link

Packet
DHFrame
DT

Packet
DH
Packet
DTFrame

DH
DT
DataLink
Link
Data

Physical
Physical

Bits

Bits

Physical
Physical

Comparing OSI with TCP/IP Layers

OSI Layers

TCP/IP Layers

Application
Application
Presentation
Presentation

Application
Application

Session
Session
Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical

Transport
Transport
Internet
Internet
Network
Network
Access
Access

You might also like