0% found this document useful (0 votes)
153 views121 pages

Understanding the OSI Model Basics

Uploaded by

Shepherd Mabhena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views121 pages

Understanding the OSI Model Basics

Uploaded by

Shepherd Mabhena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

The OSI Model

OSI Model
Networks Lecter 3-part 1
Dr Athraa Juhi
Introduction
 Open Systems Interconnection (OSI) model

 It defines and is used to understand – How data is


transferred from one computer to another in a computer
network

 An open system is a set of protocols


• These protocols allow any two different systems
to communicate regardless of their underlying
architecture.
forms a
network

In the most basic form, two computers (end-points) connected


to each other with LAN Cable (Network Media) and
connectors (RJ45) sharing data with the help of NICs
But if one computer is based on Microsoft Windows and the
other one has MAC OS installed, then how these two
computers are going to communicate with each other?
How to make them talk to each other ?
 In order to accomplish successful communication
between computers or networks of different
architectures:

 7-layered OSI Model (Open System


Interconnection Model) was introduced.
 The International Organization for
Standardization (ISO) introduced the OSI in
1984.
The OSI Model
The purpose of the OSI model is

 To show how to facilitate communication between


different systems
without requiring changes

To the logic of the

underlying hardware and


software
The OSI model is not a protocol
OSI Model is

a model for understanding and designing a network


architecture

that is

Flexible
robust,
and
interoperable
The OSI model is a layered framework

for

the design of network systems

that allows

communication between all types of


computer systems.
The OSI model (Open
System Interconnect) is
a theoretical stack of 7
layers OSI can be used as a
reference to
understand how a
network operates.
When communication The purpose of each
is not simple, we may layer is to offer
divide the complex certain services to the
task of communication higher layers
into several layers.
Each layer is a packet of
protocols

A protocol is required
when two entities need
to communicate.
What are

We shall try to understand each layer of


the OSI model
its key
responsibility is to
carry the data
across physical
hardware such as
Ethernet cables

The physical layer is


lowest layer in the
OSI model
Data Link layer : at this layer the physical
addresses are added to the data, this the source
and destination MAC addresses.
Switches are located at this layer.
 The network layer handles IP addressing and
Routing
 Source and destination IP addresses are added
 Routers operate on this layer
 Transport layer adds the transport protocols such TCP and UDP
 TCP for example is used for error handling and sequencing, to
ensure no data is lost.
 This layer also adds the source and destination port numbers.
Session layer is responsible for establishing and
terminating connection between devices
 Presentation layer format data in a way the receiving
application can understand it
 It also able to encrypt and decrypt data if needed.
 Application layer where
the applications and
user can communicates
Application Layer: is used by network applications

 Networks applications = computer applications


that use Internet
 Example of network applications are :
Google Chrome, Firefox, Outlook, Skype...etc.
 Web browser is a network application running
in your PC

But it does not reside in the application


layer
 Your web browser uses application layer protocols
HTTP, HTTPs to do web surfing
 Not only web browser but all network
applications including outlook, Skype..etc.

All are dependent on application layer protocols to function


 There are dozens of application layer protocols
that enable various functions at this layer.
All these protocols
collectively form
application layer
 These protocols form the bases for various network
services, like file transfer, web surfing, emails, virtual
terminal
Services provided by the Application Layer

It provides user interfaces and support for


services such as

 electronic mail,
 remote file access and transfer,
 shared database management,
 and other types of distributed information
services.
 Presentation Layer: receives data from application layer

Presentation layer is concerned with the syntax and


semantics of the information exchanged between two
systems.
 The data received from the Application Layer is in the
form of characters and numbers.

 Presentation layer converts these characters and numbers


to machine understandable binary format.
Translation
The presentation layer is responsible for interoperability between
these different encoding methods.
Translation
 The presentation layer at the sender changes the information from
its sender-dependent format into a common format.

 The presentation layer at the receiving machine changes the


common format into its receiver-dependent format.
 Before data is transmitted, presentation layer reduces the
number of bits that are used to represent the original data,
this bit reduction process is call Data Compression
 Data Compression can be Lossy of Lossless
With data compression data transmission can be done faster

 Data compression reduces the amount of bit used to store


