In the previous tutorials, we have seen the introduction to the ISO/OSI stack, the interaction between the layers and the details of physical layer and data link layer.
In this tutorial, we will be looking at the network layer protocol in greater detail. This is a very important layer not just in computer networks but also for GATE. Many questions have been asked from this. So it is important to understand each and every details.
The network layer is also called the third layer in the ISO/OSI stack model.
Let us look at the main responsibilities of the network layer protocol:
- Host to Host connectivity: Unlike a Data link layer which is responsible for hop to hop connectivity, network layer is responsible for host to host i.e. node to node delivery of data.
- Logical Addressing: The network layer does not have access to the physical address or the MAC address. It has access to IP Addresses only.
- Switching: Connecting various networks together in an organised manner and then taking a packet from one network and deciding which network to send to is called switching.
- Routing: The switches are called routers. In order to decide which way to send the packet, we need the routing tables. Routing tables contain the data that if a packet comes which network it should be sent to. Please don’t get confused with routing and switching. Building a routing table is called routing and using the routing table is called switching.
- Congestion Control: When lots of packets arrive after the buffers are full and we can’t do anything other than discarding the packet. Thus, we need congestion control mechanisms to manage the traffic of the data.
- Fragmentation: Assume a token ring is connected to the Ethernet. In order to connect two different LAN of different topologies, we have to interoperate. It is a point worth noting that maximum data in an Ethernet frame should not exceed 1500B. Maximum data that token ring can send at a time depends upon token holding time. But assume, the data size is more than 1500B then it definitely can’t go in as a one whole packet. It has to be divided. This is called fragmentation.
Exercises on Network Layer Protocol
Assume that source S and destination D are connected through one intermediate router labelled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D.
Where, PL – physical layer
DLL – data link layer
NL – network layer
TL – transport layer
AL – application layer
Router is a network layer device. Thus, it visits network layer ones and the physical layer and data link layer twice each. The source and the destination each visits every layer ones. These were the responsibilities of the network layer protocol.