cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2155
Views
12
Helpful
7
Replies

Editing the IP Options Field.

Hi_i_am_Amit
Level 1
Level 1

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

7 Replies 7

pkhatri
Level 11
Level 11

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

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.

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 packet—just ignored.)

Pls remember to rate posts.

Paresh

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.

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

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.

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