the original file as the size of file is reduced, it can be
received at the destination in a very less time.
 To maintain the integrity of data, before transmission,
data is encrypted.
 Encryption enhances the security of sensitive data.
 At the sender side, data is encrypted, and at the receiver
side data is decrypted.
SSL Protocol (Secure Sockets Layer Protocol) is used in
Presentation layer for encryption and decryption.

 SSL (Secure Sockets Layer) is the standard security


technology for establishing an encrypted link between a
web server and a browser.
 This link ensures that all data passed between the web
server and browsers remain private and integral.
The session layer is the network dialog controller.

Helps in setting up and managing connections, enabling the


sending and receiving of data, followed by termination of
connections (or sessions)
Dialog control
The session layer allows two systems to enter into a dialog. It
allows the communication between two processes to take
place in either half-duplex or full-duplex mode.
Session layer establishes, maintains, and synchronizes the
interaction between communicating systems.

Session Layer uses APIs (Application Programming Interfaces)

NetBIOS-Network Basic Input Output System is an example


of APIs, which allows applications on different computers to
communicate with each other.
Before a session or a connection is established with a server,
server performs a function called authentication.

Authentication is a process of
verifying "who you are?".
For this server uses 'Username and Password'
Once the user name and password entered correctly a
session or a connection is established between your
computer and the server.
After authenticating the user, authorization is checked.

Authorization is the process used by the server to determine if you


have a permission to access a file.
If you are not authorized, you will get a message saying: "you are not
authorized to access this page".
Session layer keeps a track of the files that are being
downloaded,
For example a webpage contains:
text, images..etc
These text and images are stored in separate files on the
webserver
 When you request a website your web
browser…

 Your web browser opens a separate session to the


webserver to download each of these text and image files
separately.
 These files are received in the form of data packets

 Session layer keeps a track of which data packet belongs to


which file
Session layer keeps a track of which data packet belongs to which file,
either text file or image file

Session layer tracks where the received data packet go, in this case it
goes to web browser.
That means, session layer helps in session
management.
 Controls that reliability of the communication through
segmentation, flow control and error control
Data received from session layer is divided
into small data units called segments

Each segment contains a source and destination port number,


and a sequence number.
Port number helps to direct each segment to the correct
application.
 Sequence number helps to reassemble segment in the
correct order, to form correct message at the receiver.
 In Flow control, transport layer controls the amount
of data being transmitted.

 Consider a mobile is connected to a server, suppose


server can transmit data maximum at 100 Mbps and
the mobile can process data maximum at 10 Mbps.
If we are downloading a file from the server, but the server
starts sending data at 50 Mbps, which is greater than the rate
that the mobile can process
Mobile phone with the help of transport layer can tell the
server to slow down the data transmission rate up to 10Mbps,
so that no data can get lost.
Similarly if server is sending data at 5Mbps, mobile phone
tells the server to increase data transmission rate to 10Mbps to
maintain system performance.
Transport layer also helps in error control,

If some data doesn't arrive at the destination, transport layer


uses Automatic Repeat Request scheme to retransmit the lost
or the corrupted data.
A group of bits called Checksum is added to each segment
by the transport layer to find out the received corrupted
segments.
Protocols of transmit layer are TCP, UDP
Transport layer performs two types of services ….
UDP is faster than TCP because it does not provide any feedback, whether
data ware really delivered. Whereas TCP provides a feedback, therefore
lost data can retransmitted in TCP.
 UDP is used where it does not matter whether we have received all
data or not, for example online streaming movies, games, voice over
IP..

 TCP is used where full data delivery is must, for example File
transmission, email..
Transport layer passes data segment to the network layer

Network layer is the layer where routers reside


Data units in the Network
layer are called packets.

Network layer: works for the transmission of the received


data segments from one computer to another located in
different networks.
The functions of network layer are
Network layer assigns
sender and receivers IP
address to each segment
to form an IP packet

IP addresses are assigned to


ensure that each data packet
can reach the correct
destination.
IP addressing done in network layer is called logical
addressing, every computer in the network has a unique IP
address
 Routing is a method of moving data packet from source to
destination.
 Routing is based on the logical address format of IPv4 or
