What is the main function of Network layer
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.