nerdexam
GIAC

GSEC · Question #140

Where is the source address located in an IPv4 header?

The correct answer is D. At an offset of 12 bytes. The IPv4 source address field is a 32-bit value located at byte offset 12 from the start of the IP header, as defined by RFC 791.

Networking and Core Concepts

Question

Where is the source address located in an IPv4 header?

Options

  • AAt an offset of 20 bytes
  • BAt an offset of 8 bytes
  • CAt an offset of 16 bytes
  • DAt an offset of 12 bytes

How the community answered

(36 responses)
  • A
    3% (1)
  • B
    8% (3)
  • C
    11% (4)
  • D
    78% (28)

Why each option

The IPv4 source address field is a 32-bit value located at byte offset 12 from the start of the IP header, as defined by RFC 791.

AAt an offset of 20 bytes

Byte offset 20 marks the end of the minimum fixed IPv4 header where optional header fields or the payload begins, not where the source address is stored.

BAt an offset of 8 bytes

Byte offset 8 is where the TTL field begins, followed immediately by the Protocol and Header Checksum fields, which precede the source address.

CAt an offset of 16 bytes

Byte offset 16 is where the 32-bit Destination IP Address field begins, which immediately follows the source address in the header layout.

DAt an offset of 12 bytesCorrect

The IPv4 header fields follow a fixed layout: Version, IHL, DSCP, and Total Length occupy bytes 0-3; Identification, Flags, and Fragment Offset occupy bytes 4-7; TTL, Protocol, and Header Checksum occupy bytes 8-11; and the 32-bit Source Address field begins at byte offset 12. This layout is normatively defined in RFC 791 and is constant across all standard IPv4 packets.

Concept tested: IPv4 header structure and source address byte offset

Source: https://datatracker.ietf.org/doc/html/rfc791

Topics

#IPv4 header#packet structure#source address offset#byte offset

Community Discussion

No community discussion yet for this question.

Full GSEC Practice