IPV4 Header Format 1 (Two)
IPV4 Header Format 1 (Two)
IPV4 Header
Version (4 bits):
It's measured in 32-bit words. Since the base header is 20 bytes (5 x 32 bits),
the minimum value is 0101 (5). The maximum is 1111 (15), indicating a 60-byte header (15 x 32 bits).
•Example:
•If a packet uses the "record route" option, the IHL will be greater than 5.
•Importance: This field lets the receiving device know where the header ends and the data payload begins.
Differentiated Services (DS) Field (8 bits):
• Detail: This field is crucial for QoS. It's subdivided:
• DSCP (Differentiated Services Code Point) (6 bits): Defines the priority of the packet. Values are standardized to
indicate different traffic classes (e.g., expedited forwarding for VoIP, assured forwarding for various levels of
priority).
• ECN (Explicit Congestion Notification) (2 bits): Allows routers to signal congestion to the endpoints without
dropping packets.
• Examples:
• A VoIP packet might use a DSCP value that prioritizes it for low latency.
• A file transfer might use a lower-priority DSCP value.
• Routers that are experiencing congestion can set the ECN bits, so that the sending computer can slow down its
transmission rate.
• Detail: This field specifies the total size of the IP packet (header +
data) in bytes. The maximum value is 65,535 bytes (2^16 - 1).
• Necessity: This field allows the receiving device to know the complete
size of the packet.
Identification (16 bits), Flags (3 bits), and
Fragment Offset (13 bits):
• Detail: These fields are essential for IP fragmentation:
• Identification: A unique value assigned to each packet, used to reassemble fragments.
• Flags:
• Reserved (1 bit): Must be 0.
• Fragment Offset: The position of the fragment's data relative to the original packet's
data, measured in 8-byte blocks.
Identification (16 bits), Flags (3 bits), and Fragment
Offset (13 bits):
• Example:
• A 4,000-byte packet needs to be sent over a network with a maximum transmission unit (MTU)
of 1,500 bytes.
• It's fragmented into three packets.
• Each fragment has the same Identification value.
• The MF flag is set in the first two fragments.
• The fragment offset field allows the recieving host to reassemble the packets in the correct
order.
• Example: If the protocol field is 6, the data payload contains a TCP segment.
• Importance: Enables demultiplexing at the receiving host, directing the data to the
correct application.
Header Checksum (16 bits):
• Detail: A simple error-detection mechanism. The sender calculates the checksum
and inserts it into the header. The receiver recalculates the checksum and compares
it to the received value. If they don't match, the packet is discarded. It only checks
the header, not the data.
• Limitation: It is not a very robust error detection method, and higher level protocols
such as TCP and UDP also implement their own checksums.
• Example: The "record route" option can be used for network troubleshooting.
• Usage: Used for specialized network tasks.