1

I read in 2-3 places that length of IP header may change during transit from source to destination with routers in-between. However, no explanation was given as to why it might change.

According to me, the only way the length of IP header could change is when length of options field would change. For example, we have record route option where the IP address gets added each time to options field when it passes through each router giving us the entire route from source to destination. So here as IP address is added each time, the length of option field is changing.

Is this reasoning correct?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Feb 19 '18 at 19:49
3

Yes. Only options change the length of the header.

  • But which option changes the length ? – Zephyr Oct 20 '17 at 17:09
  • how will fragmentation change the IP header length ? Only the field value changes or fragmentation offset changes but the amount of bits allocated to fragmentation offset in IP header remains same. Only total length of datagram changes due to fragmentation and not IP header length. – Zephyr Oct 20 '17 at 18:33
  • I deleted my previous comment: of course I should have said RFC 791, which replaced 760, and which differs materially in this specific detail. To answer the question, some options are copied to each fragment, some appear only in the first fragment. Some can be inserted or deleted for any reason. The options eg record route defined in 791 overwrite fields in the header rather than changing length as in 760. Nevertheless, routers have been known to drop source routing and similar options. – jonathanjo Oct 21 '17 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.