The next layer is the third layer of the OSI reference model.
The network layer.
The network layer provides the means of transferring variable length network packets from a source to
a destination host via one or more networks.
In other words, the network layer is responsible for packet forwarding, including routing through
intermediate routers.
Within the service layering semantics of the OSI network architecture.
The network layer responds to the service requests from the transport layer and issues service requests
to the data link layer.
So here are the functions of the network layer.
Connectionless communication.
For example, IP is connectionless in that a data packet can travel from a sender to a recipient without
the recipient having to send an acknowledgement.
Connection oriented protocols exist at other higher levels of the OSI model.
Host addressing.
Every host in the network must have a unique address that determines where it is on the Internet.
Addresses are known as IP addresses.
Message forwarding.
Since many networks are partitioned into subnetworks and then connect to other networks for wide area
communications networks, use specialized hosts called Gateways or routers to forward packets between
networks.