{"id":6814,"date":"2023-03-31T19:04:26","date_gmt":"2023-03-31T13:34:26","guid":{"rendered":"https:\/\/www.interviewbit.com\/blog\/?p=6814"},"modified":"2023-03-31T19:04:28","modified_gmt":"2023-03-31T13:34:28","slug":"osi-model","status":"publish","type":"post","link":"https:\/\/www.interviewbit.com\/blog\/osi-model\/","title":{"rendered":"OSI Model Explained"},"content":{"rendered":"\n<div class=\"gutentoc tocactive nostyle\"><div class=\"gutentoc-toc-wrap\"><div class=\"gutentoc-toc-title-wrap\"><div class=\"gutentoc-toc-title\">Table Of Contents<\/div><div id=\"open\" class=\"toggletwo\">show<\/div><\/div><div id=\"toclist\"><div class=\"gutentoc-toc__list-wrap\"><ul class=\"gutentoc-toc__list\"><li><a href=\"#introduction\">Introduction<\/a><\/li><li><a href=\"#what-is-osi-model\">What is OSI Model<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#characteristics-of-the-osi-model-\">Characteristics of the OSI Model&nbsp;<\/a><\/li><\/ul><li><a href=\"#osi-model-layers-7-layers-of-osi-model\">OSI Model Layers: 7 Layers of OSI Model<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#1-application-layer\">1. Application Layer<\/a><\/li><li><a href=\"#2-presentation-layer\">2. Presentation Layer<\/a><\/li><li><a href=\"#3-session-layer\">3. Session Layer<\/a><\/li><li><a href=\"#4-transport-layer\">4. Transport Layer<\/a><\/li><li><a href=\"#5-network-layer\">5. Network Layer<\/a><\/li><li><a href=\"#6-data-link-layer-\">6. Data-Link Layer <\/a><\/li><li><a href=\"#7-physical-layer\">7. Physical Layer<\/a><\/li><\/ul><li><a href=\"#conclusion\">Conclusion<\/a><\/li><\/ul><\/div><\/div><\/div><\/div>\n\n\n\n<h2 id=\"introduction\">Introduction<\/h2>\n\n\n\n<p>OSI stands for <strong>Open Systems Interconnection<\/strong>. It is a model that helps as the reference for Networking and was developed in 1984 by ISO. It provides a high-level overview that how to transfer data from one host to another host.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"478\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17562 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI-Model-1024x478.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI-Model-1024x478.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI-Model-300x140.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI-Model-768x358.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI-Model-380x177.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI-Model-550x257.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI-Model-800x373.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI-Model-150x70.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI-Model.png 1121w\" ><\/figure>\n\n\n\n<ul><li>Anything which is a part of the network which wants to communicate is called a <strong>Host.<\/strong><\/li><li><strong>The server <\/strong>is a special type of computer. It is also a Host when receiving data from clients. The server is something that a host receives data.<\/li><li>OSI Model is finalized between the 1970s and 1980s. And it is a reference model, which means, It acts as a reference guide to implement or form the network in the real world.<\/li><li>Based on the OSI model, the exact model that is implemented in the real world is <strong>TCP\/IP model.<\/strong><\/li><li><strong>OSI Model <\/strong>has <strong>7 different layers<\/strong>. And each layer has a bunch of protocols that need to be followed to implement a network in the real world.<\/li><li><strong>Protocols &#8211; <\/strong>A<strong> <\/strong>set of rules that everyone needs to be agreed upon.<\/li><\/ul>\n\n\n\n<p><strong>The network <\/strong>can be defined as the collection of interconnected computers usually we call it the Host which is communicating with ear other to share data.<\/p>\n\n\n\n<p><strong>Networking <\/strong>is the process of creating a network based on protocols, hardware, software, mediums, etc and the data flow of data between devices in the network.<\/p>\n\n\n\n<h2 id=\"what-is-osi-model\">What is OSI Model<\/h2>\n\n\n\n<p><strong>OSI Model <\/strong>follows the approach of a <strong>Layered system<\/strong>. That is something the researchers came up with while developing the OSI Model. OSI Model is based on the architecture called <strong>Philosopher translator Secratory Architecture<\/strong>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img  loading=\"lazy\"  width=\"601\"  height=\"629\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17563 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 601px) 100vw, 601px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Philosopher-translator-Secretary-Architecture.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Philosopher-translator-Secretary-Architecture.png 601w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Philosopher-translator-Secretary-Architecture-287x300.png 287w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Philosopher-translator-Secretary-Architecture-380x398.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Philosopher-translator-Secretary-Architecture-550x576.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Philosopher-translator-Secretary-Architecture-150x157.png 150w\" ><\/figure>\n\n\n\n<p>In this architecture, there are two philosophers (A and B) in different locations and they don\u2019t know the same languages and want to transmit a message. So some steps need to be followed by both to successfully send the message.<\/p>\n\n\n\n<ul><li>Philosopher A gives the message to his secretary and the secretory will convert the message into a common language that can be understood by the secretary in both locations.<\/li><\/ul>\n\n\n\n<ul><li>Then the converted message will be sent through Fax to Location B. And the secretary in location B will understand the message and pass it to the philosopher in the language the philosopher understands.<\/li><\/ul>\n\n\n\n<p>So this way communication happens in this architecture. So the same is followed in the OSI Model. Each layer states the different protocols that need to be followed for the successful transmission of the message.<\/p>\n\n\n\n<h3 id=\"characteristics-of-the-osi-model-\"><span id=\"characteristics-of-the-osi-model\">Characteristics of the OSI Model&nbsp;<\/span><\/h3>\n\n\n\n<p>OSI model is divided into 2 different groups. One group is the responsibility of the Host and Another one is the responsibility of the Network.<\/p>\n\n\n\n<p>The layers that come under the responsibility of the Host are &#8211;&nbsp;<\/p>\n\n\n\n<ul><li><strong>Application Layer<\/strong><\/li><li><strong>Presentation Layer<\/strong><\/li><li><strong>Session layer<\/strong><\/li><li><strong>Transport Layer<\/strong><\/li><\/ul>\n\n\n\n<p>And the layers that come under the responsibility of the Network are &#8211;&nbsp;<\/p>\n\n\n\n<ul start=\"5\"><li><strong>Network Layer<\/strong><\/li><li><strong>Data Link Layer<\/strong><\/li><li><strong>Physical Layer<\/strong><\/li><\/ul>\n\n\n\n<p>The responsibilities of the hosts are &#8211; Encryption, Session Management, Segmentation, Flow control, etc.<\/p>\n\n\n\n<p>And, the responsibilities of the network are like &#8211; path to router packet, congestion control, Network identification, etc.<\/p>\n\n\n\n<h2 id=\"osi-model-layers-7-layers-of-osi-model\">OSI Model Layers: 7 Layers of OSI Model<\/h2>\n\n\n\n<p>OSI Model has seven different layers that we have already discussed in the characteristics of the OSI Model. Now let\u2019s understand a more zoomed view of these layers &#8211;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img  loading=\"lazy\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17565 pk-lazyload\"  width=\"883\"  height=\"462\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 883px) 100vw, 883px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Layers-of-OSI-Model-1-1024x536.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Layers-of-OSI-Model-1-1024x536.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Layers-of-OSI-Model-1-300x157.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Layers-of-OSI-Model-1-768x402.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Layers-of-OSI-Model-1-380x199.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Layers-of-OSI-Model-1-550x288.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Layers-of-OSI-Model-1-800x419.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Layers-of-OSI-Model-1-1160x608.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Layers-of-OSI-Model-1-150x79.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Layers-of-OSI-Model-1.png 1201w\" ><\/figure>\n\n\n\n<h3 id=\"1-application-layer\">1. Application Layer<\/h3>\n\n\n\n<p>This layer deals with the application part. Applications that require communication with the network, then the protocols defined in the application layer will be followed by the applications for transmission of data.<\/p>\n\n\n\n<p>The Application Layer contains a bunch of protocols. The protocols are like this &#8211;&nbsp;<\/p>\n\n\n\n<ul><li><strong>Browser<\/strong> &nbsp; \u2014- HTTP \/ HTTPS, FTP<\/li><li><strong>Outlook<\/strong> &nbsp; \u2014- SMTP<\/li><li><strong>Skype<\/strong>&nbsp; \u2014- &nbsp; Skype Protocol<\/li><li><strong>Remote Desktop<\/strong>&nbsp; \u2014- Telnet, RDP.<\/li><\/ul>\n\n\n\n<p>These are all the software that runs on the client side.&nbsp; And have a set of protocols that are followed by the application based on its functionality for communication.<\/p>\n\n\n\n<ul><li><strong>HTTP &#8211; <\/strong>(Hypertext Transfer Protocol) is a protocol that is used to transmit web pages, images, text over the internet from a browser.\u00a0<\/li><li><strong>HTTPS &#8211; <\/strong>It is the secure version of HTTP. It says, securely transmits the data over the internet. Ex &#8211; password, card details, etc.<\/li><li><strong>FTP &#8211; <\/strong>(File Transfer Protocol) is used when we want to transfer a file from one computer to another computer.<\/li><li><strong>SMTP &#8211; <\/strong>(Simple Mail Transfer Protocol) is used to send and receive emails over the internet.<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"402\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17566 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/SMTP-1024x402.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/SMTP-1024x402.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/SMTP-300x118.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/SMTP-768x301.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/SMTP-380x149.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/SMTP-550x216.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/SMTP-800x314.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/SMTP-1160x455.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/SMTP-150x59.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/SMTP.png 1201w\" ><\/figure>\n\n\n\n<p>All these are open protocols that every browser uses to transfer data over the network. While some are proprietary protocols like &#8211; Skype Protocol which only skype uses. And also (RDP) Remote Desktop PC, which only Microsoft.<\/p>\n\n\n\n<p>So Application layer is a collection of protocols and based on the application, we use the appropriate protocols.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img  loading=\"lazy\"  width=\"580\"  height=\"144\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-6816 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 580px) 100vw, 580px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/image12-1.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/image12-1.png 580w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/image12-1-300x74.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/image12-1-380x94.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/image12-1-550x137.png 550w\" ><\/figure><\/div>\n\n\n\n<p><strong>Explanation &#8211; <\/strong>In the above figure, the Client communicates with the server. Here is the mail server, that operates on the application layer to handle the mail request from the client\/host.<\/p>\n\n\n\n<h3 id=\"2-presentation-layer\">2. Presentation Layer<\/h3>\n\n\n\n<p>The presentation layer is responsible for broadly <strong>3 tasks<\/strong> &#8211;<\/p>\n\n\n\n<ul><li><strong>Translation &#8211; <\/strong>It translates the data received from the application layer into the form of ASCII (American Standard Code for Information Interchange) Codes, or UNICODE to the Binary Format.\u00a0<ul><li><strong>Example &#8211;\u00a0 <\/strong>Data &#8211; Hello. So ASCII Code associated with it is <strong>72 101 108 108 111. <\/strong>And the next to the Binary Code will be &#8211; <strong>01001000\u00a0 01100101\u00a0 01101100\u00a0 01101100 01101111.<\/strong>\u00a0<\/li><li>So this is the first thing that the presentation layer will do post receiving data from the application layer.<\/li><\/ul><\/li><li><strong>Data Compression &#8211;\u00a0 <\/strong>In this what exactly happens is<strong>, <\/strong>Suppose after translation we get 1MB of Data. So Data Compression tries to reduce the size of the data without much loss of data because the less the size is the faster transmission can happen over the network.<ul><li><strong>Example &#8211;\u00a0 <\/strong>Suppose we have an image of size 1MB, Now Data Compression tries to reduce this file size to less than 1MB.<\/li><li>So this is also done by the Presentation Layer for better communication.<\/li><\/ul><\/li><li><strong>Encryption &#8211; <\/strong>The objective of encryption is to encrypt the data so that the data can\u2019t be understood by hackers that might see the data and misuse it.\u00a0 <strong>HTTPS <\/strong>uses SSL (Secure Socket Layer) protocols to encrypt the data. Secure Sockets Layer is a cryptographic protocol designed to provide communications security over a computer network.<ul><li><strong>Example &#8211; <\/strong>Suppose we want to transmit the password or any confidential data, then sending a plain text might not be secure. So presentation layer also secures this information by encryption and sends it over the network.<\/li><li><\/li><\/ul><ul><li>In the above image we can see that compression reduces the size of the image and the Message (Plain Text) is encrypted into the Encrypted text (Cipher Text). These are all done by the presentation layer.<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17571 pk-lazyload\"  width=\"972\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1006px) 100vw, 1006px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Encryption-1-edited.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Encryption-1-edited.png 1006w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Encryption-1-edited-300x188.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Encryption-1-edited-768x480.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Encryption-1-edited-380x238.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Encryption-1-edited-550x344.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Encryption-1-edited-800x500.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Encryption-1-edited-150x94.png 150w\" ><\/figure><\/div>\n\n\n\n<h3 id=\"3-session-layer\">3. Session Layer<\/h3>\n\n\n\n<p>Session Layer manages the session management of the network connection. It does a bunch of things &#8211;&nbsp;<\/p>\n\n\n\n<ul><li><strong>Establish, Manage and Terminate Connection &#8211;<\/strong><ul><li><strong> <\/strong>Establishment of Connection means making a connection in which both server and client have agreed to transfer the data.<\/li><li>Managing Connection states getting knowledge of the connections which was established and the data transfer can be done effectively.<\/li><li>In Terminating the connection, after the data transfer completes then the connection must be terminated.<\/li><\/ul><\/li><li><strong>Authorization and Authentication &#8211; <\/strong><ul><li>Authorization states valid user id or password or not. Authorization states after the authentication, whether the user has permission to access the particular file or not.<\/li><\/ul><\/li><li><strong>Example &#8211;<\/strong><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img  loading=\"lazy\"  width=\"653\"  height=\"629\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17572 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 653px) 100vw, 653px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authorization.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authorization.png 653w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authorization-300x289.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authorization-380x366.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authorization-550x530.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authorization-150x144.png 150w\" ><figcaption>Authorization<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img  loading=\"lazy\"  width=\"667\"  height=\"629\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17573 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 667px) 100vw, 667px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authentication.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authentication.png 667w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authentication-300x283.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authentication-380x358.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authentication-550x519.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Authentication-150x141.png 150w\" ><\/figure>\n\n\n\n<ul><li><strong>Explanation &#8211; <\/strong><ul><li>In the above images, The person wants to enter the office then the security personnel will ask the person to authenticate himself. The person provides the User Id and password to authenticate. So this is called authentication. To check whether the person is the right person or not.\u00a0<\/li><li>On the other image after authentication, the security personnel will verify whether the person has the authority to go inside or not. If it has authority then the person can go. Otherwise don\u2019t.<\/li><li>So the same approach is followed in the session layer of the OSI Model, which also helps to authenticate and check authorization to allow access.<\/li><\/ul><\/li><\/ul>\n\n\n\n<p>Most modern browsers take care of all the 3 layers<strong>: Application, Presentation, and Session. <\/strong>Browsers are like &#8211; Chrome, Firefox, etc.<\/p>\n\n\n\n<h3 id=\"4-transport-layer\">4. Transport Layer<\/h3>\n\n\n\n<p>The transport layer manages whatever data comes from the above top layer, It performs something called &#8211;<\/p>\n\n\n\n<ol><li><strong>Segmentation &#8211; <\/strong>Segments are the small groups of data that are divided from the large data. Suppose we have 10 MB of data then the whole 10MB data is divided into segments supposing 1MB each.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"324\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17574 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Segmentation-1024x324.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Segmentation-1024x324.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Segmentation-300x95.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Segmentation-768x243.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Segmentation-380x120.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Segmentation-550x174.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Segmentation-800x253.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Segmentation-1160x367.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Segmentation-150x47.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Segmentation.png 1201w\" ><\/figure>\n\n\n\n<p><strong>Why Segmentation? &#8211; <\/strong>The big question arrives is why the data is divided into segments. Why can\u2019t the whole lot is being sent on a go?<\/p>\n\n\n\n<ul><li>It is because the protocols that are used in the Transport layer like (TCP, UDP), Each has different sizes of segments.<\/li><li>Segmentation does that if the data is divided into pieces, then it is more manageable.<\/li><li>Each segment must be given a number because, in transportation, It may not the situation that the segment arrives in the same sequence.<\/li><li>On the other end in Transport Layer, If a segment has a number then it will be easy to send the data over the medium.<\/li><li>Each Segment contains the port number that needs to identify the hat software did access this data that is sent to the network.<\/li><li>A general segment looks like &#8211;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"412\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17576 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1024x412.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1024x412.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-300x121.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-768x309.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1536x618.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-380x153.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-550x221.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-800x322.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1160x467.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-150x60.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11.png 1874w\" ><\/figure>\n\n\n\n<ul><li>A browser typically uses Port no 80 for HTTP Requests.<\/li><\/ul>\n\n\n\n<p>2. <strong>Flow Control &#8211; <\/strong>Flow control means managing the flow of data that is transmitted between one host to another host.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"340\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17577 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Flow-Control-1024x340.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Flow-Control-1024x340.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Flow-Control-300x100.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Flow-Control-768x255.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Flow-Control-380x126.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Flow-Control-550x183.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Flow-Control-800x266.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Flow-Control-1160x385.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Flow-Control-150x50.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Flow-Control.png 1201w\" ><\/figure>\n\n\n\n<ul><li>Suppose Sender is sending data to Reciever @10MBPS Transfer Rate. But the receiver can\u2019t able to process the data @10MBPS. It can only process data @1MBPS.&nbsp;<\/li><li>So the receiver will ask the server for a <strong>1MBPS<\/strong> Transfer rate, As it can\u2019t process the data. Then sender sends the data <strong>@1MBPS Rate.&nbsp;<\/strong><\/li><li>So this is called <strong>Flow Control.<\/strong><\/li><\/ul>\n\n\n\n<p>3. <strong>Error Control &#8211; <\/strong>It controls the error of data. This means in case there is any inconsistency happened on the data then it helps to correct that data.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"255\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17578 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Error-Control-1024x255.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Error-Control-1024x255.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Error-Control-300x75.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Error-Control-768x191.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Error-Control-380x95.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Error-Control-550x137.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Error-Control-800x199.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Error-Control-1160x289.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Error-Control-150x37.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/Error-Control.png 1201w\" ><\/figure>\n\n\n\n<ul><li>Suppose Sender is sending some data considering 4 segments. Now in case, the 3rd segment got lost in the medium. So Error control helps to fix that.\u00a0<\/li><li>It has some algorithms that help to fix this data. Like Automatic Repeat Request. In which the segment hasn&#8217;t receiver to the receiver. Then it will ask to resend it.<\/li><li>Data loss can happen in the physical network, So errors are recognized and controlled by the transport layer.<\/li><li>Other than these general things, the Transport layer also performs the merging of the data in the packet which is received from the Network layer. And it merges according to the sequence number.<\/li><li>And then it sends the data to the above layer to the particular application it has been associated with. Using the port number.<\/li><\/ul>\n\n\n\n<h3 id=\"5-network-layer\">5. Network Layer<\/h3>\n\n\n\n<p>The network layer&#8217;s main task is to recognize the network in which the data has to be transmitted. It has something called a packet. And Packets is made up of the data received from the above layer. Is encapsulated with the Headers in which the source and Destination IP address is mentioned.&nbsp;<\/p>\n\n\n\n<p>After encapsulating the segment with the source and destination I.P. Address. It generates the packet. So the general packet looks like this &#8211;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"412\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17579 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1-1024x412.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1-1024x412.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1-300x121.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1-768x309.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1-1536x618.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1-380x153.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1-550x221.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1-800x322.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1-1160x467.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1-150x60.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_image-11-1.png 1874w\" ><\/figure>\n\n\n\n<p><strong>What is IP Address? <\/strong><\/p>\n\n\n\n<ul><li>It is the address that the network system has uniquely identified. It is the 32-bit or 4-byte address (in IPv4) and each byte has an address range of 0-255, called an <strong>octet<\/strong>.<\/li><li>So the task of the network layer is to provide the IP Address to each host. And it also does something called <strong>Routing<\/strong>.<\/li><\/ul>\n\n\n\n<p><strong>What is Routing? <\/strong><\/p>\n\n\n\n<ul><li>Routing means setting the path of the packet to reach from the sender to the receiver.<\/li><li><strong>Explanation<\/strong>:<\/li><\/ul>\n\n\n\n<p><strong>How do Routers do that?<\/strong>\u00a0 \u00a0 <\/p>\n\n\n\n<ul><li>The router does this, When a router gets the destination IP address and then performs something called masking.&nbsp;<\/li><\/ul>\n\n\n\n<p><strong>What is Masking?<\/strong><\/p>\n\n\n\n<ul><li>Masking<strong> <\/strong>is a simple bitwise operation. The router sets some bits to 0 and performs a bitwise AND operation, and after masking on the destination IP address, it will get the network IP Address.&nbsp;<\/li><li>Now with the help of the network IP address, it will decide the next router for the packet it has to send.<\/li><\/ul>\n\n\n\n<p><strong>How does the network layer encapsulate the packet with the IP Address? <\/strong><\/p>\n\n\n\n<ul><li>There is something called DNS. Domain Name System, that provides the IP address corresponding to the domain name it has been requested for.<\/li><\/ul>\n\n\n\n<p><strong>Path Determination &#8211; <\/strong><\/p>\n\n\n\n<ul><li>What it means is actually that, there could be multiple ways from which I can send one packet to the destination. The objective of path determination is to determine the best path so that I can send this packet very very efficiently in less time.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"410\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17580 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/1-1024x410.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/1-1024x410.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/1-300x120.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/1-768x308.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/1-380x152.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/1-550x220.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/1-800x321.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/1-1160x465.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/1-150x60.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/1.png 1200w\" ><\/figure>\n\n\n\n<ul><li>So here in the above figure, we have multiple nodes from the host to the server. So routers help to determine the path that needs to be followed so the packet reaches the destination efficiently.<\/li><li>So routers use algorithms used in graph theory, like minimum spanning tree, shortest path, etc.<\/li><\/ul>\n\n\n\n<p>Other than this, While receiving the data the network layer also checks for the data it received from the (Data-link Layer). It extracts the data from the header and sends that to the above layer (usually to the host part) [Transport Layer].<\/p>\n\n\n\n<h3 id=\"6-data-link-layer-\"><span id=\"6-data-link-layer\">6. Data-Link Layer <\/span><\/h3>\n\n\n\n<p>The packet which is sent from the Network layer, And on that packet the headers are added along with the MAC Address of Source and Destination.<\/p>\n\n\n\n<ul><li><strong>MAC Address <\/strong>&#8211; (Media Access Control) is the 48-bit or 6-Bytes long containing the Hexadecimal code. It is the address assigned uniquely to each of the network devices.&nbsp;<\/li><li>MAC address is also called physical address because it contains the address of the physical network device from which data is going to be transmitted.<\/li><li>It is assigned to the network devices such as NIC(Network Interface Card) WiFi Card, USB WiFi Dongle, etc. by the manufacturer.&nbsp;<\/li><\/ul>\n\n\n\n<p>After encapsulating the packet from the network layer with the Source and Destination MAC Adress. Data-Link Layer generates a <strong>Frame<\/strong>. And that frame is sent to the next layer for data to send to the destination. A general frame looks like &#8211;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"180\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17581 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-1024x180.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-1024x180.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-300x53.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-768x135.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-1536x271.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-2048x361.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-380x67.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-550x97.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-800x141.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-1160x204.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1-150x26.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/A-Segment-1.png 2242w\" ><\/figure>\n\n\n\n<p><strong>Why MAC Address? <\/strong>MAC address helps to uniquely identify the device. Suppose in the network, the packet is received, then which particular device belongs to. So the MAC address helps to identify this.<\/p>\n\n\n\n<p>Other than this, Data-Link Layer also have some broadcast &#8211;&nbsp;<\/p>\n\n\n\n<p>1.<strong>Access to Media &#8211; \u00a0 <\/strong>Media are like &#8211; (Copper Wire, Fiber Optical Cable, Wireless), etc. So the data link layer has access to these media such that it can detect congestion, Error, Collision, etc.<\/p>\n\n\n\n<p>2. <strong>Media Access Contol &#8211; <\/strong>It also helps to control the medium such that when to transmit the data.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"661\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17582 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9-1024x661.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9-1024x661.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9-300x194.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9-768x496.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9-1536x991.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9-380x245.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9-550x355.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9-800x516.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9-1160x749.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9-150x97.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/OSI_Image-9.png 1909w\" ><\/figure>\n\n\n\n<ul><li>In the above figure. Multiple Host is connected to the same router. Now if all the hosts send the packet to the router then it will be a collision.<\/li><\/ul>\n\n\n\n<ul><li>Not all are allowed to send packets at the same time.<\/li><\/ul>\n\n\n\n<ul><li>So what Media Access Control does is that It checks for the medium (wired or wireless) whether it is free or not. If it is free then the particular host will send data to the router else the host will have to wait.<\/li><\/ul>\n\n\n\n<p>3. <strong>Error Detection &#8211; <\/strong>It is the mechanism to detect any error on the data. This means checking whether the data is correctly received or not.<\/p>\n\n\n\n<p>Some algorithms help to check that. Like &#8211; CRC (Cyclic redundancy check), Checksum, Bit Parity, etc.<\/p>\n\n\n\n<ul><li>These all are 3 activities stated above are the general thing that the Data Link layer does. Now on the time of receiving the data in the form of a Stream of bits from the physical layer. It checks for the header and identifies the MAC address that does belong to the same device or not.<\/li><li>If it belongs to the same device then It extracts the data part from the Frame and sends it to the above layer (Network Layer).<\/li><\/ul>\n\n\n\n<h3 id=\"7-physical-layer\">7. Physical Layer<\/h3>\n\n\n\n<ul><li>The Data Link layer gives a frame. And that frame needs to be transmitted to the destination. And the data are in the form of bits. So physical layer converts that data into an appropriate signal and transmits the data.&nbsp;<\/li><li>Physical Layer also deals with the encoding of the stream of bits into the signals. The appropriate signal can be said to be the data into the form of an electrical pulse or laser beam, etc.<\/li><li>These signals are categorized based on the type of medium. Like for Wireless &#8211; A Radiofrequency is there in which the data is in the form of a frequency wave. Other in Wired &#8211; Optical Fiber Cable &#8211; Data will be the form of laser beam etc.<\/li><li>There are many encoding schemes in which the data is encoded. Like &#8211; Manchester Encoding (As per G.E. Thomson and also IEEE 802.3 Encoding Scheme), Differential Manchester Encoding Scheme. Etc<\/li><li>Other, on the receiver side, the physical layer accepts the electrical signal that is received, Decodes that signal and makes to a stream of bits, and sends it to the upper layer (Data Link Layer).<\/li><\/ul>\n\n\n\n<p><strong>Explanation &#8211;<\/strong> In the below image, Data is encoded into the manchester encoding form according to the clock pulse.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"536\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-17583 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/8-1024x536.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/8-1024x536.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/8-300x157.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/8-768x402.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/8-380x199.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/8-550x288.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/8-800x419.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/8-1160x608.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/8-150x79.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/03\/8.png 1201w\" ><\/figure>\n\n\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>OSI Model is the basic model that acts as the reference model for the implementation of the network or designing of the network in the real world.<\/p>\n\n\n\n<p>There is the same model that is implemented in the real world called TCP\/IP model with the layers stated in the OSI model. In this, various algorithms help in the transmission of data from a host to the destination.<\/p>\n","protected":false},"excerpt":{"rendered":"Introduction OSI stands for Open Systems Interconnection. It is a model that helps as the reference for Networking&hellip;\n","protected":false},"author":5,"featured_media":6820,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_daextam_enable_autolinks":"1","csco_singular_sidebar":"","csco_page_header_type":"","csco_appearance_grid":"","csco_page_load_nextpost":"","csco_post_video_location":[],"csco_post_video_location_hash":"","csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0},"categories":[974],"tags":[988,986,987],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/6814"}],"collection":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/comments?post=6814"}],"version-history":[{"count":12,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/6814\/revisions"}],"predecessor-version":[{"id":17585,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/6814\/revisions\/17585"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/media\/6820"}],"wp:attachment":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/media?parent=6814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/categories?post=6814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/tags?post=6814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}