You are on page 1of 4

Tech Lesson: The OSI Reference Model

The world of networking and computer to computer communication includes vast amounts of
protocols, standards, hardware, software, and concepts. Given these inherent complexities we
need a way to make this information easier to understand, discuss, and engage with. To accomplish
this task the International Standards Organization (ISO) developed a conceptual model as a way to
reference i nter-computer communication processes. This 7-layer visual model was developed in
1984 and was named the Open Systems Interconnect (OSI) reference model. Let’s go ahead and
have a look at the OSI model layers. The layers begin at the end user process (Application, Layer 7)
and work their way down through each layer until bits are put on the wire (Physical, Layer 1).

Application services for end user processes such as file transfers, email, remote terminal access,
7 Application domain name resolution, web transfer, network management etc. Protocols such as FTP & Telnet.
Provides translation to/from the application layer. Performs data encryption, decryption,
6 Presentation compression and decompression. Associated with file formats such as JPEG, MPEG etc.
Coordinates, establishes, manages and tears down sessions between applications on either side
5 Session of the connection. Maintains separate sessions for the different applications data streams.
Segments and reassembles data from upper layers and unites them into the same data stream.
4 Transport Provides flow control for data-loss prevention as well as reliable and unreliable transport methods.
Provides logical network addressing and path determination/routing services. Responsible for
3 Network packet delivery, fragmentation, and sequencing. This is the layer where Internet Protocol resides.
Delivers frames using unique hardware addressing via the Media Access Control (MAC) sublayer.
2 Data Link Also includes the Logical Link Control (LLC) sublayer which provides error detection and control.
Turns raw bits into electrical signaling and defines physical network media such as copper cabling,
1 Physical fiber optics, and wireless transmission standards. Concerned with bit rates and transmission modes.

While it is important to understand the function of each layer we should also consider how a
message i s treated when sent from one host to another. In the next example we wi ll see that
additional information is added to the data as it passes down through the layers. On the receiving
side of the connection that same information is read at each layer as it passes back up the model.
The term Protocol Data Unit (PDU) is used to describe the data as it moves through each layer.

PDU PDU
Data Application Application Data

Data Presentation Presentation Data

Data Sessi on Sessi on Data

Segment Transport Transport Segment

Packet Network Network Packet

Frame Data Li nk Data Li nk Frame

Bits Physi cal Physi cal Bits

1011001011110010100011001010111100101
combined binary data stream

www.zerotoengineer.com
Tech Lesson: The OSI Reference Model
As we saw in the previous example a computer actually works at all 7 layers of the OSI model. This
is true because it deals with everything from human to computer interaction all the way down to
putting information on the wire. However, there are hardware devices that work at just a few of
the layers and other devices that even work at just a single layer. It is important to note that if a
device works at any specific layer then it also works at all the layers below it. For example, routers
work at layer 3, so they will also work at layers 2 and 1. Layer 2 switches work at layers 2 and 1,
while hubs and repeaters work only at the Physical layer and so function at just a single layer.

The purpose of networking hardware such as routers and switches is to connect multiple devices
together and make decisions on how and where to send their data. To understand the general
function of network devices in relation to OSI let’s use an example of two hosts that are on
different IP networks. In order to have traffic move from one network to another we need a device
that i s capable of readi ng layer 3 Packet headers and making routing decisions based on the layer 3
destination. This is where a Router comes into play. As shown in the example below the router is
looking at the data up to layer 3, making a routing decision and then placing that data back on the
wire addressed to it’s final layer 3 desti nati on.

Example of data being routed between two hosts on different networks


IP 192.168.50.50 IP 10.10.10.50
A B
OSI Layers MAC aaaa.aaaa.aaaa MAC bbbb.bbbb.bbbb OSI Layers
Router
7– Application 7– Application
6– Presentation G0/1 G0/2 6– Presentation
5– Sessi on 192.168.50.1 10.10.10.1 5– Sessi on
4– Transport 4– Transport
3– Network 3 – Network 3– Network
2– Data Li nk 2 – Data Li nk Internet 2– Data Li nk
1– Physi cal 1 – Physi cal 1– Physi cal

