The network layer or Layer 3 of the OSI (Open Systems Interconnection) model is responsible for the source to destination delivery of data packets across multiple hops or nodes. It controls the operation of the subnet.
The position of the network layer in the OSI model is depicted in the following diagram −
The network layer is responsible for routing packets from the source host to the destination host. The routes can be based upon static tables that are rarely changed; or they can be automatically updated depending upon network conditions.
Many networks are partitioned into sub-networks or subnets. The network layer controls the operations of the subnets. Network devices called routers operate in this layer to forward packets between the subnets or the different networks.
The lower layers assign the physical address locally. When the data packets are routed to remote locations, a logical addressing scheme is required to differentiate the source system and the destination system. This is provided by the network layer.
This layer also provides mechanisms for congestion control, in situations when too many packets overload the subnets.
The network layer tackles issues like transmission delays, transmission time, avoidance of jitters etc.