OSI model all layers in networking


What is OSI Model




What is OSI Model

OSI Model or Open System Interconnection Model:

  • OSI Model defines and is used to understand How data is transferred from one computer to another in a computer 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 forms a network.



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?

In order to accomplish successful communication b/w computers or networks of different architectures, 7-layered OSI Model.

Open System Interconnection Model was introduced by International Organization for Standardization in 1984 containing:



Application Layer, Presentation Layer, Session Layer, Transport Layer, Network Layer, Data Link Layer and Physical Layer.

Note that each layer is a package of protocols
(set of rules and conventions).

If I say,  Application Layer, then it
does not mean that it includes computer applications like Chrome, Firefox etc.

But it includes application layer protocols that are needed to make these applications work correctly in a network or Internet.

Application Layer: 


  • The application layer is used by network applications. Network application means computer applications that use internet like Google Chrome, Firefox, Outlook, Skype etc.
  • Web Browser is a network application running in your PC. It does not reside in the Application Layer.
  • But, it uses application layer protocols - HTTPor 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 the Application layer.
  • These protocols form the basis for various network services like File transfer, Web surfing, Emails, Virtual terminals etc.
  • File transfer is done with the help of FTP protocol.
  • Web surfing is done with the help of HTTP or HTTPS For Emails, SMTP protocol is used, and For Virtual terminals, TELNET is used.
  • So, Application Layer provides services fornetwork applications with the help of protocols to perform user's activities.


Presentation Layer: 


  • Presentation Layer receives data from Application Layer.
  • This data is in the form of characters and numbers.
  • Presentation Layer convert these characters and numbers to machine-understandable binary format


  • Conversion of ASCII to EBCDIC code.
  • This function of Presentation layer is called Translation.
  • Before the data is transmitted, Presentation Layer reduces the number of bits that are used to represent the original data.
  • This bit reduction process is called Data Compression and it can be Lossy or Lossless.
  • Data Compression reduces the amount of space used to store the original file.


Session Layer: 


  • Suppose you have planned for a party.
  • You have hired a few helpers ensuring that each activity runs smoothly.
  • Helpers will help you in setting up, assisting, cleaning and then closing the party.
  • Same is the case with Session Layer.


  • Session Layer helps in setting up and managing connections enabling sending and receiving of data followed by termination of connections or sessions.
  • Like you hired some helpers for your party, Session layer too has its own helpers called APIs or Application Programming Interfaces.
  • NETBIOS or Network Basic Input/output System is an example of APIs which allows applications on different computers to communicate with each other.
  • Just before a session or a connection is established with a server, server performs a function called Authentication.
  • Authentication is the process of verifying, Who you are? For this, server uses a user name and password.
  • Once entered user name and password are matched, a session or a connection is established between your computer and the server.
  • Now, you can upload or download required files.
  • After authenticating the user, Authorization is checked.
  • Authorization is the process used by server to determine if you have permission to access a file.
  • If not, you will get a message saying, You are not authorized to access this page.
  • Both of these functions, Authentication and Authorization, are performed by session layer.
  • The session layer keeps a track of the files being downloaded.
  • Your web browser performs all functions of session, presentation and application layer.


Transport Layer: 

  • It is the fourth layer of OSI Model.
  • The transport layer is responsible for source to destination delivery of entire message.
  • It ensure that the entire messages arrives at the destination computer.
  • Transport layer is a core of OSI Model.

Network layer : 


  • It is a third layer of OSI Model.
  • It add source address & destination address to the messages. 
  • It is responsible for routing. 
  • Routing is the process of selecting the best path of available paths in order send the message.

Data Link Layer :



  • Data Link Layer receive data packets from Network Layer which contain IP addresses of sender and receiver.

There are two kinds of addressing:

- Logical addressing
- Physical addressing

Logical addressing : is done at network layer where sender and receiver's IP addresses are assigned to each data packet.



Physical addressing is done at the Data Link layer where MAC addresses of both devices are assigned to the received data packet.


MAC address is a 12 digit alphanumeric number embedded in NIC of your computer by the manufacturer. Data unit in Data link layer is called Frame.

Data Link Layer is embedded as a software
in NIC of a computer and provide means to
transfer data from one computer to another
via a local media.

Local media include Copper wire, optical fiber
or Air for radio signals.

Please note, here media does not correspond
to audio, video, animation etc.

It refers to the physical links between two
or more computers or networks.

The Data Link layer performs two basic functions:
- It allows the upper layers to access the media using techniques such as framing.



- Controls how data is placed and received
from the media using techniques such as media access control and error detection.

Access the media:
Consider two distant hosts, a laptop, and
a desktop, communicating with each other.

As laptop and desktop are connected to different networks, so they will use Network layer protocols, IP.



Data Link Layer sends and receives the frame
from the media.

The technique used to get the frame on and
off the media is called Media Access Control.

There may be a number of devices connected
to a common media.

If two or more devices send data at the same
time, then there may be a possibility of the collision of the two messages resulting in
a useless message that neither recipient can
understand.

To avoid these situations, the data link layer
keeps an eye on when the shared media is free so that the device can transmit data for the receiver.

This is called Carrier Sense Multiple Access
CSMA.

So, Data Link Layer, with its Media Access
Control methods, controls when data is placed and received from the media.

The tail of each frame contains Bits which
are used to detect errors in the received frame.

These occur due to certain limitations of
media used for transferring data.

Physical Layer:


  • Till now, data from application layer has been segmented by Transport Layer, placed into packets by Network Layer.
  • Data Link Layer which is a sequence of binary 0s and 1s.
  • Physical Layer converts this binary sequence into signals and transmits over local media.
@@@
  • It can be an electrical signal in case of Copper Cable or LAN cable, the Light signal in case of Optical Fibre and Radio signal in case of Air as Local Media.
  • So, the signal generated by the Physical Layer depends on the type of Media used to connect two devices.


Post a Comment

0 Comments