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
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
Reserved Ports 0 – 1023
Physical
Physical Open Client Ports 1024 – 65535
Example of HTTP request
http://www.tvtc.gov.sa
HTTP Request
Received
HTTP HTTP Reply
Request Listen on
http://www.tvtc.gov.sa/
http:// www.tvtc.gov.sa / Port 80
Webpage
Webpage Sending HTTP Reply
Webpage
FTP Request
FTP Request
Received FTP Reply Listen on
ftp://ftp.microsoft.com
ftp://ftp.microsoft.com Port 21
Sending FTP Reply
xyz@yahoo.com
xyz
******
Examples of Networking Services
HTTP 80
FTP 21
SMTP 25
TELNET 23
TFTP 69
Examples of Networking Services
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
Data flow from Application Layer
14
Presentation Layer
Presentation Layer is
Application
Application responsible for converting data
into standard format.
Presentation
Presentation
Presentation
Presentation
Examples : ASCII, EBCDIC,
Session
Session JPEG, MPEG, BMP, MIDI, WAV,
MP3
Transport
Transport
Following tasks are perform at
Network
Network Presentation layer :
Data
Data Link
Link
Encoding – Decoding
Physical Encryption – Decryption
Physical
Compression – Decompression
http://www.microsoft.com
Data flow from Presentation Layer
Application
Application Data
Presentation
Presentation Data
Session
Session
Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical
Session Layer
Transport
Transport
Examples :
Network
Network
RPC Remote Procedure Call
Data
Data Link
Link SQL Structured Query Language
NFS Network File System
Physical
Physical
Data flow from Session Layer
Application
Application Data
Presentation
Presentation Data
Session
Session Data
Transport
Transport
Network
Network
Data
Data Link
Link
Physical
Physical
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 • Identifying Service
TCP UDP
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
A B
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
Sequencing & Reassembling
A B
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
A B
Flow Control - Windowing
Ack-Rec- PC-A
PC-A
Ack.
Sending
3 Received
Received- can send 4 Segment
can send 4 Segment
3-window
Sending 3-window
4-window
4
5-window at
at aa time
time to
to
PC-B
PC-B
A B
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
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
• Routed Protocols
Network
Network
Network
Network
e.g. IP, IPX, Apple Talk.
Data
Data Link
Link • Routing 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
Routing Protocols
www.proleaders.net
A
Data flow from Network Layer
Application
Application Data
Presentation
Presentation Data
Session
Session Data
Network
Network NHPacket
Segment
Data
Data Link
Link
Physical
Physical
Datalink Layer
Datalink Layer is
Application
Application divided into two Sub Layers :
Presentation
Presentation • LLC – Logical Link Control
PC-A
Packet
PC-A
CRC
CRC No. No. 33333
33333
Hello!
How are PC-B
PC-B
you ? CRC
Source MAC
No. 11114
CRC
Error
No.
33333
11114
46323
99434
43434
99323
55434
89696
22222
32434
00000
Detected
11114
00-20-18-C0-07-71
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
192.168.1.1 192.168.1.2
00-20-18-C0-07-71 00-20-18-C0-07-72
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
Data flow from Data Link Layer
Application
Application Data
Presentation
Presentation Data
Session
Session Data
Transport
Transport Segment
Data
Data Link
Link DH Frame
PacketDT
Physical
Physical
Data flow from Data Link Layer
Network Interface
Card (NIC)
Bridge
38
Data flow from Data Link Layer
Physical Layer
Physical Layer is
Application
Application responsible for electrical,
mechanical and procedural checks.
Presentation
Presentation Data will be converted into Binary
0’s & 1’s. Data will be in the form
Session
Session of electrical pulses if it is Coaxial or
Twisted Pair cable and in the form
Transport
Transport of Light if it is Fiber Optic Cable.
Network
Network Devices working at Physical Layer
are Hubs, Repeaters, Cables,
Data
Data Link
Link Modems etc.
Physical
Physical
Physical
Physical
Physical Layer Example
Frame
Hello!
How are
you ?
1010101010101010
Frame
A 0101011010101010101010101
1010101101010101010101010
0101011010101010101010101 B
Data flow from Physical Layer
Application
Application Data
Presentation
Presentation Data
Session
Session Data
Transport
Transport Segment
Network
Network Packet
Physical
Physical Bits
Data flow from Physical Layer
Repeater
Modem
Data Encapsulation & De-capsulation
A B
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
Encapsulation
Source Destination
Segments
Packets IP Address
Bits
TCP/IP Layers
47
Comparing OSI with 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
TCP/IP Model
50
QUESTION 1
A. A switch
B. A router
C. A network adapter card
D. A hub
E. A repeater
Answer
QUESTION 2
A. Clock information
B. IP information
C. DNS information
D. Gateway information
Answer
QUESTION 3
A. POP3
B. SMTP
C. SNMP
D. DHCP
Answer
QUESTION 4
A. 01
B. F2:89:10
C. 01:AB
D. 01:AB:4D
Answer
QUESTION 5
Answer
QUESTION 6
A. Transport
B. Network
C. Data Link
D. Physical
Answer
QUESTION 7
A. Application
B. Presentation
C. Session
D. Transport
Answer
QUESTION 8
A. Transport
B. Network
C. Data Link
D. Physical
Answer
QUESTION 9
A. Bit
B. Segment
C. Packet/Datagram
D. Frame
Answer
QUESTION 10
A. Bit
B. Segment
C. Packet/Datagram
D. Frame
Answer
QUESTION 11
A. Bit
B. Segment
C. Packet/Datagram
D. Frame
Answer
QUESTION 12
Answer
QUESTION 13
A. Destination IP address
B. Source IP address
C. Destination MAC address
D. Source MAC address
Answer
QUESTION 14
A. DNS
B. Telnet
C. FTP
D. SMTP
Answer
QUESTION 15
A. SNMP
B. HTTP
C. POP3
D. DHCP
Answer
QUESTION 16
A. Telnet
B. HTTP
C. TFTP
D. NTP
Answer
QUESTION 17
A. DHCP
B. SMTP
C. SNMP
D. POP3
Answer
QUESTION 18
Answer
QUESTION 19
A. RARP
B. ARP
C. ICMP
D. Proxy ARP
Answer
QUESTION 20
A. HTTP
B. VPN
C. Telnet
D. SNMP
Answer