Signup/Sign In

Network Layer in Computer Networks

In this tutorial, we will be covering the concept of the Network Layer of the OSI Model.

Network Layer is layer 3 of the OSI reference model. The network layer controls the operation of the subnet. The main aim of this layer is to deliver packets from source to destination across multiple links (networks). It routes the signal through different channels to the other end and acts as a network controller.

As the data link layer oversees the delivery of the packets between two systems on the same network; the network layer mainly ensures that each packet gets from its point of origin to the final destination.

It also divides the outgoing messages into packets and to assemble incoming packets into messages for higher levels.

In broadcast networks, the routing problem is simple, so the network layer is often thin or even non-existent.

If two computers (system) are connected on the same link, then there is no need for a network layer. But in case if two systems ate attached to different networks(links) with connecting devices between the networks(links), then there is a need for the network layer in order to accomplish the source-to-destination delivery.

Figure: Network Layer

The main responsibility of the network layer is to deliver individual packets from the source host to the destination host.

Responsibilities/Functions of Network Layer

Given below are some other responsibilities of the Network layer.

  1. The network layer breaks the larger packets into small packets.

  2. Connection services are provided including network layer flow control, network layer error control, and packet sequence control.

  3. Logical Addressing
    Physical addressing implemented by the data link layer handles the problem of addressing locally. A header is added by the Network layer to the packet coming from the upper layer that also includes logical addresses of the sender and the receiver.

  4. Routing
    At the time when independent networks or links are connected together in order to create internetworks/large network, then the routing devices(router or switches) route the packets to their final destination. This is one of the main functions of the network layer.

Services provided by the Network Layer

1. Guaranteed delivery of Packets
The network layer guarantees that the packet will reach its destination.

2. Guaranteed delivery with the bounded delay
It is another service provided by the network layer and it guarantees that the packet will surely be delivered within a specified host-to-host delay bound.

3. Transfer of packets in Order
According to this service, it is ensured that packets arrive at the destination in the same order in which they are sent by the sender.

4. Security
Security is provided by the network layer by using a session key between the source host and the destination host.

Advantages of Network Layer Services

Given below are some benefits of services provided by the network layer:

  • By forwarding service of the network layer, the data packets are transferred from one place to another in the network.

  • In order to reduce the traffic, the routers in the network layer create collisions and broadcast the domains.

  • Failure in the data communication system gets eliminated by packetization.

Disadvantages of Network layer Services

  • In the design of the network layer, there is a lack of flow control

  • In the network layer, there is a lack of proper error control mechanisms; due to the presence of fragmented data packets the implementation of error control mechanism becomes difficult.

  • Due to the presence of too many datagrams there happens occurrence of congestion.

Source-to-destination delivery

Let us understand the illustration of Source-to-destination delivery by the network layer:

In the above figure, the network layer at the A node sends the packet to the network layer at the B node. When the packet arrives at router B then the router makes the decision of the path based on the final destination that is the F node of the packet transmitted. Router B makes use of its routing table for finding the next hop that is router E. The Network layer at node B sends the packet to the network layer at E which then sends the packet to the network layer at F.

Design Issues with Network Layer

  • A key design issue is determining how packets are routed from source to destination. Routes can be based on static tables that are wired into the network and rarely changed. They can also be highly dynamic, being determined anew for each packet, to reflect the current network load.

  • If too many packets are present in the subnet at the same time, they will get into one another's way, forming bottlenecks. The control of such congestion also belongs to the network layer.

  • Moreover, the quality of service provided(delay, transmit time, jitter, etc) is also a network layer issue.

  • When a packet has to travel from one network to another to get to its destination, many problems can arise such as:

    • The addressing used by the second network may be different from the first one.

    • The second one may not accept the packet at all because it is too large.

    • The protocols may differ, and so on.

  • It is up to the network layer to overcome all these problems to allow heterogeneous networks to be interconnected.

About the author:
Aspiring Software developer working as a content writer. I like computer related subjects like Computer Networks, Operating system, CAO, Database, and I am also learning Python.