Network Layer is the third lowest layer in the OSI reference model, which is responsible for packet delivery from source to destination through intermediate routers across multiple networks.
Network layer functions :
Logical Addressing - Adds a header to the packet received from the transport layer, which consists of logical (network) address to distinguish sender and receiver address over other network, as physical addresses are limited to Local Area Network (LAN).
Routing - Network layer provides the mechanism of moving packets across a series of interconnected networks. And connecting devices like router and gateway routes the packet to their final destination.
Fragmentation and Reassembling - When packets are too large that can be processed by data link layer, network layer splits the packet into small pieces and sends each piece one by one to data link layer, while at the receiving end these pieces are reassembled to form a packet.
Controlling packet switching and data congestion.
Protocols used: IP, ARP, RARP, ICMP, IGMP, IPX, DDP etc.