The same exact strip primitive can show shallow packet layers. This constructed frame compares TCP and UDP transport headers without modeling their runtime behavior.
Why strips can nest
A frame can contain another protocol's bytes as payload. This constructed example keeps the layout shallow: Ethernet, IP, and transport headers only.
transport examples = 2 \text{transport examples}=2 transport examples = 2
Transport two ways
This constructed frame is Ethernet → IP → transport, with the transport header shown two ways: TCP, then UDP.
transport forms = 2 \text{transport forms}=2 transport forms = 2
Nested packet strips A constructed frame with Ethernet, IP, and two transport strips (TCP and UDP). Ethernet header 112 bits / 14 bytes 0xdeadbeef0001deadbeef00020800 byte 0 byte 1 byte 2 byte 3 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 byte 8 byte 9 byte 10 byte 11 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 byte 12 byte 13 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 dst-mac 0xdeadbeef0001 (cont.) (cont.) src-mac 0xdeadbeef0002 ethertype 2048->IPv4 IP header 160 bits / 20 bytes 0x4500003c1c4640004006b1e6ac100a63ac100a0c byte 0 byte 1 byte 2 byte 3 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 byte 8 byte 9 byte 10 byte 11 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 byte 12 byte 13 byte 14 byte 15 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 byte 16 byte 17 byte 18 byte 19 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 version 4 ihl 5 dscp_ecn 0x00 total_length 60 identification 0x1c46 fragment_offset 0 ttl 64 protocol 6->TCP header_checksum 0xb1e6 src 172.16.10.99 dst 172.16.10.12 reserved_flag: clear df: set mf: clear TCP header 160 bits / 20 bytes 0xc000005000000001000000005002ffff00000000 byte 0 byte 1 byte 2 byte 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 byte 12 byte 13 byte 14 byte 15 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 byte 16 byte 17 byte 18 byte 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 src-port 49152 dst-port 80 seq 0x00000001 ack 0x00000000 offset-flags 0x5002 window 65535 checksum 0x0000 urgent 0 UDP header 64 bits / 8 bytes 0xc000003500140000 byte 0 byte 1 byte 2 byte 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 src-port 49152 dst-port 53 length 20 checksum 0x0000
Ethernet names the payload
Destination MAC 0xdeadbeef0001 and source MAC 0xdeadbeef0002 are followed by ethertype 2048, which maps to IPv4.
2048 ↦ IPv4 2048\mapsto \text{IPv4} 2048 ↦ IPv4
Nested packet strips A constructed frame with Ethernet, IP, and two transport strips (TCP and UDP). Ethernet header 112 bits / 14 bytes 0xdeadbeef0001deadbeef00020800 byte 0 byte 1 byte 2 byte 3 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 byte 8 byte 9 byte 10 byte 11 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 byte 12 byte 13 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 dst-mac 0xdeadbeef0001 (cont.) (cont.) src-mac 0xdeadbeef0002 ethertype 2048->IPv4 IP header 160 bits / 20 bytes 0x4500003c1c4640004006b1e6ac100a63ac100a0c byte 0 byte 1 byte 2 byte 3 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 byte 8 byte 9 byte 10 byte 11 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 byte 12 byte 13 byte 14 byte 15 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 byte 16 byte 17 byte 18 byte 19 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 version 4 ihl 5 dscp_ecn 0x00 total_length 60 identification 0x1c46 fragment_offset 0 ttl 64 protocol 6->TCP header_checksum 0xb1e6 src 172.16.10.99 dst 172.16.10.12 reserved_flag: clear df: set mf: clear TCP header 160 bits / 20 bytes 0xc000005000000001000000005002ffff00000000 byte 0 byte 1 byte 2 byte 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 byte 12 byte 13 byte 14 byte 15 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 byte 16 byte 17 byte 18 byte 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 src-port 49152 dst-port 80 seq 0x00000001 ack 0x00000000 offset-flags 0x5002 window 65535 checksum 0x0000 urgent 0 UDP header 64 bits / 8 bytes 0xc000003500140000 byte 0 byte 1 byte 2 byte 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 src-port 49152 dst-port 53 length 20 checksum 0x0000
TCP is another strip
The TCP header is 20 bytes: its source port is 49152, the destination port is 80, the window is 65535, and the offset-flags word is 0x5002.
49152 → 80 , 0 x 5002 49152\to80,\quad0x5002 49152 → 80 , 0 x 5002
Nested packet strips A constructed frame with Ethernet, IP, and two transport strips (TCP and UDP). Ethernet header 112 bits / 14 bytes 0xdeadbeef0001deadbeef00020800 byte 0 byte 1 byte 2 byte 3 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 byte 8 byte 9 byte 10 byte 11 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 byte 12 byte 13 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 dst-mac 0xdeadbeef0001 (cont.) (cont.) src-mac 0xdeadbeef0002 ethertype 2048->IPv4 IP header 160 bits / 20 bytes 0x4500003c1c4640004006b1e6ac100a63ac100a0c byte 0 byte 1 byte 2 byte 3 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 byte 8 byte 9 byte 10 byte 11 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 byte 12 byte 13 byte 14 byte 15 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 byte 16 byte 17 byte 18 byte 19 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 version 4 ihl 5 dscp_ecn 0x00 total_length 60 identification 0x1c46 fragment_offset 0 ttl 64 protocol 6->TCP header_checksum 0xb1e6 src 172.16.10.99 dst 172.16.10.12 reserved_flag: clear df: set mf: clear TCP header 160 bits / 20 bytes 0xc000005000000001000000005002ffff00000000 byte 0 byte 1 byte 2 byte 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 byte 12 byte 13 byte 14 byte 15 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 byte 16 byte 17 byte 18 byte 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 src-port 49152 dst-port 80 seq 0x00000001 ack 0x00000000 offset-flags 0x5002 window 65535 checksum 0x0000 urgent 0 UDP header 64 bits / 8 bytes 0xc000003500140000 byte 0 byte 1 byte 2 byte 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 src-port 49152 dst-port 53 length 20 checksum 0x0000
UDP is shorter
The second transport strip is UDP: 8 bytes with source port 49152, destination port 53, length 20, and checksum 0x0000. A UDP checksum of 0x0000 means none is present, legal in IPv4; UDP checksum and port semantics are deferred.
49152 → 53 , 20 49152\to53,\quad20 49152 → 53 , 20
Nested packet strips A constructed frame with Ethernet, IP, and two transport strips (TCP and UDP). Ethernet header 112 bits / 14 bytes 0xdeadbeef0001deadbeef00020800 byte 0 byte 1 byte 2 byte 3 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 byte 8 byte 9 byte 10 byte 11 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 byte 12 byte 13 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 dst-mac 0xdeadbeef0001 (cont.) (cont.) src-mac 0xdeadbeef0002 ethertype 2048->IPv4 IP header 160 bits / 20 bytes 0x4500003c1c4640004006b1e6ac100a63ac100a0c byte 0 byte 1 byte 2 byte 3 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 byte 8 byte 9 byte 10 byte 11 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 byte 12 byte 13 byte 14 byte 15 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 byte 16 byte 17 byte 18 byte 19 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 version 4 ihl 5 dscp_ecn 0x00 total_length 60 identification 0x1c46 fragment_offset 0 ttl 64 protocol 6->TCP header_checksum 0xb1e6 src 172.16.10.99 dst 172.16.10.12 reserved_flag: clear df: set mf: clear TCP header 160 bits / 20 bytes 0xc000005000000001000000005002ffff00000000 byte 0 byte 1 byte 2 byte 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 byte 12 byte 13 byte 14 byte 15 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 byte 16 byte 17 byte 18 byte 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 src-port 49152 dst-port 80 seq 0x00000001 ack 0x00000000 offset-flags 0x5002 window 65535 checksum 0x0000 urgent 0 UDP header 64 bits / 8 bytes 0xc000003500140000 byte 0 byte 1 byte 2 byte 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 src-port 49152 dst-port 53 length 20 checksum 0x0000
Summary
This is a CONSTRUCTED frame that carries our real IP header, shown shallow. TCP and UDP checksum and port semantics are deferred; no timing is modeled. Byte layout only; timing/throughput is not modeled here. Timing/throughput is not modeled here — only the exact byte layout.
tcp checksum = 0 x 0000 , urgent = 0 \text{tcp checksum}=0x0000,\quad\text{urgent}=0 tcp checksum = 0 x 0000 , urgent = 0
Nested packet strips A constructed frame with Ethernet, IP, and two transport strips (TCP and UDP). Ethernet header 112 bits / 14 bytes 0xdeadbeef0001deadbeef00020800 byte 0 byte 1 byte 2 byte 3 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 byte 8 byte 9 byte 10 byte 11 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 byte 12 byte 13 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 dst-mac 0xdeadbeef0001 (cont.) (cont.) src-mac 0xdeadbeef0002 ethertype 2048->IPv4 IP header 160 bits / 20 bytes 0x4500003c1c4640004006b1e6ac100a63ac100a0c byte 0 byte 1 byte 2 byte 3 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 byte 8 byte 9 byte 10 byte 11 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 byte 12 byte 13 byte 14 byte 15 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 byte 16 byte 17 byte 18 byte 19 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 version 4 ihl 5 dscp_ecn 0x00 total_length 60 identification 0x1c46 fragment_offset 0 ttl 64 protocol 6->TCP header_checksum 0xb1e6 src 172.16.10.99 dst 172.16.10.12 reserved_flag: clear df: set mf: clear TCP header 160 bits / 20 bytes 0xc000005000000001000000005002ffff00000000 byte 0 byte 1 byte 2 byte 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 byte 12 byte 13 byte 14 byte 15 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 byte 16 byte 17 byte 18 byte 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 src-port 49152 dst-port 80 seq 0x00000001 ack 0x00000000 offset-flags 0x5002 window 65535 checksum 0x0000 urgent 0 UDP header 64 bits / 8 bytes 0xc000003500140000 byte 0 byte 1 byte 2 byte 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 src-port 49152 dst-port 53 length 20 checksum 0x0000