03-08-2006 02:17 AM - edited 03-03-2019 11:59 AM
Hi,
Wanted to ask some details about the IP Options field in the IP header of the packet.
Scenario:
Suppose a router is configured such that it edits the IP options field of the packed in the IP header(adds some information).
What do the other routers on the way to the server do ? Whether they just forward the packet with the IP Options information unchanged or they create a new IP header with the IP Options information lost.
Providing some links would be appreciated.
Thanks in advance
03-08-2006 02:25 AM
Hi Amit,
The best reference for this info is RFC791.
The IP header is not replaced by routers along to the way to the destination. Depending on the exact nature of the Options, values in the Options field may be changed by routers along the way. For example, the Loose Source and Record Route option will result in routers along the way recording their addresses within the options field (hence the record route).
Hope that helps - pls rate the post if it does.
Paresh
03-08-2006 02:47 AM
Thanks for the replies.
As you mentioned about the Loose Source and Record Route Option,can you add more to this.
1. These options are set by the sender of the packet right ? or it can be set by the router too.
2. Are there any options in the IP header which can be set by the router such that it would effect the IP Options field of the packet.
3. If the options like Loose Source and Record Route are set by the sender then is it possible to configure the router to disable all the options that affect the IP Options field. So that we can make sure that the information edited in the IP Options will remain unchanged until it reaches the server.
Thanks in advance.
03-08-2006 03:00 AM
Amit,
You can use the 'ip options {drop | ignore}' command in IOS to tell the router what to do with IP Options. If the 'drop' keyword is used, the router will drops all IP packets with Options that it receives. If the 'ignore' command is used, the router ignores all options and treats the packets as though they did not have any IP options. (The options are not removed from the packetjust ignored.)
Pls remember to rate posts.
Paresh
03-08-2006 08:50 PM
Thanks for the replies.
But can u also guide me to the remaining questions :
1. Whether there are any Options like the Loose Source and Record Route Options (which would effect the IP Options field) set by any router ? Or they are set only by the sender of the packet.
2. If the options (like Loose Source and Record Route) are set by the sender then is it possible to configure the router to disable all the options that affect the IP Options field. ?
Thanks in advance.
03-08-2006 08:53 PM
1. When a packet is originated by a router, it is free to include any options it wishes. In that sense, it behaves like a host, so it is free to add IP options.
2. Yes. As I mentioned in my last post, the router can choose to ignore options set by any hosts.
Hope that helps - pls rate the post if it does.
Paresh
03-08-2006 09:05 PM
Thanks the replies were very helpful.
Here you mentioned a IOS command to configure the router, but can you tell what would be the default behaviour. Whether it will drop or ignore. Or whether it depends on the person who configures the router configuration. ?
Also wanted to confirm on what happens when a router receives a packet.
It just changes the source and destination MAC addresses and calculates the checksum of the IP header right. A new IP header is not created right ?
just the required fields are edited.
Thanks in advance.
03-08-2006 09:11 PM
Glad to be of help.
By default, routers will ignore options and pass the packets through. Also, there is another command (enabled by default), 'ip source-route' which specifies that a router will act on source-route options in an IP packet. Typically, most people will disable this option as it can be a security risk.
Tecnically, routers will not create a new header - they will modify the TTL and re-calculate the checksum. MAC addresses belong to ethernet frames, not IP headers.
Hope that helps - pls rate the post if it does.
Paresh
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide