Open In App

Network Layer Services

Last Updated : 27 Jan, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

The network layer is a part of the communication process in computer networks. Its main job is to move data packets between different networks. It helps route these packets from the sender to the receiver across multiple paths and networks. Network-to-network connections enable the Internet to function. These connections happen at thenetwork layer which sends data packets between different networks. In the 7-layer OSI model, the network layer is layer 3. The Internet Protocol (IP) is a key protocol used at this layer, along with other protocols for routing, testing, and encryption.

Services Offered by Network Layer

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

1. Assigning Logical Address

Logical addressing is the process of assigning unique IP addresses (IPv4 or IPv6) to devices within a network. Unlike physical addresses (MAC addresses), logical addresses can change based on network configurations. These addresses are hierarchical and help identify both the network and the device within that network. Logical addressing is important for:

  • Enabling communication between devices on different networks.
  • Facilitating routing by providing location-based information.

2. 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.  

3. Host-to-Host Delivery

The network layer ensures data is transferred from the source device (host) to the destination device (host) across one or multiple networks. This involves:

  • Determining the destination address.
  • Ensuring that data is transmitted without duplication or corruption.

Host-to-host delivery is a foundational aspect of communication in large-scale, interconnected systems like the internet.

4. Forwarding

Forwarding is the process of transferring packets between network devices such as routers, which are responsible for directing the packets toward their destination. 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).The router uses:

  • Routing tables: These tables store information about possible paths to different networks.
  • Forwarding decisions: Based on the destination IP address in the packet header. Forwarding ensures that packets move closer to their destination efficiently.

5. Fragmentation and Reassembly of Packets

Some networks have a maximum transmission unit (MTU) that defines the largest packet size they can handle. If a packet exceeds the MTU, the network layer:

  • Fragments the packet into smaller pieces.
  • Adds headers to each fragment for identification and sequencing. At the destination, the fragments are reassembled into the original packet. This ensures compatibility with networks of varying capabilities without data loss.

Read more about Fragmentation at Network Layer.

6. Logical Subnetting

Logical subnetting involves dividing a large IP network into smaller, more manageable sub-networks (subnets). Subnetting helps:

  • Improve network performance by reducing congestion.
  • Enhance security by isolating parts of a network.
  • Simplify network management and troubleshooting. Subnetting uses subnet masks to define the range of IP addresses within each subnet, enabling efficient address allocation and routing.

7. Network Address Translation (NAT)

NAT allows multiple devices in a private network to share a single public IP address for internet access. This is achieved by:

  • Translating private IP addresses to a public IP address for outbound traffic.
  • Reversing the process for inbound traffic. Benefits of NAT include:
  • Conserving IPv4 addresses by reducing the need for unique public IPs for each device.
  • Enhancing security by masking internal IP addresses from external networks.

8. 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.

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.

Next Article

Similar Reads