The network layer is concerned with getting packets from the source all the way to the destination. This function contrasts with the goal of the data link layers whose purpose is to just transmit the bits from one end of a wire to the other end. The network layer design issues include the service provided to the transport layer, routing of packets through the subnet, congestion control, and connection of multiple networks together.In some networks transport layer runs in the IMPS and the transport layer runs in the hosts, the boundary provided by the network and transport layers in the networks is also the boundary between the subnet and the hosts.
The network layer services have been designed with the following goals in:
- The services should be independent of the subnet technology.
- The transport layer should be shielded from the number, type, and topology of the subnets present.
- The network addresses made available to the transport layer should use a uniform numbering plan even across LANs and WANs.
The real function of the network layers is routing the packets from the source machine to the destination machine. The Routing algorithm is part of the network layer responsible for deciding which output line an incoming packet should be transmitted on. If the subnet uses a datagram internally, the decision is made for every arriving data packet.If the subnet uses a virtual circuit decision is made only when a new virtual circuit is being set up. Routing algorithms have certain properties they are correctness, simplicity, robustness, stability, fairness and optimality.
Data link layer