3. Seven layers of the OSI model
ISO is the organization.
OSI is the model.
4. It prevents changes in one layer from affecting other layers.
It describes what functions occur at each layer of the model that encourages
industry standardization.
Dividing network communication process in smaller component makes software
development, design, and troubleshooting easier.
Standardization of network components allows many vendors make development
It allows different types of network hardware and software to communicate.
Dividing network in layers make network administrators life easier.
They can troubleshoot issue more quickly and effectually by looking in layer that
is causing issue rather than finding it entire network.
It also makes learning easier.
Advantages of Layering
5. Protocols
• For proper communication, entities in different systems must speak the same
language
• Therefore, there must be mutually acceptable conventions and rules about
the content, timing and underlying mechanisms
• A protocol is a set of rules and formats that govern the communication
between communicating peers. Such activities include:
set of valid messages
meaning of each message
error detection
Encryption
Routing
etc.
• A protocol is necessary for any function that requires cooperation between
peers
• Sometimes there could be more than one protocol for a task or layer( TCP vs
UDP, POP vs IMAP), however one has to be selected (per layer) according to
the communication requirement.
6. Protocols
• There is a standard protocol for each network
communication task or layer, such as:
• How to send data over the Internet (TCP/IP)
• How to send and receive email (POP, IMAP)
• How to request and deliver web pages
(HTTP)
• How to request and deliver files (FTP)
7. OSI as Framework for Standardization
Each layer obtain
services from the
layer below and
provides a service to
the layer above
9. Protocol Data Units (PDU)
User data is passed from layer to layer
Control information is added/removed to/from user
data at each layer
Header (and sometimes trailer)
each layer has a different header/trailer
Data + header + trailer = PDU (Protocol Data Unit)
each layer has a different PDU
Outgoing data (PDU) in each layer is packaged and
handed over to the layer underneath. This process is
called encapsulation.
27. Data Formats
Application data
data
TCP
header data
TCP
header data
TCP
header
data
TCP
header
IP
header
data
TCP
header
IP
header
Ethernet
header
Ethernet
trailer
application
layer
transport
layer
network
layer
data link
layer
message
segment
packet
frame
29. Packet Encapsulation (TCP/IP)
The data is sent down the protocol stack
Each layer adds to the data by prepending headers
22Bytes20Bytes20Bytes 4Bytes
64 to 1500 Bytes
30. Communication at the physical layer
A
Physical
layer
Physical
layer
R1 R3 R4 B
Source Destination
Legend
011 ... 101
0
1
1
.
.
.
1
0
1
011 ... 101 011 ... 101
Link 3 Link 5 Link 6
Link 1
The unit of communication at the physical layer are
bits.
31. Communication at the data link layer
A
Physical Physical
Data link
Data link
R1 R3 R4 B
Source Destination Data
D Header
H
Legend
Link 1 Link 3 Link 5 Link 6
Frame
D2 H2
F
r
a
m
e
D
2
H
2
Frame
D2 H2
Frame
D2 H2
The unit of communication at the data link layer is a frame.
32. Communication at the network layer
A
Physical Physical
Data link
Data link
R1 R3 R4 B
Network
Network
Source Destination Data
D Header
H
Legend
Datagram
D3 H3
Datagram
D3 H3
The unit of communication at the network layer is a datagram.
33. Communication at transport layer
A
Physical Physical
Data link
Data link
R1 R3 R4
B
Network
Network
Transport Transport
Source Destination Data
D Header
H
Legend
Segment
D4 H4
Segment
D4 H4
The unit of communication at the transport layer is a segment.
34. Communication at application layer
A
Physical Physical
Data link
Data link
R1 R3 R4
B
Network
Network
Transport Transport
Application
Application Source Destination Data
D Header
H
Legend
Message
D5 D5
D5 D5
Message
The unit of communication at the application layer is a message.
38. Most local-area networks use a 48-bit (6-byte) physical
address written as 12 hexadecimal digits; every byte (2
hexadecimal digits) is separated by a colon, as shown
below:
MAC address (Physical Address)
07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address.
39. Data
87 10
1 packet
accepted
Data
87 10
4
Physical addressing inside a single LAN
This figure shows a node with physical address 10 sends a frame to a node
with physical address 87. The two nodes are connected within a LAN. As
the figure shows, the computer with physical address 10 is the sender, and
the computer with physical address 87 is the receiver.
40. Physical addressing inside a single LAN
This figure shows a node with physical address 10 sends a frame to a node
with physical address 87. The two nodes are connected within a LAN. As
the figure shows, the computer with physical address 10 is the sender, and
the computer with physical address 87 is the receiver.
41. Data
A P
20 10 Data
A P
20 10
Physical
addresses
changed
Data
A P
33 99
Data
A P
33 99
Physical
addresses
changed
Data
A P
95 66 Data
A P
95 66
IP addresses – Logical addressing
42. IP addresses – Logical addressing
The physical addresses will change from hop to hop,
but the logical addresses usually remain the same.
43. • Following figure shows two computers communicating via
the Internet.
• The sending computer is running three processes at this time
with port addresses a, b, and c. The receiving computer is
running two processes at this time with port addresses j and
k.
• Process a in the sending computer needs to communicate
with process j in the receiving computer.
• Note that although both computers are using the same
application, FTP, for example, the port addresses are
different because one is a client program and the other is a
server program.
Port Addressing
44. A Sender Receiver P
Internet
a Data
j
A P
H2
a Data
j
A P
a Data
j
Data
a Data
j
A P
H2
a Data
j
A P
a Data
j
Data
Port addressing
47. Port Addresses
A port address is a 16-bit address represented by one decimal
number as shown.
Ex:- 21: FTP, 23: Telnet, 80: HTTP
It is TCP / UDP segments that carry the source and destination
port numbers
Port numbers range from 0 to 65,539.
Well Known Ports are in the range of 0 to 1023 and are assigned
to well known processes such as FTP, HTTP, SMTP.