
The OSI reference model was developed by the International Organization
for Standardization (ISO), and it has seven layers in all. The layers are as
follows
• Application (layer 7) |
• Presentation (layer 6) |
• Session (layer 5) |
• Transport (layer 4) |
• Network (layer 3) |
• Data link (layer 2) |
• Physical (layer 1) |
Let’s briefly try to understand how this model works. Suppose a user tries to open a web page. The first thing he does is send
a request to the server that is located several thousand miles away. Here the server’s hard disk or hardware is the last layer (layer 1), which is termed physical. So, the user’s request first knocks on the application layer (7) door, which is the nearest, and then it proceeds.
Every process in each layer involves a complicated “bits and bytes” functioning. A computer only understands zeros and ones.
Let’s break the process into more detail. In the application layer (7),
the user interacts with the device, which
could be a personal computer or smartphone or anything you might think of. So, the application layer basically handles the user’s interaction. The name of the datagram is data. The user requests the data and ultimately retrieves the
data. What happens when the user sends a request from layer 7? The request enters the next layer (6),
which is the presentation layer. The process of encapsulation starts. Data is formatted and encrypted. Next,
layer 5, which is the session layer, enters the scene. This layer manages the end-to-end communication. Suppose you type a password and log into
your social media account. This layer maintains the end-to-end (user-to-server) communication so that you can remain logged into your page. Up until this layer, the name of the datagram is data. To assist you in maintaining your session, the next three layers work
very hard. They are transport (layer 4), network (layer 3), and data link (layer 2). The name of the datagram at the transport layer is segment. Why this is called segment? It is called segment because it breaks your request into several fractions. First, it adds source and destination port numbers. Next, it tries to make it reliable by adding sequence numbers. So, in a nutshell, it provides flow control, sequencing, and reliability. What happens next? Your request enters layer 3, which is called network.
The name of the datagram is now packet. This layer adds source and destination IP addresses. It also helps your request find the best path to reach thedestination.
Now your data request has almost reached the final stage. It enters into layer 2, which is the data link layer. It is nearing the endpoint, which is the server’s hardware. So, this layer adds source and destination Media Access Control (MAC) addresses. Next, it goes through Frame Check System (FCS) processes. It checks frame by frame whether the source requests have reached the right destination. That is why the datagram is known as frame. It now enters its final destination, which is layer 1, or the physical layer. There are only bits over the physical medium. The name of the datagram is now bits and bytes. Imagine a small office with one router, two switches, and a few desktops, laptops, printers, and servers. The router is connected to the switches, and the switches are connected to the devices such as desktops, laptops, printers, and servers. Here desktops, laptops, printers, and servers belong to layer 1, which is physical. The switches belong to layer 2, which is data link, and the router fits in layer 3,
which is network. Chapter 4 Know Your Network 68
Routers are layer 3 devices and perform a few definite tasks. They do packet switching, packet filtering, and provide a path of selecting and finally communicating. The task of packet switching involves the process of getting a packet to the next devices. Here the next devices are the switches. Packet filtering suggests in its name what it does.
It either permits or blocks packets depending on certain criteria. Path selecting is determining the best path through the network to the destination. Communication is another important part of this layer. Routers communicate with other networks like the Internet. Between routers (layer 3 devices) and the end application (physical
layer 1) devices, there are switches, which are layer 2 devices. In some cases, switches perform the task of layer 3 devices. Switches basically deal with frame filtering and forwarding. They also maintain the connection between layer 3 and layer 1.