- #1
shivajikobardan
- 674
- 54
TBH I don't really understand the question that I am asking myself.
I was inspired asking this from my textbook "Do you know".
Can you make me understand why would not we require total length field?
Here's a similar question-:
https://serverfault.com/questions/508866/why-is-there-a-total-length-field-in-the-ipv4-header
references-: http://units.folder101.com/cisco/sem1/Notes/ch2-osi/osi.htm
I will write the answer that my book says(please explain this, i understand little bit of this vaguely)-:
in many cases, we really don't need the value of this field. however, there are occasions in which the datagram is not the only thing encapsulated in a frame, it may be that padding has been added. eg the ethernet protocol has a minimium and maximum restriction on the size of data that can be encapsulated in a frame(46-1500 bytes). If the size of an IP datagram is less than 46 bytes, some padding will be added to meet this requirement. In this case, when a machine decapsulates the datagram, it needs to check the total length field to determine how much is data and how much is padding.
Is there some visual ways to understand this? I feel like understanding this will clear lots of my basics of networking (about TCP/IP model and how it works even tho I have already studied about it.)
I was inspired asking this from my textbook "Do you know".
Can you make me understand why would not we require total length field?
Here's a similar question-:
https://serverfault.com/questions/508866/why-is-there-a-total-length-field-in-the-ipv4-header
references-: http://units.folder101.com/cisco/sem1/Notes/ch2-osi/osi.htm
I will write the answer that my book says(please explain this, i understand little bit of this vaguely)-:
in many cases, we really don't need the value of this field. however, there are occasions in which the datagram is not the only thing encapsulated in a frame, it may be that padding has been added. eg the ethernet protocol has a minimium and maximum restriction on the size of data that can be encapsulated in a frame(46-1500 bytes). If the size of an IP datagram is less than 46 bytes, some padding will be added to meet this requirement. In this case, when a machine decapsulates the datagram, it needs to check the total length field to determine how much is data and how much is padding.
Is there some visual ways to understand this? I feel like understanding this will clear lots of my basics of networking (about TCP/IP model and how it works even tho I have already studied about it.)