OSI Model Define and Is Used To Understand How Data Is Transferred
OSI Model Define and Is Used To Understand How Data Is Transferred
OSI Model Define and Is Used To Understand How Data Is Transferred
OSI Model define 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 Each Layer is a package of Protocols. If I say, “Application Layer”, that it
has MAC OS installed. Then how these two computers are going to does not mean that it includes Computer Application like Chrome,
communicate with each other? Firefox etc. but it includes Application Layer Protocols that are needed
to make this Applications work correctly in a network or internet.
In order to accomplish successful communication between computers
and networks of different architectures, 7‐layered OSI Model or Open
System Interconnection model was introduced by International
Organization for Standardization (ISO) in 1984. Containing Application
Layer, Presentation Layer, Session Layer, Transport Layer, Network
Layer, Data Link Layer and Physical Layer.
Application Layer: The Application Layer is used by Network
Applications. Network Applications means Computer Applications that
use internet like Google Chrome, Firefox, Outlook, Skype etc.
Web browser is a network application running in a PC. It does not reside
in the Application Layer, but it uses Application Layer protocol‐ HTTP or
HTTPS to do web surfing.
Not only web browser but all network application 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.
These protocols are: HTTP, HTTPS, FTP, NFS, FMTP, DHCP, SNMP,
TELNET, POP3, IRC, and NNTP.
All these protocols collectively form the Application layer. These
protocols form the basis for various network services like File Transfer,
Web Surfing, Emails, and Virtual Terminal etc.
File Transfer is done with the help of FTP Protocol. Web Surfing is done
with the help of HTTP or HTTPS Protocols. For email, SMTP Protocol is
used and for Virtual terminal, Telnet is used.
So, the Application Layer provides services for network applications with
the help of protocols to perform user activities.
Presentation Layer: Presentation Layer Received data from Before Data is transmitted, Presentation Layer reduces the number of
Application Layer. This Data is in the form of characters and numbers. bits that are used to represent the original Data. This bit reduction
Process called Data compression and it can be Lossy or Lossless.
Data compression reduces the amount of space used to store the
original file. As the file is reduced, it can be received at destination in
Presentation Layer convert these character and numbers to machine‐ very less time that is data transmission can be done faster.
understandable binary format. For Example: Conversion of ASCII to
EBCDIC code. This function of Presentation Layer is called translation.
Thus Data compression is very helpful in real‐time video or audio SSL Protocol (secure sockets layer) is used in Presentation Layer for
streaming. Encryption and Decryption.
So, Presentation Layer performs 3 basic functions: Translation,
Compression, Encryption / Decryption.
To maintain the integrity of data, before transmission, Data is encrypted.
Encryption enhances security of the sensitive data.
At sender side, data is encrypted and at receiver side data is decrypted.
Session Layer: Supposed, you have planned for a party. You have Just before a session or a connection is established with a server, server
hired few helpers ensuring that each activity runs smoothly. performs a function called Authentication. Authentication is the process
of verifying “Who you are?” For this Server uses a username and
password.
Once username and password are matched, a session or connection is
Helpers will help you in setting up, assisting, cleaning and then closing
established between your computer and the server. Now, you can
the party. Same is the case with session Layer.
upload and 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”.
Session layer helps setting up and managing connections enabling
sending and receiving of data followed by termination of connections or
sessions. Like you hire some helper 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 Both of these functions, Authentication & Authorization, are performed
which allow applications on different computers to communicate with by Session Layer.
each other.
The Session Layer keeps a track of the files being downloaded. For So Session Layer helps in: Session Management, Authentication and
example, a web page content text, image etc. These text and images are Authorization.
stored as separate files on the web server.
When you request a website in your web browser, your web browser
open a separate session to the web server to download each of these
text and images files separately. These files are received in the form of Your web browser performs all functions of Session, Presentation and
data packets. Application Layer.
Session Layer keeps a track which data packet belong to which file,
either text file or image file, and tracks where the received data packet
go, in this case, it goes to web browser, that is session layer helps in
Session Management.
Transport Layer: The Transport Layer Controls the reliability of
communication through segmentation, flow control and error control.
In Flow Control, Transport Layer controls the amount of data
In Segmentation, data received from session layer is divided into small transmitted to a level that the receiver can process. Consider, our mobile
data units called Segments. Each segment contains a source and connected to a server. Suppose, Server can transmit data maximum at
destinations port number and a sequence number. Port number helps 100 Mbps and mobile can process data maximum at 10 Mbps. Now, we
to direct smaller data units to correct application. are downloading a file from server but servers start sending data 50
Mbps which is greater than the rate mobile phone can process. So,
Mobile Phone, with the help of Transport Layer, can tell the server to
slow down data transmission rate up to 10 Mbps so that no data gets
lost. Similarly, if server is sending data at 5 Mbps, Mobile phone tells
server to increase data transmission rate to 10 Mbps to maintain system
performance.
Sequence number helps to reassemble smaller data units in the correct
order to form correct message in the receiver.
Error Control: Transport Layer also helps in Error Control. If some data In connection oriented transmission, TCP decides a path. Data packets
units do not arrive the destination, transport layer uses automatic are delivered via the same path for the entire connection. This means
repeat request (ARQ) schemes to retransmit the lost or corrupted data. that when a TCP conversation occurs a session is established. Once the
A group of bits 1s and 0s, called Checksum, is added to each data conversation is finished the session is terminated.
segment by transport layer, is used to find out received corrupted
segments.
Protocol of Transport Layer are Transmission Control Protocol (TCP) and
User Datagram Protocol (UDP). Transport Layer performs two types of
services: Connection‐oriented Transmission and Connectionless
Transmission. Connection‐oriented Transmission is done via TCP while On the other hand, in connectionless transmission, UDP delivers data
Connectionless Transmission is done via UDP. Suppose, you are going packets without setting a predefined path that is no session is
from Place A to Place B. After travelling for some distance, you get stuck established. Path followed for data delivery depends on traffic on the
in the traffic. Now, you will have two option: Either flow the same route available path.
or, change the route as per traffic. Connection‐oriented or TCP
transmission works as per option 1 while Connectionless or UDP
Transmission works as per option 2.
UDP is faster than TCP because it chooses less traffic path for data Network Layer: Transport Layer passes data segments to the Network
delivery and it does not provide any feedback whether data was really Layer. Network Layer works for the transmission of received data segments
delivered or not whereas TCP provides the feedback. Therefore, lost from one computer to another located in different networks. Data
packets can be retransmitted in TCP. UDP is used where it does not units/Segments in the Network Layer are called Packets. It is the Layer where
matter whether we have received all data. For example: streaming routers resides.
movies, songs, online games, voice over IP, TFTP and DNS etc. on the
other hand TCP is used where full data delivery is must. For example:
World Wide Web, Email, FTP etc.
The function of the Network Layer are: Logical Addressing, Routing and Path
determination.
So, Transport Layer performs segmentation, flow control, error control,
connection oriented and connectionless transmission.
IP Addressing (IPv4 or IPv6) is done in network layer is called logical addressing. Suppose, Computer A is connected to network 1 and Computer B is connected
Every computer in a network has a unique IP address. As Network Layer deals to network 2. From Computer B, we have requested to access facebook.com
with data delivery, so this layer assigns senders and receivers IP Address to and now there is a reply from Facebook server for Computer B in the form of
each data packet can reach the correct destination. packet. This packet needs to be delivered to Computer B only. Since, in a
network, each device has a unique IP Address, so these both computer will be
having a unique IP Address as well. Network Layer of Facebook Server have
already added sender and receivers IP Address in the packet. Now suppose,
mask used is: 255.255.255.0. This mask tells that the first 3 combination
represent network while the last combination represents host or Computer B.
So, based on IP Address format, received data packet will moved to network
B1 and then to computer B. So, based on IP Address and Mask, routing
decisions are made in a Computer Network.
Routing is a method of moving a data packet from source to destination and it
is based on the logical address format of IPv4 or IPv6.
A computer can be connected to any internet server or a computer in a number Data Link Layer: Data Link Layer receives data packet from Network
of ways. Choosing the best possible path for data delivery from source to Layer which contain IP Addresses of sender and receiver. There are two kind of
destination is called Path Determination. Layer 3 devices use protocols such as addressing: Logical Addressing and Physical Addressing.
OSPF (Open Shortest Path First), BGP (Border Gateway Protocol), IS‐IS
(Intermediate System to Intermediate System) to determine best possible path
to data delivery.
Logical Addressing is done at Network Layer where sender and receiver IP
addresses are assigned to each data packet. Physical addressing is done at Data
Link Layer where MAC addresses of Sender and Receiver are assigned to each
data packet to the form of frame. 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 Access the Media (Framing): Consider two distant hosts, a laptop and a
software in NIC of a computer and provide means to transfer data from one desktop, communicating with each other. As laptop and desktop are connected
computer to another via a local media. Local media includes: Copper wire, to different networks, so they will use Network Layer Protocols, IP for example,
Optical Fiber or Air for radio signals. Please note: here media does not to communicate with each other. In this example, desktop is connected to
corresponds to audio, video, animation etc. It refers to the Physical links router R1 via Ethernet cable. Router R1 and R2 are connected via a satellite link
between two or more computers or networks. and laptop is connected to router R2 via a wireless link. Now desktop wants to
send some data to laptop. Based on the medium used to connect desktop and
Router R1, Data Link Layer add some data in head and tail of IP packet and
converts it to a Frame, an Ethernet Frame in this case. Router R1 receives this
Ethernet frame, de‐capsulate it to IP packet and then encapsulates it again to
a frame so that it can cross satellite link to reach Router R2. Router R2 will again
de‐capsulate the received frame and re‐encapsulated based on the medium
used to connect Router R2 and laptop, wireless Data Link Frame in this case.
Laptop receives wireless data link frame, de‐capsulate and then forward IP
packet to Network Layer and finally to Application Layer. Application Layer
Protocols then makes received data to be visible on computer screen.
The Data Link Layer performs two basic functions: It allows the upper layer to
access the media using techniques such as framing. And it control how data is
placed and received from the media using techniques such as media access
control and error detection.
So, Network Layer or higher level layers are able to transfer data over media
(which are: LAN Cable and Air in this case) with the help of Data Link Layer.
That is Data Link Layer provides access to media for higher layer of OSI model.
Data Link Layer also controls how Data is placed and received from the media.
To avoid this situation, data link layer keeps an eye on when the shared media
is free. So that device can transmit data for the receiver. This called Carrier
Sense Multiple Access (CSMA).
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.
So, Data Link Layer with its Media Access Control methods, controls Data
transmission. Tail of each frame contain Bits which are used to detect errors in
the received frame. These occur due to certain limitation of media used for
transferring data.
If two or more devices connected to a same media, 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.
At receiver side, Physical Layer receive signals, convert it into bits and pass it
to Data Link Layer as a frame and then to higher layers, finally to Application
Physical Layer: The last layer is Physical layer. Till now Data from Layer. Application Layer protocols makes the senders message visible in the
Application Layer has been segmented by Transport Layer, placed in to packets application in the receiver computer’s screen. In this way OSI model is helping
by Network Layer and framed by Data Link Layer which is a sequence of binary to transfer data between different hosts.
0s and 1s.
Physical Layer convert this binary sequence into signals and transmit over local
media. It can be an electrical signal in case of Copper Cable or LAN cable, Light
signal in case of Optical Fiber and Radio signal in case of Air as Local Media. So
signal generated by the Physical Layer depends on the type of Media used to So, these 7 layer of OSI model are lying behind the smooth functioning of
connect two devices. internet.