The example above shows that routers are necessary when hosts are on different networks,
however when hosts communicate within the same network there is no need for a router. Hubs and
switches are used to connect devices that are within the same network. Switches are much more
efficient than hubs and provide intelligent packet switching between hosts. Swi tches keep tables of
all the layer 2 addresses seen on each individual port and are able to switch data received on one
port directly out of another port based on the destination MAC address. This is a huge improvement
over using a hub because hubs simply forward any traffic received back out all their connected
ports. As more and more devices are added to a hub the communication between devi ces becomes
increasingly inefficient slows down the network dramatically when there are too many devices.

www.zerotoengineer.com
Tech Lesson: The OSI Reference Model
Example of Frames being switched between two hosts on the same network

IP 172.16.0.1 IP 172.16.0.2
A B
OSI Layers MAC aaaa.aaaa.aaaa MAC bbbb.bbbb.bbbb OSI Layers
7– Application Switch 7– Application
6– Presentation G0/1 G0/2 6– Presentation
5– Sessi on 5– Sessi on
4– Transport 4– Transport
3– Network 3– Network
2– Data Li nk 2 – Data Li nk 2– Data Li nk
1– Physi cal 1 – Physi cal 1– Physi cal

Switches build a table of MAC addresses and what port each MAC address is connected to. In the
example above you can see that host A is sending a message to Host B. The switch receives the
information and looks at the OSI Layer 2 header which is the MAC header on the Ethernet Frame.
Once the switch identifies the destination MAC address it is able to switch the Frame out of the
destination port that connects to Host B. In this way the switch is making intelligent decisions and
increasing the efficiency of communication across the network.

Example of network traffic passing through a hub from Host A to Host B

IP 172.16.0.1 IP 172.16.0.2
A B
OSI Layers MAC aaaa.aaaa.aaaa MAC bbbb.bbbb.bbbb OSI Layers
7– Application Hub 7– Application
6– Presentation G0/1 G0/2 6– Presentation
5– Sessi on 5– Sessi on
4– Transport 4– Transport
3– Network 3– Network
2– Data Li nk 2– Data Li nk
1– Physi cal 1 – Physi cal 1– Physi cal

Hubs are not intelligent devices and simply forward all received traffic out of all connected ports. As
you can see in the above diagram the hub only works at OSI layer 1 which is the Physical layer. When
compared with switches, hubs increases the amount of traffic on the network and the amount of
information each host must process even the traffic isn’t destined for that device. As more and more
devices are added to the hub it makes the network more and more inefficient.

www.zerotoengineer.com
Tech Lesson: The OSI Reference Model
This diagram shows common network devices and the layer at
7 Application FTP
which they function. In addition, we have some examples of
Telnet, SSH
Data HTTP protocols at each layer.

6 Presentation JPEG, MPEG If a device works at any specific layer it also works at all the layers
Data TLS, LPP below it. Servers and host computers work at all layers of the OSI
model, whereas network devi ces are pri mari ly concerned wi th the
5 Session SCP bottom 4 layers which are also known as the “Networking Layers”.
NetBIOS
Data PAP Layer 4 Devices
4 Transport TCP Firewall
UDP
Segment ESP
Layer 3 Devices
3 Network IP
ICMP Multiservice
Packet or
EIGRP Router
Datagram Router Layer 2 Devices
2 Data Link Ethernet
VLANs Multilayer Switch
Frame 802.11 WiFi Switch Layer 1 Devices
1 Physical Bluetooth Hub/repeaters
DSL Cables & Media
Bits ISDN

You can use the model below to help remember each layer from top to bottom and bottom to top!

All 7 Application 7 Away


People 6 Presentation 6 Pizza
Seem 5 Session 5 Sausage
To 4 Transport 4 Throw
Need 3 Network 3 Not
Data 2 Data Link 2 Do
Processing 1 Physical 1 Please

www.zerotoengineer.com

You might also like