IPv8 Packet Header (Section 5.1)

May 15, 2026 · View on GitHub

← Home

IPv8 Packet Header (Section 5.1)

Per draft-thain-ipv8-02 Section 5.1.

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 ASN Prefix (r.r.r.r)                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Source Host Address (n.n.n.n)              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Destination ASN Prefix (r.r.r.r)              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Destination Host Address (n.n.n.n)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Header fields

FieldSizeDescription
Version4 bitsIP version number: 8
IHL4 bitsInternet Header Length (7 = 28 bytes)
Type of Service1 byteTOS / DSCP
Total Length2 bytesHeader + payload
Identification2 bytesFragment identification
Flags3 bitsFragmentation flags
Fragment Offset13 bitsFragment offset
Time to Live1 byteTTL hop count
Protocol1 byteUpper-layer protocol
Header Checksum2 bytesCRC32 truncated to 16 bits
Source ASN Prefix4 bytesr.r.r.r of source
Source Host Address4 bytesn.n.n.n of source
Dest ASN Prefix4 bytesr.r.r.r of destination
Dest Host Address4 bytesn.n.n.n of destination

Total header size: 28 bytes (8 octets longer than IPv4)

Wire format: !BBHHHBBHIIII

Checksum

CRC32 computed over header (with checksum field set to 0) + payload, truncated to 16 bits (crc32 & 0xFFFF).

ICMPv8 (Section 9)

ICMPv8 extends ICMP for 64-bit addresses. Message types:

TypeName
0Echo Reply
3Destination Unreachable (incl. ASN_UNREACHABLE)
5Redirect
8Echo Request
11Time Exceeded
12Parameter Problem

ICMPv8 uses one's complement checksum (RFC 1071). Header: !BBHHH (8 bytes).