Practice question

Which item is not used in the data length calculation for an IP datagram?

  1. Total IP Datagram Length
  2. IP Header Length
  3. TCP Header Length
  4. UDP Header Length

Answer: D — UDP Header Length

In IPv4, the IP datagram’s length is determined using two fields: the total length and the IP header length. The total length tells you the entire size of the datagram (header plus data), and the header length (IHL) tells you how long the header itself is. To find the payload size carried inside the IP datagram, you subtract the header length from the total length. That payload includes the transport layer header (if present) and the actual data, but the calculation of the IP datagram’s data length does not rely on the length of the transport-layer headers. Therefore, the length of the UDP header is not used in computing the IP datagram’s data length.

Practice more: GCIA Fundamentals of Traffic Analysis Practice Test →