# Question on IP Datagram

Can somebody please tell me this:

If a datagram contains one 8-bit option and one 8-bit data value, what values will be found in the header fields H.LEN and TOTAL LENGTH?
###### Who is Participating?

IT ManagerCommented:

As an EXAMPLE, an IP datagram within an 82 byte ethernet frame would breakdown as follows.

Total frame size - 82 bytes
IP length - 68 bytes

So the frame is made of of 68 bytes of IP stuff, 20 bytes of which is header, and 14 bytes of ethernet stuff.

Good luck.
Steve

0

Author Commented:
Thanks Steve.
Though it exactly did not give me the answer, it gave an idea of how to proceed.

Thanks.
0

Commented:
Hi,

first of all 20 bytes is the minimum for the IP header, so if you have a 8 bit option header length of the IP datagram will be 28 bytes. Total length of the IP datagram (packet, datagram->UDP packet)will be 28 + 8=36 bytes. However if we talk about Ethernet, as the minimum length of a packet must be 64 bytes, some padding bytes will be added to this packet after the Ethernet packet is added.

regards...
0

Commented:
Also I would like to add that the dimension of the header lenth in the IP packets is 32 bits so the options that are shorter than 32 bits are padded to 32 bits long. And with an option of 8 bits you will have a header length value of (20 + 4(4 instead of 1))*8bits/32bits=6.

cincin
0

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

I recommend: points to SteveJ

if there is any objection or other expert commentary to this recommendation then please post in here within 7 days.

thanks,
lrmoore
EE Cleanup Volunteer
---------------------
0

Commented:
Comment from expert accepted as answer

Computer101