The network layer in an OSI model is the layer that knows the address of the neighboring nodes in a network. It is responsible for packaging output with the correct network address information. It selects routes between networks and ensures quality of services. It is also responsible for recognizing and forwarding to the transport layer incoming messages for local host domains. This layer is layer 3 in an OSI model.
This layer provides for packet forwarding which includes the routing of packets through the intermediate routers. It provides the functional and procedural means of transferring variable-length data sequences from a source to a destination host through one or more networks. During this process the network layer allows for the maintaining of the quality of service functions.
One of the functions that the network layer is responsible for is the connections model. This means the connection between an IP and a sending network. The IP is connectionless and does not have to send an acknowledgement. This layer determines where the address is of a host computer on a network.
For example, you have a computer, your child has a computer and your spouse has a computer. They are all set up on a home network. If you were logging onto your email server this layer would determine which computer you were on and where to send the opened end message (email).
The network layer responds to the service requests that are sent from the transport layer and then issues those service requests to the data link layer. It also directs where the information will travel by obtaining the proper address of the end user by detecting where on a network or sub-network the end user’s IP is located.