Network Layer in Computer Network


  • This is the third layer in OSI model in computer networking.
  • Network layer provides support for end to end communication (helps to forward the packets from source to destination) by using routers and switches.
  • Network layer manages the Quality of Services (QoS).
  • The service provided by the network layer to the transport layer is called as network service.
  • Support for Inter-networking: It is possible as the physical and data link layer work together to deliver the data packets from one node to another node in the network.
The three important functions of Network Layer are:

1. Path determination
When packet moves from source to destination, the network layer must determine the route or path taken by the packets.

2. Forwarding function
When packet reaches at the input of the router, then the router should move the packet to an appropriate link.

3. Call setup
Some networks require the router call setup along with the path, before the data flow.

Internet as a connectionless protocol

  • The connectionless network services are also known as datagrams.
  • The internet at the network layer works as packet-switched network.
  • Internet routes the packets by using universal address defined in the network layer.
  • In connectionless service, the network layer protocol operates each packet independently.
  • The internet is built from several heterogeneous networks. So, it is not possible to create a connection between the source and destination, before knowing the nature of the network.


  • The Internet Protocol version 4 (IPv4) is a connectionless protocol which is used for delivery mechanism (used by TCP/ IP protocols).
  • The IPv4 is an unreliable protocol, but to make it reliable IPv4 is paired with a reliable protocol such as TCP.
  • The IPv4 uses the datagram approach which means, that each datagram is handled independently and each datagram can follow the different route to the destination. Due to this, the datagrams sent from the same source to the same destination can  reach at any order while some may get lost.


  • Packets in the IPv4 layer are called as datagrams.
  • A datagram is a variable- length packet  consists of header and data.
  • The size of header is 20 to 60 bytes, which is essential for routing and delivery.


  • The data travels through the different networks. Each router first decapsulates the IPv4 datagram from the received frame, then process it and again encapsulates in the another frame.
  • The format and the size depends on the protocol used by the physical network through which it is going to travel.

Maximum Transfer Unit

When a datagram is encapsulated in a frame, the total size of the datagram should be less than maximum size, which is defined or restricted by the hardware and software used in the network.

maximum transfer unit

Shortfalls of IPv4

IPv4 is well designed, but has some shortfalls, which are listed below:
  • The real-time audio and video transmission should properly work on the Internet. This type of transmission needs minimum delay strategies and reservation of the resources, which are not provided in IPv4.
  • Encryption and authentication facility is not provided in the IPv4.
  • Address depletion problem.