Network Layer – Functions and Protocols
The main function of the network layer is to deliver packets from source to destination across multiple networks. It also specifies the packet structure and processing used to carry the data from one host to another. The layer routes the packet through different channels to the other end and acts as a network controller.
The Network Layer also controls the operation of the subnet. If two computers are connected using the same link, then there is no need for this layer. It also provides addressing, encapsulation and de-encapsulation services to permit end devices to exchange data across the network. The network layer’s main functions, services, and protocols are as follows:
Addressing end devices
A source or destination device in a networked system. For example, Computers, laptops, file servers, web servers, Network printers, VoIP phones, Security cameras, and Mobile handheld devices. The end device address configuration is important. Without a unique IP address, there is no concept of data transmission across the network. Addressing the End device is necessary for the identification of the devices on the network.
Encapsulation
Another important network layer service is encapsulating the protocol data unit (PDU) from the transport layer into an IP packet. The encapsulation method adds IP header information, such as the IP address of the source and destination hosts. The header is used to carry the packet to the appropriate host. The IP header remains in the packet until it arrives at the destination host. The figure below illustrates how the transport layer protocol data unit (PDU) is encapsulated by the network layer protocol data unit (PDU) to create an IP packet.
The process of encapsulating data, layer by layer, enables the services at the different layers to grow and scale without disturbing the other layers. This means IPv4 or IPv6 easily packages the transport layer segments. Routers can apply these different network layer protocols to operate simultaneously over a network. The routing depends on only the contents of the network layer packet header. In all cases, the data portion of the packet; that is, the encapsulated transport layer protocol data unit (PDU) remains unchanged during the network layer processes.
De-encapsulation
When the packet is received at the network layer (Layer 3) of the destination host, the host checks the IP header of the packet. If the destination IP address and the IP address of the header match. Then, the IP header is removed from the packet. Removing of IP Header process called De-encapsulation. After the packet is de-encapsulated by the network layer, the resulting Layer 4 protocol data unit (PDU) passes upwards to Layer 4 or the transport layer.
Routing
The network layer routes packets to a destination host on another network. Router made it possible for the packet of one network to travel to another network. The router’s job is to direct the packet to its best path toward the destination host. A packet may cross many intermediary devices before reaching the destination host. Each router crosses a packet to reach the destination host, which is a hop.
Network Layer Protocols
There are several network layer protocols, which are listed below. However, here we will discuss the first two protocols in the coming article, which are commonly known as the IP address of the device or computer:
- IPv4, also Internet Protocol version 4
- IPv6, also known as Internet Protocol version 6
- DDP, Datagram Delivery Protocol
- DVMRP, Distance Vector Multicast Routing Protocol
- ICMP, Internet Control Message Protocol
- IGMP, Internet Group Management Protocol
- IPsec, Internet Protocol Security
- IPX, Internetwork Packet Exchange
- PIM-DM, Protocol Independent Multicast Dense Mode
- PIM-SM, Protocol Independent Multicast-Sparse Mode
- RIP, also Routing Information Protocol
- RSMLT Routed-SMLT