15.8k views
3 votes
A datagram is carrying 1024 bytes of data. If there is no option information, what is the value of the header length field? What is the value of the total length field?

User Matt Dnv
by
8.3k points

1 Answer

5 votes

If we are using IPv4, the header length is 20 bytes. The total length value of the field is 1044 bytes.

In networking, the header of a datagram contains several fields including the header length field and the total length field. The values of these fields depend on protocol in use like IPv4 or IPv6.

IPv4:

The header length field in an IPv4 header is a 4-bit field.

The total length field in an IPv4 header is a 16-bit field.

If there is no option information, then, the header length is typically 20 bytes (5 words).

The total length value is the sum of the header length and the data length.

In this case, it would be 20 bytes (header) + 1024 bytes (data) = 1044 bytes.

Therefore, the total length value of the field is 1044 bytes.

The full question is:

A datagram is carrying 1024 bytes of data. If there is no option information, what is the value of the header length field? What is the value of the total length field?

User LeeHolmes
by
7.5k points