What is the main function of Network layer

In the network layer, routing information is used to determine a path to a destination. Packets are used here. This includes routing protocols, logical network addresses, and packet fragmentation. The router handles these things. By using the network layer, data sequences (called packets) can be transmitted between nodes in different networks. It allows packets to be routed between two or more nodes (without having to establish a direct physical connection) by transferring them over many intermediate nodes. It may be necessary for Layer 3 devices to know how to reach various network addresses based on logical network addresses. Typical Layer 3 devices include routers. Based on a packet’s destination network address, a router can maintain a routing table that indicates how to forward the packet. In addition to manual configuration (that is, entering static routes), a router can have its routing table populated via a dynamic routing protocol (for example, OSPF or EIGRP) or simply by directly connecting to certain networks.

Data link layer forwarding decisions are made on physical addresses, while network layer forwarding decisions are based on logical addresses. Routed protocols (such as AppleTalk and IPX) all have their own logical addressing schemes, but IP is by far the most widely deployed. Multilayer switches and routers make up the network layer. The Internet is based on IPv4 as the most common Layer 3 routed protocol.

This layer implements flow control and packet reordering. In order to prevent a sender from sending data more rapidly than the receiver can receive it, flow control is employed. Reordering packets during transmission allows the packets to be placed in the correct sequence at the point of transmission. This might be a necessary procedure since some networks provide load balancing when packets are sent between two devices using multiple links. Due to the existence of multiple links, packets may arrive out of order.

Written by pramod