Provides a facility for routers to record their IP addresses, allowing a system to see the route that an IP datagram took on its way from the original source to the final destination.
- Class and Code
Class 0, Code 7
Varies as needed.
- Copy to all fragments?
No (first fragment only).
- Defined In
If a system wishes to have the route recorded, it must allocate enough space in the IP header for each device to place its IP address in the related Option-Data field.
In order to facilitate this process, the Record Route option has a separate 8-bit “pointer” field that is placed at the beginning of the Option-Data field. The pointer indicates the byte position where the IP address of the current router should be recorded. If the pointer is greater than the option length, then no more room is available. If there is sufficient space, then the router will write its four-byte IP address at the location specified by the pointer, and then increment the pointer so that it points to the next offset in the Option-Data field. (Interestingly, RFC 791 states that “if there is some room but not enough room for a full address to be inserted, the original datagram is considered to be in error and is discarded.”) The process will continue until there is no more space, or until the datagram is delivered to its final destination.
Due to the limited space available, this option is not very useful on the open Internet.