Skip to content

Kotenko IT Blog

Menu
  • Home
  • CISCO
  • Virtualization
  • About
  • Certificates
Menu

IPv4 Header

Posted on June 6, 2025June 6, 2025 by kotenkoo

Layer 3 (Network Layer) – Responsible for routing packets between networks
IPv4 packet = IPv4 header + payload


🔹 IPv4 Header Fields

FieldBitsDescription
Version4IP version: 4 for IPv4 (0100), 6 for IPv6 (0110)
IHL (Internet Header Length)4Header size in 4-byte blocks. Min: 5 (20 bytes), Max: 15 (60 bytes)
DSCP (Differentiated Services Code Point)6Used for QoS (prioritize video, VoIP)
ECN (Explicit Congestion Notification)2Optional, informs about congestion without dropping packets
Total Length16Total packet size (header + data). Max: 65,535 bytes
Identification16Used for fragment reassembly – same ID across all fragments of one original packet
Flags3Fragmentation control:
Bit 0 = Reserved
Bit 1 = DF (Don’t Fragment)
Bit 2 = MF (More Fragments)
Fragment Offset13Order of fragment in the original packet
TTL (Time To Live)8Prevents routing loops. Each router decrements TTL by 1. Packet is dropped when TTL = 0
Protocol8Encapsulated protocol:
1 = ICMP
6 = TCP
17 = UDP
89 = OSPF
Header Checksum16For IPv4 header error-checking only. Recalculated at each router
Source IP Address32IP address of sender
Destination IP Address32IP address of receiver
Options0–320Optional field, rarely used. Present only if IHL > 5

🧩 IPv4 Fragmentation

  • Reason: When IP packet exceeds MTU (usually 1500 bytes)
  • All fragments carry their own IPv4 header
  • Identification field stays the same across fragments
  • Flags & Offset help reassemble them at the destination
    • MF (More Fragments) = 1 for all except last fragment
    • Offset = position in the original packet

🛡️ Error Handling & Routing

  • TTL ensures no infinite loops
  • Header Checksum ensures header wasn’t corrupted in transit
  • If checksum is incorrect → packet dropped

🧠 Quick Facts

  • IPv4 Header Min Size: 20 bytes
  • IPv4 Header Max Size: 60 bytes (if Options used)
  • Protocol field allows routers to identify the payload (TCP, UDP, ICMP etc.)
  • DSCP/ECN are used for advanced traffic control and congestion management

📌 These are personal study notes. Please read the full disclaimer for more information.

Category: Uncategorized

Post navigation

← Switch Interfaces

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • IPv4 Header
  • Switch Interfaces
  • IPv4 Addressing
  • Ethernet LAN Switching
  • Cisco IOS CLI

Recent Comments

No comments to show.

Archives

  • June 2025
  • May 2025

Categories

  • CISCO
    • CCNA
    • CISCO Troubleshooting
  • Uncategorized
  • Virtualization
    • Proxmox
© 2025 Kotenko IT Blog | Powered by Minimalist Blog WordPress Theme