Layers in my Network?!

Author: Yi Yang (Intern)


How are we connected?


Right now you might be in the middle of sending an email. You might be listening to music or waiting to get queued for a video game- Whatever you’re doing, I know at the very least, you’re reading this blog right now. Have you ever wondered how this happens? What’s going on behind the scenes to make it possible for you to send emails, connect to others, and read the words I typed here from miles away?


My name is Yi, and I am a college student studying computer science. Recently, I was accepted for an internship at Project Reclass, a nonprofit organization that strives to prevent recidivism by helping incarcerated veterans learn computer networking and prepare for a Network+ certification. Coming in, I had no idea how networks worked. In fact, I never questioned how it worked- it just… worked? In order to contribute effectively to the upcoming design week where we as a team defined the specs of the network emulator, ToyNet, I decided to read up on the subject. One concept kept resurfacing, and it's also the topic of today's blog: the OSI Model.


What is the OSI Model?


OSI stands for Open Systems Interconnection model and it’s a conceptual framework to describe the functions of a network between devices. The OSI Model was published in 1984, when computer networking was still in development, by the International Organization for Standardization (ISO).


Why Does the OSI Model Matter?


The OSI model is an abstract, conceptual model of how networks should work. In practice, it isn’t as popular as another network model called the TCP/IP model. Why, then, is the OSI model important? The OSI model breaks up and fleshes out the details of networks into seven segments called layers that help explain how networks work. It isn’t possible to ignore the breakdown of the OSI model just because a protocol stack that only uses four/five layers abstracted from the model is more popular. In fact, the TCP/IP model is often called the 5 layer OSI model! Ultimately, the OSI and TCP/IP models are just that- models. They both provide a way to understand how networks process, send, and receive data. The main difference between these models is how much detail is given to each layer. By learning the OSI model and how these layers work, you can use it as a basis for troubleshooting by just understanding what happens at each level. Not only that, but knowledge of the OSI model allows you to communicate with others and be on the same page which will help work efficiency. It sets a good, complete foundation that makes it much easier to dive into more complicated networking topics, which is crucial.



Before We Begin


First, understanding what network protocols are is important to understanding how networks send data between endpoints. By definition, network protocols are an established set of rules that determines how data is to be transferred between different devices. This allows devices to communicate with each other regardless of inner structure and build because by following a set of rules to send data, the receiver can decode the data by following the same set of rules in reverse. Essentially, it connects one layer of one device to the same layer on another device. For example, when sending a message the sender’s data goes through a number of layers before getting translated into a bitstream of 0’s and 1’s. By using a communication protocol like Simple Mail Transfer Protocol (SMTP), the receiver of this bitstream is able to work backwards and piece the data together so that it ends up being the same message the sender saw before he pressed send.


The Layers


The OSI Layers go from top to bottom for the sender, and bottom to top for the receiver. What does this mean? The OSI model is made of seven layers that each perform an abstract function as follows:


Layer 7: Application


This is where the user interacts with the interface of the network. In this layer, a user interacts with end-user software which provides protocols like HTTP to send and receive data. In fact, the current browser you are using is a user-end software! They are HTTP clients that interpret HTTP and use it to transfer data.


Layer 6: Presentation


Think of this layer as the blueprint for the data that’s going to be presented to the user, or application layer. In this layer, data is prepared and translated for the application layer to read. Necessary encryption and compression of data is also done here to keep data small and secure.


Layer 5: Session


Like its name, the session channel creates sessions, which are open communication channels between devices. Its main responsibilities are not only to open sessions, but have them remain open while data is being transferred. However, sometimes a network connection can be lost, severing a session. Luckily, checkpoints can be set up in the session layer so that the user could continue where they last left off instead of having to start the transfer from the beginning!


Layer 4: Transport


Time to break things up! After the session sends data to the transport layer, the transport layer breaks it into pieces called “segments”. The transport layer then performs flow and error control by sending the segments at the connection speed of the receiving device (flow control) and checking if the data was received (error control). In the case of an error, the transport layer sends a request back for the data to be sent again. This layer is concerned with reliable and in-order delivery of data.


Layer 3: Network


When segments are delivered to the network layer, it is broken apart again into more pieces called “packets”. The network layer also helps route packets by searching and navigating the optimal path across physical networks. This is usually done through Internet Protocol (IP) addresses.


Layer 2: Data Link


Packets delivered to the data link layer are broken once again into “frames.” Sometimes when packets are delivered, they may be sent at the same time which is an error called domain collision. In response, devices must send the packets again, causing network inefficiency. To prevent this, the data link layer also handles collision domains.

Unlike the other layers, this layer is composed of two sub-layers: logical link control (LLC) and medium access control (MAC). The LLC communicates with the upper layers to receive network protocol data and forwards it to the MAC layer after frame multiplexing, the combination of multiple frames into one. This allows several network protocols to exist and be transported over to MAC which then allows network access technologies to communicate with each other so that the physical layer isn’t limited to just a specific medium like copper. Both the MAC and LLC are also in charge of flow and error control but it is important to note that the data link doesn’t deal with anything past a local area network; it focuses on local delivery.


Layer 1: Physical


The physical layer is literally what it sounds like- physical components! It consists of physical wires and cable connections that sends a bitstream of 0 and 1’s converted from frames to the physical layer of the receiving device. However, this also consists of data sent over the electromagnetic spectrum such as WiFi or satellite links. All this is done with some sort of hardware component such as a radio for sending data using the electromagnetic spectrum so you will find repeaters, network hubs, and more that help extend cable and signal capabilities in this layer.


Notice that everything that I just explained is for sending data between devices. For someone on the receiving end of data, it is the just the opposite of everything I stated. Instead of data moving down the layers, it is sent up the layers and the steps are reversed, such as piecing together frames from bitstreams and so on.



What Now?


Congratulations, you just learned the OSI Layers! I hope you had as much fun learning about networks as I did, but prepare to be shocked: everything I just told you was just the tip of the iceberg. When researching computer networks, it was daunting and surprising for me to learn that there are so many pieces to making everything functional. I had to be careful because some subtopics would lead me to a whole ocean of new terminologies and specific functions outside the scope of my research. Each of these seven layers consists of many topics that you can dive into for hours, and even then it will take practice to fully understand how networks function.

This doesn’t mean that it’s impossible or that it’s too late for you to learn computer networking. Being a visual learner, I had issues understanding some of the protocol stack like the data link layer but through many resources, I was able to understand its purpose. The OSI model gives a broad understanding of networks but all you need to find is one topic you have a passion for and with hard work and dedication nothing can stop you. At Reclass, we want to prevent the recidivism of incarcerated veterans and set them up for a bright future by providing as many resources as we can. That’s why we chose to invest in creating a tool for veterans to learn computer networking because it opens yet another opportunity to try out different career paths and a starting point for those that are interested.


Citations:


“7 Layers of The OSI Model (A Complete Guide).” Software Testing Help, 30 June 2020, www.softwaretestinghelp.com/osi-model-layers/.


ComputerNetworkingNotes. “Similarities and Differences between OSI and TCP/IP Model.” ComputerNetworkingNotes, ComputerNetworkingNotes, 20 Jan. 2019, www.computernetworkingnotes.com/ccna-study-guide/similarities-and-differences-between-osi-and-tcp-ip-model.html.


“Developer Help.” TCP/IP Five-Layer Software Model Overview - Developer Help, 10 July 2020, microchipdeveloper.com/tcpip:tcp-ip-five-layer-model.


“Layers of OSI Model.” GeeksforGeeks, 4 Feb. 2020, www.geeksforgeeks.org/layers-of-osi-model/.