The network layer was designed to solve the problem of delivery through several links. The network layer at source is responsible for creating a packet that carries two universal addresses. First is the destination address and other is the source address. And if the packet is too large, the packet will be fragmented.
The network layer at the source may also add fields for error control which are mostly for error detection. The network layer at the switch or router is responsible for routing packet. When a packet arrives, the router or switch finds interface from which the packet must be sent. This is done by using a routing table. In addition, a packet might go through another fragmentation, if required. The network layer at the destination is responsible for the address verification. It makes sure that the destination address on packet is same as the address of the host. It is also checked to see if packet has been corrupted during the transmission. If it has, network layer discards the packet. If the packet is a fragment, the network layer waits until all packets have arrived, and then it reassembles them and delivers the reassembled packets to transport layer.
The network layer at the source may also add fields for error control which are mostly for error detection. The network layer at the switch or router is responsible for routing packet. When a packet arrives, the router or switch finds interface from which the packet must be sent. This is done by using a routing table. In addition, a packet might go through another fragmentation, if required. The network layer at the destination is responsible for the address verification. It makes sure that the destination address on packet is same as the address of the host. It is also checked to see if packet has been corrupted during the transmission. If it has, network layer discards the packet. If the packet is a fragment, the network layer waits until all packets have arrived, and then it reassembles them and delivers the reassembled packets to transport layer.