nerdexam
GIAC

GSEC · Question #59

Regarding the UDP header below, what is the length in bytes of the UDP datagrarn? 04 1a 00 a1 00 55 db 51

The correct answer is D. 85. In the UDP header, bytes 4-5 contain the Length field, and 0x0055 converts to 85 decimal, representing the total datagram size in bytes.

Networking and Core Concepts

Question

Regarding the UDP header below, what is the length in bytes of the UDP datagrarn? 04 1a 00 a1 00 55 db 51

Options

  • A161
  • B81
  • C219
  • D85

How the community answered

(29 responses)
  • A
    7% (2)
  • B
    17% (5)
  • C
    3% (1)
  • D
    72% (21)

Why each option

In the UDP header, bytes 4-5 contain the Length field, and 0x0055 converts to 85 decimal, representing the total datagram size in bytes.

A161

161 (0x00A1) is the value of the Destination Port field found in bytes 2-3, not the Length field.

B81

81 (0x51) is the second byte of the Checksum field located at byte 7 of the header, not a length value.

C219

219 (0xDB) is the first byte of the Checksum field at byte 6 of the header, not the Length field.

D85Correct

The UDP header is structured as four 2-byte fields: source port (bytes 0-1: 0x041A = 1050), destination port (bytes 2-3: 0x00A1 = 161), length (bytes 4-5: 0x0055 = 85), and checksum (bytes 6-7: 0xDB51). The Length field specifies the total size of the UDP datagram including the 8-byte header and payload. Converting 0x0055 from hexadecimal to decimal yields 85 bytes.

Concept tested: UDP header structure and length field parsing

Source: https://www.rfc-editor.org/rfc/rfc768

Topics

#UDP header#protocol analysis#hex decoding#datagram length

Community Discussion

No community discussion yet for this question.

Full GSEC Practice