🖧

CCNA Course - IPv4 Header Overview

Jul 13, 2024

Jeremy's IT Lab: CCNA Course

Introduction

  • Free, complete CCNA course
  • Subscribe, like, comment, and share to support
  • Download and use Anki flashcards from the description link

IPv4 Header Overview

  • Located at Layer 3 for routing data between devices on different networks, globally over the Internet
  • Plan to split routing into separate parts for in-depth coverage

Structure of an IPv4 Packet

  • Data encapsulation process:
    • Layer 4 Header: TCP or UDP (forms a segment)
    • Layer 3 Header: Internet Protocol (forms a packet)
    • Layer 2 Header and Trailer: Forms a frame
  • These are called Protocol Data Units (PDUs)
  • Focus on Layer 3 header (packet) for routing

IPv4 Header Fields

Version

  • Length: 4 bits
  • Identifies IP version (4 for IPv4, 6 for IPv6)

Internet Header Length (IHL)

  • Length: 4 bits
  • Specifies header length in 4-byte increments (min: 5, max: 15)
  • Header length without options: 20 bytes
  • Max header length with options: 60 bytes

DSCP (Differentiated Services Code Point)

  • Length: 6 bits
  • Used for Quality of Service (QoS) to prioritize delay-sensitive data

ECN (Explicit Congestion Notification)

  • Length: 2 bits
  • End-to-end notification of congestion without dropping packets

Total Length

  • Length: 16 bits
  • Indicates total packet length (header + encapsulated Layer 4 segment)
  • Min: 20 bytes, Max: 65,535 bytes

Identification

  • Length: 16 bits
  • Identifies packets for reassembly if fragmented

Flags

  • Length: 3 bits
  • Bit 0: Reserved, always 0
  • Bit 1: Don't Fragment (DF)
  • Bit 2: More Fragments (MF)

Fragment Offset

  • Length: 13 bits
  • Position of the fragment in the original packet

Time To Live (TTL)

  • Length: 8 bits
  • Prevents infinite loops; each router reduces by 1
  • Default: 64

Protocol

  • Length: 8 bits
  • Indicates Layer 4 protocol (TCP=6, UDP=17, ICMP=1, OSPF=89)

Header Checksum

  • Length: 16 bits
  • Used to check for errors in the IPv4 header

Source and Destination IP Address

  • Length: 32 bits each
  • Indicates sender and intended receiver IP addresses

Options (optional)

  • Variable length: 0 to 320 bits
  • Rarely used

Wireshark Analysis

  • Analyze packet capture
  • Highlight Ethernet and IPv4 headers, ICMP payload
  • Fields displayed: Version, IHL, DSCP, ECN, Total Length, Identification, Flags, Fragment Offset, TTL, Protocol, Header Checksum, Source and Destination IP Addresses

Quiz Review

  1. Fixed binary value of the first field of IPv4 header: 0100
  2. Field causing packet drop if 0: TTL
  3. Error detection in encapsulated data: Encapsulated protocol checks for errors
  4. Variable length field in IPv4 header: Options
  5. Bit set to 1 on all fragments except the last: More Fragments bit

Next Steps

  • Upcoming hands-on CLI configuration of routes
  • Supplementary materials: Anki flashcards, Packet Tracer lab

Note:

  • Subscribe to channel, like video, leave comments, and share for more content
  • Accepting Basic Attention Token (BAT) tips via Brave browser