IPv6, and also depends on Subnet Mask address.
Suppose Computer A is connected to network1 and
Computer B is connected to network 2.
Lets say that in computer B we have requested to access facebook.com, and
now there is a reply from Facebook server for computer B in the form of
packet.

 This packet needs to be delivered to computer B only, since


in a network each device has a unique IP address.
 Network layer of the Facebook server has already added sender
and receivers IP address in the packet.
Suppose that subnet Mask used is 255.255.255.0.
This mask tells that first 3 combinations of the IP address
represents network, while the last combination represents
host (i.e. computer B)
So based on IP address format received data packet will
first move to Network2 and then to computer B.
So based on IP address and Mask, routing decisions are
made in a computer network.
 A computer can be connected to Internet server or to a
computer in a number of ways.
 Choosing the best possible path for data delivery from
source to destination is called path determination.
There are different protocols to determine the best possible path for
data delivery
OSPF : Open Shortest Path First
BGP: Border Gateway Protocol
IS-IS: Intermediate System to Intermediate System
Data Link layer receives data packet from network layer, data
packets contain IP addresses of sender and receiver.
There are two kinds of addressing:

1) Logical addressing is done in network layer where IP


addresses of sender and receiver are assigned each segment
to form a Data Packet.
2) Physical addressing is done in data link layer, where
Mac addresses of sender and receiver are assigned to each
data packet to form a Frame
Data unit in data link layer is called frame

Data link layer is embedded as software in NIC of the computer.


Data link layer provides means to transport data from one computer
to another via a local media
 Local media includes copper wire, optical fiber …, or air (for radio
signals).
 Media refers to the physical link between two or more computers or
networks.
Data link layer performs two basic functions:

1) 2)

It allows upper layers of


the OSI model to access
media using techniques
such as ( Framing)
 Consider two distinct hosts, a laptop and desktop
communicating with each other

As laptop and desktop connected to different networks , so they will


be using network layer protocols IP to communicate with each other
In this example:

desktop is connected to router R1 via an Ethernet cable,


Router R1 and R2 are connected via a satellite link, and
laptop is connected to router R2 via a wireless link
Now desktop want to send some data to laptop, based on the medium
used to connect desktop and router R1,
data link layer adds some data in the head and tail of the IP packet
and converts it into a frame
Router R1 receives the data frame de-capsulate it into IP packet and
then
encapsulate it into a frame again so that it can cross satellite link to
reach router R2.
Router R2 will again de-capsulate the received frame and encapsulate it
again to form a wireless data link frame

Laptop receives this wireless data link frame de-capsulate it and then
forward IP packet to network layer
Finally data arrives application layer, application layer protocols then
make the received data visible on the laptop screen .
 So network layer (or higher
level layers) are able to transfer
data over media with the help of
data link layer.
Data link layer also
The technique used to
get the frame on and off
the media is called
media access control.
Assume that a number of devices connected to a common media
If two or more devices connected to the same media and send
data at the same time, there may be a possibility of collision of
the two messages
Collision of the messages as it
have been sent at the same
time
Collision of two or more messages resulting in a useless
message that neither of the recipients can understand.
To avoid this situations, data link layer keeps an eye on when the
shared media is free
Data link layer monitor when the shared media is free, so that
device can transmit data for the receiver, this is called Carrier
Sense Multiple Access (CSMA).

So data link layer with this media access control methods controls
data transmission
Tail of each frame contains bits which used to detect errors in the
received frame.
 Till now, Data from Application Layer has been segmented by
Transport Layer,
 placed into packet by Network Layer,
 and framed by Data Link Layer
The frame is a sequence of binary zeros and ones.

Physical layer converts these binary sequence into signal.


Physical layer transmits the signal over local media
 Signal generated by the physical layer depends on the type of media
used to connect two devices.

 So it can be electrical signal in case of copper cable, light signal in


case of optical fiber and radio signal in case of air.
At the receiver, physical layer receives signal and converts it to bits
Physical layer at the receiver pass these bits to data link layer as a
frame
Frame is further de-capsulated as data moves through higher layers…
Finally, data moves to application layer
Application layer protocols makes the sender's message visible in
the application used in the receiver's computer screen.
In this way, OSI model is helping to transfer data between these
hosts.
Thank you

You might also like