IP

IP (Internet Protocol) is the main network layer protocol utilized on the Internet.

IP is responsible for addressing and fragmentation.

IP works with another network layer protocol, ICMP.

Transport layer protocols which utilize IP include TCP and UDP.

IP Addresses

IP addresses are four octets (32 bits) long and are usually seperated by periods. Some example IP addresses are:

IP addresses are using in routing packets through the Internet.

Diagram of the IP Header

                        IP Header Format
                        -----------------
                                    
    0                   1                   2                   3   
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version|  IHL  |Type of Service|          Total Length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Identification        |Flags|      Fragment Offset    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Time to Live |    Protocol   |         Header Checksum       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Source Address                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Destination Address                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Options                    |    Padding    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  1. Version : Current version of the IP addresses being used. The version can be either IPv4 or IPv6.
     
  2. Length : Total length of the IP header.
     
  3. TOS : TOS stands for Type of Service, which is used for the quality of service in high performance networks. This field establishes the way routers treat IP packets and prioritize them as they are queued to be sent.
     
  4. Size of Datagram : Total length of the IP header, and the data or the IP Packet. It is usually measured in bytes.
     
  5. Identification : An exclusive identification value assigned to the IP packet.
     
  6. Flags : Specifies if fragmentation should occur, i.e. the default flag indicates that fragmentation should not be performed.
     
  7. Fragmentation Offset : A byte count which provides segmentation and reassembly of large IP packets, bigger than the MTU.
     
  8. Time to Live : Number of hops/jumps which the IP packet can be routed over. This value is decremented with each hop an IP address makes.
     
  9. Protocol : Indicates the type of network protocol or an upper layer protocol. Such as, 23 = Telnet; 21= FTP; 6 = TCP; 17= UDP.
     
  10. Header Checksum : It is used to detect the processing errors introduced into the IP packet and to maintain the integrity of the data sent via the IP packet.
     
  11. Source Address: IP address of the original sender who transmits the IP packet.
     
  12. Destination Address : IP address of the last destination of the packet, for whom the IP packet was intended.
     
  13. Options : It is used for various reasons such as testing, security, etc. The option field is optional, but when used, the length of the IP header increases in size.
     
  14. Data : The actual data to be sent over the network.

IP Versions

The version of IP in current use is IPv4. IPv6 has been defined, but is not yet in common use.

Additional Reading on IP

The IP protocol is defined in RFC 791: Internet Protocol.

blog comments powered by Disqus

Discuss IP in the forums.

 
(0 - user rating)