IPv4 (Internet Protocol Version 4)

IP header have a minumum size of 20 bytes and maximum size of 60 bytes.

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version  |  IHL  | Type of Service |       Total Length        |
| 4 bit   | 4bit  |     8 bit       |          16 bit           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Identification             |  Flags  | Fragment Offset |
|            16 bit                 |  3 bit  |    13 bit       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Time to Live   |     Protocol    |      Header Checksum      |
|       8 bit     |     8 bit       |           16              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Source Address                          |
|                           32 bit                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Destination Address                      |
|                           32 bit                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Options                        |     Padding      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

IHL: Internet header length this field provide the length of only IP header (Includes options,padding)

Total length: Total length contain total length of packet (this includes ip header + data)

Identification field: Every packet have a unique identification field. This field is helpful in fragmentation. When a packet is fragmented the all the fragment will have same identification field.

Fragmentation offset: When a big IP packet is fragmented into small fragment then fragmentation offset field is used to determine the position of that fragment in complete packet.

Flags: There are three bits first bit is reserved, Second bit if for don’t fragment, Third bit is for more fragment.

Header checksum: This field contains the checksum of only IP header. This doesn’t include checksum of data.

Advertisements
This entry was posted in IP, Protocol. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s