The Internet Protocol (IP) is a protocol, or set of rules, for routing and addressing packets of data so that they can travel across networks and arrive at the correct destination. Data traversing the Internet is divided into smaller pieces, called packets. IP information is attached to each packet, and this information helps routers to send packets to the right place. Every device or domain that connects to the Internet is assigned an IP address, and as packets are directed to the IP address attached to them, data arrives where it is needed.
IP is a network level protocol that is responsible for transporting data in discrete chunks of bits known as packets from the source machine to the destination machine. IP is an unreliable protocol because it merely provides a best effort service and does not guarantee the delivery of packets. IP does not establish any logical connections between source and destination machines, and IP packets belonging to the same message can take different routes to reach a particular destination. IP packets are routed independently of each other and are known as datagrams.
All intermediate systems such as routers and end systems such as servers and workstations that are connected to the Internet must implement IP for communication. Typically, an IP address is associated with every network interface of devices connected to the Internet. An IP packet has a header and a data portion. The IP header carries control information for routing packets through the Internet and is analogous to the address label on an envelope, whereas the data portion of an IP packet corresponds to the contents of the envelope.
The current version of the IP is still IPv4, although IPv6 has been proposed. In this article, any references to the IP would imply IPv4, unless stated otherwise. Most fields in the header of IPv4 packets have implications for security that include Source IP Address, Destination IP Address, Protocol, Fragment Offset, and Source Routing Option. Source IP Address and Destination IP Address represent the IP addresses of the source and destination, respectively. Protocol identifies the protocol whose data are stored in the data portion of the IP packets. Examples of protocols include Transmission Control Protocol, User Datagram Protocol, and Internet Control Message Protocol.
Often, IP packets are fragmented to meet the maximum packet size requirements of intermediate networks on the route from source to destination. The various fragmented pieces of IP packets are then reassembled together at the destination host by using the information in the Fragment Offset field. This field indicates the relative position of the fragment data in the original IP packet. IP allows an option whereby the source can specify the route a packet should take to reach the destination. This route is stored under the Source Routing Option field.