Osi

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 37

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
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

3
Application Layer

Application Layer is
Application
Application responsible for providing
Networking Services to the
Presentation user. It is also known as
Desktop Layer. Identification of
Session Services is done using Port
Numbers.
Transport
Ports are Entry and Exit Points
Network to the Layer

Data Link
Total No. Ports 0 – 65535
Reserved Ports 0 – 1023
Physical
Open Client Ports 1024 – 65535

4
Example of FTP request
ftp://ftp.microsoft.com

Client FTP Server


5
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


6
Examples of Networking Services

Service Port No.

HTTP 80

FTP 21

SMTP 25

TELNET 23

TFTP 69

7
Data flow from Application Layer

Application Data

80 21 25 53 67 69

Presentation

Session

Transport

Network

Data Link

Physical

8
Presentation Layer

Presentation Layer is
Application responsible for converting data
into standard format.
Presentation
Presentation
Examples : ASCII, EBCDIC,
Session
JPEG, MPEG, BMP, MIDI, WAV,
MP3
Transport

Following tasks are perform at


Network
Presentation layer :
Data Link
Encoding – Decoding
Physical Encryption – Decryption
Compression – Decompression

9
Data flow from Presentation Layer

Application Data

Presentation Data

Session

Transport

Network

Data Link

Physical

10
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
Data Link SQL  Structured Query Language
NFS  Network File System
Physical

11
Data flow from Session Layer

Application Data

Presentation Data

Session Data

Transport

Network

Data Link

Physical

12
Transport Layer

Transport Layer is
Application responsible for end-to-end
connectivity. It is also known as
Presentation the heart of OSI Layers.
Following tasks are performed at
Session the Transport Layer : -

Transport
• Identifying Service

Network • Multiplexing & De-multiplexing


• Segmentation
Data Link
• Sequencing & Reassembling
Physical • Error Correction
• Flow Control
13
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

14
Multiplexing & De-multiplexing

Application

Presentation

Session

80 21 25 53 67 69

Transport

TCP - 6 UDP - 17

Network

Data Link

Physical
15
Segmentation

Hello! Hello! How are you ?


How are
you ? Hello! How Are You ?

A B

16
Sequencing & Reassembling

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

A B

17
Sequencing & Reassembling

Hello! Hello! How are you ? 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

18
Error Correction

Segment Missing
Hello! Hello! How are you ? 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

19
Flow Control - Windowing

Ack-Rec- PC-A
Ack.
Sending
3 Received
Received- can send 4 Segment
3-window
Sending 3-window
4-window
4 at a time to
5-window
PC-B

A B

20
Data flow from Transport Layer

Application Data

Presentation Data

Session Data

Transport TH
Segment
Data

Network

Data Link

Physical

21
Network Layer

Network Layer is
Application responsible for providing best
path for data to reach the
Presentation destination. Logical Addressing
works on this layer. Router is a
Session Network Layer device.

Transport It is divided into two parts


• Routed Protocols
Network
Network
e.g. IP, IPX, Apple Talk.
Data Link • Routing Protocols

Physical e.g. RIP, IGRP, OSPF, EIGRP

22
Routed Protocols

Segment

Hello! Hello!
How are How are
you ? Source IP
192.168.1.1
you ?
Destination
Segment IP
192.168.1.2

A B

192.168.1.1 192.168.1.2
23
Routing Protocols

www.zoomgroup.com

24
Data flow from Network Layer

Application Data

Presentation Data

Session Data

e.g. Router Transport Segment

Network NHPacket
Segment

Data Link

Physical

25
Datalink Layer

Datalink Layer is
Application divided 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 Hexadecimal Number.
It is also responsible for Error
Physical Detection
Devices working on Data Link
Layer are Switch, Bridge, NIC.
26
Error Detection – CRC Check

Packet
PC-A
CRC No. 33333
Hello!
How are PC-B
you ? CRC
Source MAC
No. 11114
00-20-18-C0-07-71
Error33333
11114
46323
99434
43434
99323
55434
89696
22222
32434
00000
Detected
Error Detected
Destination
Packet MAC
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 27
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

192.168.1.1 192.168.1.2
00-20-18-C0-07-71 00-20-18-C0-07-72 28
Data flow from Data Link Layer

Application Data

Presentation Data

Session Data

Transport Segment

e.g. Switch Network Packet

Data Link DH Frame


PacketDT

Physical

29
Physical Layer

Physical Layer is
Application responsible for electrical,
mechanical and procedural checks.
Presentation Data will be converted into Binary
(i.e) 0’s & 1’s. Data will be in the
Session form of electrical pulses if it is
Coaxial or Twisted Pair cable and in
Transport the form of Light if it is Fiber Optic
Cable.
Network
Devices working at Physical Layer
Data Link are Hubs, Repeaters, Cables,
Modems etc.
Physical
Physical

30
Physical Layer Example

Frame

Hello!
How are
you ?
1010101010101010
Frame

A 0101011010101010101010101
1010101101010101010101010
0101011010101010101010101 B

31
Data flow from Physical Layer

Application Data

Presentation Data

Session Data

Transport Segment

Network Packet

e.g. Hub Data Link Frame

Physical Bits

32
Data Encapsulation & De-capsulation

A B

Application Data Data Application

Presentation Data Data Presentation

Session Data Data Session

Transport TH Data
Segment Segment
TH Data TransportTH

Network NHPacket
Segment NHPacket
Segment Network NH

Data Link DHFrameDT


Packet DTFrameDH
Packet
Packet DH
DT
Data Link

Physical Bits Bits Physical


33
Simulation Scenario

Data Link
Physical

A 1000011110001110000111000
B
www.google.com
Frame Application
Application 8787874471797971766944677977 www.google.com
Presentation
Presentation 87878744717979
71766944677977 Student:1 Port MAC 8787874471797971766944677977
Session
Session
0/2 2222:2222:2222 87878744717979

Transport Data TCP:80 Transport 71766944677977 Student:1

0/1 1111:1111:1111 Network


Network
Segment SIP DIP Data TCP:80
Data Link
Data Link
S D Physical Segment SIP DIP
Physical Packet MAC MAC
S D
1000011110001110000111000 Packet MAC MAC
1000011110001110000111000

34
Figure 2.21 Port addresses

2.35
Figure 2.20 IP addresses

2.36
Comparing OSI with TCP/IP Layers

OSI Layers TCP/IP Layers

Application

Presentation Application

Session

Transport Transport

Network Internet

Data Link
Network
Access
Physical
37

You might also like