Open In App

Network Layer Services- Packetizing, Routing and Forwarding

Last Updated : 27 Apr, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Pre-Requisite: OSI Model

The network Layer is the third layer in the OSI model of computer networks. Its main function is to transfer network packets from the source to the destination. It is involved both the source host and the destination host. At the source, it accepts a packet from the transport layer, encapsulates it in a datagram, and then delivers the packet to the data link layer so that it can further be sent to the receiver. At the destination, the datagram is decapsulated, and the packet is extracted and delivered to the corresponding transport layer. 

Features of Network Layer

  1. The main responsibility of the Network layer is to carry the data packets from the source to the destination without changing or using them. 
  2. If the packets are too large for delivery, they are fragmented i.e., broken down into smaller packets. 
  3. It decides the route to be taken by the packets to travel from the source to the destination among the multiple routes available in a network (also called routing). 
  4. The source and destination addresses are added to the data packets inside the network layer. 

Services Offered by Network Layer

The services which are offered by the network layer protocol are as follows: 

  1. Packetizing
  2. Routing 
  3. Forwarding

1. Packetizing

The process of encapsulating the data received from the upper layers of the network (also called payload) in a network layer packet at the source and decapsulating the payload from the network layer packet at the destination is known as packetizing. 

The source host adds a header that contains the source and destination address and some other relevant information required by the network layer protocol to the payload received from the upper layer protocol and delivers the packet to the data link layer. 

The destination host receives the network layer packet from its data link layer, decapsulates the packet, and delivers the payload to the corresponding upper layer protocol. The routers in the path are not allowed to change either the source or the destination address. The routers in the path are not allowed to decapsulate the packets they receive unless they need to be fragmented.  

Packetizing

Packetizing

2. Routing

Routing is the process of moving data from one device to another device. These are two other services offered by the network layer. In a network, there are a number of routes available from the source to the destination. The network layer specifies some strategies which find out the best possible route. This process is referred to as routing. There are a number of routing protocols that are used in this process and they should be run to help the routers coordinate with each other and help in establishing communication throughout the network.

Routing

Routing

3. Forwarding

Forwarding is simply defined as the action applied by each router when a packet arrives at one of its interfaces. When a router receives a packet from one of its attached networks, it needs to forward the packet to another attached network (unicast routing) or to some attached networks (in the case of multicast routing). Routers are used on the network for forwarding a packet from the local network to the remote network. So, the process of routing involves packet forwarding from an entry interface out to an exit interface.

Forwarding

Forwarding

Difference between Routing and Forwarding

Routing                                                                                                                                                                    Forwarding                                                                                                                                                         
Routing is the process of moving data from one device to another device. Forwarding is simply defined as the action applied by each router when a packet arrives at one of its interfaces.
Operates on the Network Layer. Operates on the Network Layer.
Work is based on Forwarding Table. Checks the forwarding table and work according to that.
Works on protocols like Routing Information Protocol (RIP) for Routing. Works on protocols like UDP Encapsulating Security Payloads

Other Services Expected from Network Layer

  1. Error Control
  2. Flow Control
  3. Congestion Control

1. Error Control

Although it can be implemented in the network layer, it is usually not preferred because the data packet in a network layer may be fragmented at each router, which makes error-checking inefficient in the network layer.

2. Flow Control

It regulates the amount of data a source can send without overloading the receiver. If the source produces data at a very faster rate than the receiver can consume it, the receiver will be overloaded with data. To control the flow of data, the receiver should send feedback to the sender to inform the latter that it is overloaded with data. 
There is a lack of flow control in the design of the network layer. It does not directly provide any flow control. The datagrams are sent by the sender when they are ready, without any attention to the readiness of the receiver. 

3. Congestion Control

Congestion occurs when the number of datagrams sent by the source is beyond the capacity of the network or routers. This is another issue in the network layer protocol. If congestion continues, sometimes a situation may arrive where the system collapses and no datagrams are delivered. Although congestion control is indirectly implemented in the network layer, still there is a lack of congestion control in the network layer. 

Advantages of Network Layer Services

  • Packetization service in the network layer provides ease of transportation of the data packets. 
  • Packetization also eliminates single points of failure in data communication systems. 
  • Routers present in the network layer reduce network traffic by creating collision and broadcast domains. 
  • With the help of Forwarding, data packets are transferred from one place to another in the network. 

Disadvantages of Network Layer Services

  • There is a lack of flow control in the design of the network layer. 
  • Congestion occurs sometimes due to the presence of too many datagrams in a network that is beyond the capacity of the network or the routers. Due to this, some routers may drop some of the datagrams, and some important pieces of information may be lost. 
  • Although indirect error control is present in the network layer, there is a lack of proper error control mechanisms as due to the presence of fragmented data packets, error control becomes difficult to implement.  


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads