Network layer is the third layer in the OSI model of computer networking. Packet forwarding including routing through routers and quality of service management are done by the network layer.
The transport layer at the host side receives the service provided by the network layer. But the transport layer resides in the hosts while the network layer resides in the subnet.
We know the subnet is a collection of routers which consists of only the bottom three layers. Hence, we can say that the service provided by the network layer to the transport layer is more effective, than the service provided by the subnet to the hosts.
Generally, the network layer provides two classes of well-defined services, namely connectionless and connection oriented services to the numerous nodes or hosts communicating through subnet.
The different services provided by the network layer are as follows −
Network layer provides the facility of connection less transfer of data from one end to another. In connectionless communication one does not have to build a session with the receiver; it can be done at any time and no acknowledgement is required in this type of communication and this is possible because of the network layer.
Every host in the network must have a unique address which determines where the host is located in the network. Every address on the internet is known as an ip address and this ip address is addressed by the network layer.
The message forwarding is another service provided by the network layer. Here, many networks are partitioned into sub networks and connected to other networks for wide area communications.
Network layer uses specialised hosts known as routers which are used to forward packets between different networks. The network layer also responds to service requests from the transport layer and issues service requests to the data link layer.
The services provided by the Network Layer are diagrammatically represented as follows −