Saturday, 3 June 2017

ISO/OSI model

 

So, finally, we have reached the heart of computer networks the ISO/OSI model. When it comes to networks you can ignore anything but not the OSI model. ISO/OSI stands for International Standard Organization/Open System Interconnect. We will get into details of OSI model but before that let me tell you what all things you will learn from this tutorial.
  • Why was OSI reference model proposed?
  • What is ISO/OSI reference model?
  • How the OSI model works?
  • What are the advantages of OSI model? 
  • All the 7 layers overview.

Why was OSI model proposed?

Late in 1970's when we had ARPANET Scientists working on ARPANET wanted a standard model for the internet. For that very reason, they started grouping various functions that are performed on the internet into two classes.
One set was called mandatory functions and other was called optional. The things included into mandatory and optional groups were like:

Mandatory
Optional
1. Error control 1. Encryption and decryption
2. Flow control 2. Checkpointing
3. Access control 3. Routing
.
.
.
.
.
.
.
.

After grouping them they found 70 different functions. The major problem now was when to perform which function. Questions like should Encryption be performed before checkpointing? Or Should access control be implemented before error control?. To overcome this dilemma OSI model was proposed.
There were two organisations namely ISO and CCITT. They proposed documents on two similar networking models on which they worked on. In 1983, these two documents were merged to form a standard called The Basic Reference Model for Open Systems Interconnection. The standard is usually referred to as the Open Systems Interconnection Reference Model, the OSI Reference Model, or simply the OSI model.
Ok now that you know why and how OSI model came into existence, so now let's look at what is OSI reference model.

What is OSI reference model?

Definition from Wikipedia:
The Open Systems Interconnection model (OSI model) is a conceptual model that characterises and standardises the communication functions of a computing system without regard to their underlying internal structure and technology.
If you didn't understand the above definition it simply means that OSI is a conceptual model meaning it doesn't have physical existence (like IP address) and it gives a standard that can be used by two communicating parties. And it is free of the underlying technology that is used for communication.

The OSI reference model has 7 layers:
You can learn all the seven layers name by memorising the following sentences:
1. Please Do Not Touch Steve's Pet Alligator.
2. Please Do Not Touch Sachin's Patni Anjali.
Let's talk very briefly about how does a packet travels in the network with the help of OSI model.

What happens at Application layer?

Initially, at the application layer, some data is generated. Now, this data could be anything like text, images, videos etc. It is generated by the user by use of some application. Like you can generate some text data by using a notepad on Windows OS, or you can generate some images by using a camera application. 
The data then is represented into a unique representation that is application and machine compliant. It is then forwarded to next layer. The application layer is the place which is totally dedicated to the user. This is where the user gives the commands to the network.

What happens at Presentation and session layer?

Now that your data is ready, you don't send the raw data directly.
  • At presentation layer, the data is encrypted (if you at source) (or decrypted (if you are a receiver)) before transmission.
  • Data is then passed through a character translation process, where ASCII code is converted to Absolute code or vice versa.
  • Compression and extraction are also performed depending on the network requirements or the user commands.
Now coming to the session layer. A lot of people think that it's used only to establish a session between sender and receiver but that's not true.
  • If we want to perform any authentication or authorization onto the packet it is done at the session layer. The data should be delivered to the required host for that we use authorisation and to check whether the data is coming from the valid host we use authentication (I have explained these topics in depth in Ipv6 topic). Using username and password are two very well known methods of authorization and authentication.
  • Checkpointing is another thing that is done at the session layer. You might have downloaded files from a torrent. While downloading the torrent software creates various checkpoints so that the download can be resumed from the last saved checkpoint. This is the reason you can set your movies for download for weeks without restarting the download everytime you start the computer.
  • Synchronisation is another important thing that is performed by the session layer. A lot of time you might have seen that there is the timing difference between the videos and the audios. Both audio and video are sent in two different files. They are synchronised at the receiver in session layer.
  • Dialogue control is another use of session layer. This is seen in web conferences. When two or more people try to speak at the same time there is a need to give access control to one person at a time.
If you are a computer science student you need not worry much about the above 3 layers. But Network layer, Transport layer, and data link layer are very important.

What happens at transport layer?

The answer to this question is big. Because a lot of things are performed at the transport layer. Here I will not go in-depth about these functions, it will be covered in a different post. Following are the responsibilities of transport layer:
  • End to end connectivity: Transport layer deals with port addresses. So when a packet is delivered to the receiver, it's the responsibility of the transport layer that the packet is delivered to appropriate port, after reaching the desired host.
  • Flow control: When a sender sends a packet it is the responsibility of the sender to send data at the appropriate rate. The data should not be sent at a speed at which the receiver can accept it. Selective repeat algorithm is used to implement flow control.
  • Error control: Checksum is used to find out errors in the error control.
  • Segmentation: It is a technique in which a packet is divided into smaller segments so that, the packet can travel on the network without going through many fragmentation processes.
  • Multiplexing and demultiplexing: When a packet arrives at a host there are many processes running in the system at different port numbers. It is the responsibility of the transport layer to deliver the packet to the destined processor port number.
  • Congestion control: It is used to control the congestion in the network. TCP congestion control is one the best algorithm for congestion control. Before this algorithm was discovered the internet used to come down every now and then and took a lot of time to recover.

What happens at network layer?

  • Host to host delivery of packet: Just like transport layer was used to deliver the packet to the required port number. The network layer is used to deliver it to required host.
  • Switching: A lot of people don't know what switching is. It is the process of decision making. It decides in which route should the packet be forwarded.
  • Routing: And routing is routing the packets in the network. It is building the routing table that is called as routing.
  • Congestion control: To control the traffic at routers we use congestion control.
  • Fragmentation: It is the most important topic when coming to the network layer. I will define it in a very brief way. Whenever the network onto another side of the router has lesser MTU, the router needs to break the packet into smaller packets. This process is called fragmentation.

What happens at data link layer?

  • Flow control: Go back N and SR are two popular techniques used at data link layer for flow control.
  • Error control: CRC and checksum are two techniques used for error control.
  • Framing: It is one the most important task of data link layer. When a datagram arrives from the network layer, it needs to be put into a frame at data link layer and then passed onto the physical layer. This is the same frame which we discussed in Ethernet topic.
  • Access control: CSMA/CD and Token passing are two most popular methods of access control. Although token passing is obsolete now.

What happens at physical layer?

  • The setting of channels such as simplex, half-duplex, full duplex.
  • The setting of topologies such as bus, star, mesh, hybrid.
  • Encoding is one another function performed at the physical layer.

That is all. I know this was a little brief. But I will very soon post on every layer of OSI. And yes if you learned something from this post please help me build my blog. Follow my blog and share the post as much as you can.

Thank you!