Reviewed: No
- Data + Layer 4 Header (TCP/UDP): Known as a segment.
- Segment + Layer 3 Header (IP): Known as a packet.
- Packet + Layer 2 Header and Trailer: Known as a frame.
- Version (4 bits)
- Identifies the IP version (4 for IPv4).
- Binary value for IPv4 is 0100.
- Internet Header Length (IHL) (4 bits)
- Specifies the header length in 4-byte increments.
- Minimum value is 5 (20 bytes), and the maximum is 15 (60 bytes).
- Differentiated Services Code Point (DSCP) (6 bits)
- Used for Quality of Service (QoS) to prioritize certain types of traffic.
- Explicit Congestion Notification (ECN) (2 bits)
- Signals network congestion without dropping packets.
- Total Length (16 bits)
- Indicates the total length of the packet (header + data) in bytes.
- Maximum value is 65,535 bytes.
- Identification (16 bits)
- Identifies fragments of a packet, allowing reassembly.
- Flags (3 bits)
- Bit 0: Reserved, always 0.
- Bit 1: Don't Fragment (DF) bit. Set to 1 to prevent fragmentation.
- Bit 2: More Fragments (MF) bit. Set to 1 if more fragments follow.
- Fragment Offset (13 bits)
- Indicates the position of a fragment in the original packet.
- Time to Live (TTL) (8 bits)
- Limits the lifespan of a packet, preventing infinite loops. Decreased by 1 at each hop.
- Protocol (8 bits)
- Indicates the protocol of the encapsulated data (6 for TCP, 17 for UDP, 1 for ICMP, 89 for OSPF).
- Header Checksum (16 bits)
- Error-checking the header. Calculated and verified by routers.
- Source IP Address (32 bits)
- The IPv4 address of the sender.
- Destination IP Address (32 bits)
- The IPv4 address of the intended receiver.
- Options (0-320 bits)
- Optional field for additional information. Rarely used.
- IPv4 Header Size: The minimum is 20 bytes (no options), and the maximum is 60 bytes (maximum options).
- Fragmentation: Handled by the Identification, Flags, and Fragment Offset fields. Fragments reassembled by the receiving host.
- TTL: Prevents endless loops by limiting the number of hops a packet can take.
- Checksum: Ensures header integrity. If mismatched, the packet is dropped.
- Packet Analysis: Identified and analyzed the different parts of the IPv4 header and the encapsulated data using Wireshark.
- Fragmentation Example: Demonstrated packet fragmentation and reassembly, including the use of the DF bit and fragment offset.
- What is the fixed binary value of the first field of an IPv4 header?
- Answer: D, 0100 (Version field for IPv4).
- Which field will cause the packet to be dropped if it has a value of 0?
- Answer: A, TTL (Time To Live).
- How are errors in an IPv4 packet’s encapsulated data detected?
- Answer: B, the encapsulated protocol (TCP/UDP) checks for errors.
- Which field of an IPv4 header is variable in length?
- Answer: A, Options.
- Which bit will be set to 1 on all IPv4 packet fragments except the last fragment?
- Answer: B, More Fragments bit.