IP Packet - Header, Payload, TTL, Protocol, and Routing
An IP packet is the network-layer unit responsible for addressing and routing. It contains an IP header plus a payload, often TCP, UDP, or ICMP.
Key Takeaways
IP packets carry source and destination IP addresses.
IPv4 and IPv6 use different header formats.
The protocol or next-header field identifies the payload.
TTL or hop limit prevents packets from looping indefinitely.
What an IP packet contains
An IP packet contains a header and payload. The header carries routing-related metadata, while the payload carries the next protocol layer such as TCP, UDP, or ICMP.
IPv4 vs IPv6 packet structure
IPv4 has a variable header with checksum and fragmentation fields. IPv6 has a fixed 40-byte base header and moves optional behavior into extension headers.
How to decode an IP packet
Check the version first, then read header length or fixed base header size. Use the Protocol or Next Header field to continue with TCP, UDP, ICMP, or another parser.
Practical Reference
| Item | Value | Analysis Note |
|---|---|---|
| IPv4 version | 4 | Variable header length. |
| IPv6 version | 6 | Fixed 40-byte base header. |
| Routing fields | Addresses + TTL/hop limit | Guide delivery across networks. |
| Payload pointer | Protocol / Next Header | Determines next decoder. |
FAQ
Is an IP packet visible inside Ethernet?
Yes. In an Ethernet II frame carrying IP, the IP packet begins after the Ethernet header or VLAN tag.
Does IP guarantee delivery?
No. IP provides best-effort delivery. Reliability, if needed, is usually handled by upper layers such as TCP or application logic.