IPv4 and IPv6 Headers

IPv4 Header


|-------------------------------------------------------------------------------|
| Version |   IHL   |  Type of Service  |            Total Length               |
|-------------------------------------------------------------------------------|
|             Identification            | Flags |          Fragment Offset      |
|-------------------------------------------------------------------------------|
|   Time to Live    |     Protocol      |             Header Checksum           |
|-------------------------------------------------------------------------------|
|                                  Source Address                               |
|-------------------------------------------------------------------------------|
|                               Destination Address                             |
|-------------------------------------------------------------------------------|
|                     Options                               |      Padding      |
|-------------------------------------------------------------------------------|


|-------------------------------------------------------------------------------|
|                                     Payload                                   |
|-------------------------------------------------------------------------------|


IPv6 Header


|-------------------------------------------------------------------------------|
| Version | Priority|                   Flow Label                              |
|-------------------------------------------------------------------------------|
|             Payload Length            |  Next Header Type |     Hop Limit     |
|-------------------------------------------------------------------------------|
|                                  Source Address                               |
|                                  Source Address                               |
|                                  Source Address                               |
|                                  Source Address                               |
|-------------------------------------------------------------------------------|
|                               Destination Address                             |
|                               Destination Address                             |
|                               Destination Address                             |
|                               Destination Address                             |
|-------------------------------------------------------------------------------|


|-------------------------------------------------------------------------------|
|                                 Extension Headers                             |
|-------------------------------------------------------------------------------|


|-------------------------------------------------------------------------------|
|                                     Payload                                   |
|-------------------------------------------------------------------------------|

The extension headers handle all the optional data that used to be in the IPv4 header plus extra data. Extension headers are defined for such things as router options, authentication and encryption. Headers can be daisy chained, each header says what type the next section is. The optional payload is normal TCP or UDP data.

© Keith Owens O. C. Software P/L 1997