What is a network layer?

The network layer creates a logical association between the sender and the user by giving a logical way. This layer switches and routes the message packet as important to obtain them to their destination.

It is responsible for sending and distributing the message packets. The network layer creates routing decisions and advances the packets for devices that are farther away than an individual connection.

The network layer can also divide the huge packets into little chunks, if the packet is higher than the most extensive data link layer. The network reassembles the fragments into packets at the receiving end. Routers and Gateways act in the network layer.

The communication of the network layer to the data link and transport layer is demonstrated in the figure given below −

It accepts the services from the data link layer and supports the services to the transport layer.

Functions of network layer

The functions of the network layer are explained below −

  • Internetworking: This is the main responsibility of the network layer. It offers a logical connection between multiple types of networks.

  • Addressing: Addressing is important to recognize each device on the internet specifically.

  • Routing: There are several roots possible from a source to a destination, and one of them is to be selected. Routing algorithms are created to discover the most efficient paths between the source and destination hub of a message.

  • Packetizing: It divides the more outstanding packets into lower packets, if the packet is greater than the most extensive data from the data link layer. This is known as packetizing.

  • Data Switching: The procedure of changing packet (data blocks) from source to the destination hub is known as data switching.

  • Congestion Control: Congestion in a network can appear when the network's pack. There are several packets sent to the network, which is higher than their capacity.