In the OSI reference model, the network layer is responsible for providing globally unique device identification using network layer addressing and providing connectivity between end systems residing in different networks for data transfer. The basic functionality of the network layer is to receive the segment from upper (transport) layer, encapsulate it with network layer header that carries the source and destination identifiers, and forward the packet to the remote end system.
IP is the network layer protocol and is the most commonly deployed network layer protocol of the internet and other network is IPv4. The format of the IPv4 header is as follows:
IPv4 packet header
The following is a sample Wireshark capture of an IP packet:
Sample IP packet