Follow the headers from the outside inward using the original frame in the IPv4 lesson. Box widths show field lengths, and the values come from the lesson frame. Labels at the left are decimal byte offsets from the start of the Ethernet frame.
Hover over a diagram field or explanation row to highlight the matching diagram, hex-dump bytes, and explanation. Tap to keep it selected; tap the same item again to clear it. With a keyboard, focus a diagram field and press Enter or Space to select it.
Where the three headers begin and end
The row label 0010 is a hexadecimal offset: 16 in decimal. Each row shows eight bytes, so count the bytes rather than treating a row label as a field boundary.
0–13Ethernet II header (14 bytes)
14–33IPv4 header (IHL 5 × 4 = 20 bytes)
34–41UDP header (8 bytes)
42–61UDP data (20 bytes)
These ranges belong to this example. Other lessons share the header start positions but have different data lengths. The lessons contain no VLAN tag or IPv4 options, and the dump omits FCS. UDP fields are also graded in Exercises.
Ethernet II: find the next header
The first six bytes hold the destination MAC address, followed by six bytes for the source MAC address. The two-byte EtherType identifies the type of data that follows.
The 14-byte Ethernet II header. The top scale shows byte positions from the start of the frame.Scroll horizontally to see the full diagram.
byte
012345678910111213
0–13
Destination MAC02 FE DC BA 98 76Source MAC02 12 34 56 78 9AType08 00
0–5 Destination MAC
02 FE DC BA 98 76 → 02:FE:DC:BA:98:76
6–11 Source MAC
02 12 34 56 78 9A → 02:12:34:56:78:9A
12–13 EtherType
Read 08 00 in order as 0x0800. IPv4 follows at offset 14.
Reference: RFC 894 (new tab) specifies the Ethernet Type value 0x0800 for IPv4 and places the IP header at the start of the data field.
IPv4: read length and next protocol
The IPv4 header starts at absolute offset 14. Subtract 14 from a position below to get its offset relative to the IPv4 header.
The IPv4 header. Each row is 32 bits (4 bytes); box widths follow bit lengths. IHL 5 means this example has no Options.Scroll horizontally to see the full diagram.
byte
bit 0–78–1516–2324–31
14–17
Ver4IHL5ToS00Total Length00 30
18–21
Identification30 03Flags010Fragment Offset0
22–25
TTL80Protocol11Header Checksum63 E6
26–29
Source AddressC6 33 64 4D
30–33
Destination AddressCB 00 71 52
14 Version
The upper four bits of 45 give 4, indicating IPv4.
14 IHL
The lower four bits of 45 give 5. Header length is 5 × 4 = 20 bytes.
15 ToS
00. RFC 791 labels this field Type of Service. This lesson uses it to identify the field's position.
16–17 Total Length
00 30 → 0x0030 → 48 bytes. This includes the IPv4 header and its data, but not the 14-byte Ethernet II header.
18–19 Identification
30 03 → 0x3003. This identifying value aids fragment reassembly.
20 Flags
The upper three bits of 40 00 are 010: DF is 1 and MF is 0.
20–21 Fragment Offset
The lower 13 bits of 40 00 are 0, so there is no fragment offset.
22 TTL
80 → 128 in decimal. This lifetime value is reduced during forwarding.
23 Protocol
11 → 17 in decimal, indicating UDP.
24–25 Header Checksum
63 E6. It covers the IPv4 header, not the UDP data.
26–29 Source IP
Convert each byte of C6 33 64 4D to decimal: 198.51.100.77.
30–33 Destination IP
CB 00 71 52 → 203.0.113.82.
With IHL 5, UDP starts at 14 + 20 = 34. A packet with a different IHL would move this boundary.
IPv4 Protocol 17 identifies the next header as UDP. In this example, its eight-byte header begins at absolute offset 34.
The UDP header. Each row is 32 bits (4 bytes). Length includes both the header and its data.Scroll horizontally to see the full diagram.
byte
bit 0–78–1516–2324–31
34–37
Source PortD6 D8Destination Port00 35
38–41
Length00 1CChecksumFD 29
34–35 Source Port
D6 D8 → 0xD6D8 → 55000.
36–37 Destination Port
00 35 → 53.
38–39 Length
00 1C → 28 bytes, including the eight-byte UDP header and 20 data bytes.
40–41 Checksum
FD 29. Its calculation also uses a pseudo-header containing the IPv4 source and destination addresses, among other values.
Data begins at offset 42. A port number alone does not establish the application content. Exercises ask you to read the Checksum field, not recalculate it.
Reference: the Format and Fields sections of RFC 768 (new tab) define the four UDP fields, the Length coverage, and the checksum pseudo-header.
ICMPv4 Echo: read a Ping exchange
This uses a separate original frame. IPv4 Protocol 01 identifies ICMPv4. With IHL 5, ICMP starts at absolute offset 34. This is an example of two hosts on the same LAN.
The fixed eight bytes of an Echo Request. Each row is 32 bits (four bytes); box widths follow bit lengths.Scroll horizontally to see the full diagram.
byte
bit 0–78–1516–2324–31
34–37
Type08Code00ChecksumA2 8C
38–41
Identifier12 34Sequence00 01
34 Type
08 is Echo Request; a reply uses 00.
35 Code
00. Echo uses Code 0.
36–37 Checksum
A2 8C. It covers the ICMP message and is recomputed for the reply.
38–39 Identifier
12 34 → 0x1234. It helps match a reply with its request.
40–41 Sequence Number
00 01 → 1. The reply returns the same number.
Offsets 42–59 hold PING-LESSON-000001. The reply returns the same Identifier, Sequence Number, and data; IPv4 source and destination reverse. Its Type becomes 00 and ICMP Checksum AA 8C. TTL need not be the same in each direction.
The sender measures round-trip time (RTT) between sending and receiving. RTT is not an Echo header field. This lesson sends no real Ping traffic. Time Exceeded and ICMPv6 are separate future topics.