There are two types of Source Routing possible in IP packet.
Loose Source and Record Route
The loose source and record route (LSRR) option provides a means for the source of an internet datagram to supply routing information to be used by the gateways in forwarding the datagram to the destination, and to record the route information.MAC header | IP header | IP option 3 | Data ::: |
IP Option 3:
00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | Length | Pointer | Route [] ::: |
Type. 8 bits. Always set to 131.
00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 |
---|---|---|---|---|---|---|---|
C | Class | Option |
C, Copy flag. 1 bit. Set to 1.
Indicates the option is to be copied into all fragments.
Class. 2 bits. Cleared to 0.
The option is a control option.
Option. 5 bits. Set to 3.
The IP option number.
Length. 8 bits.
Total length of the option in bytes.
Pointer. 8 bits.
Route []. Variable length.
An array of 32 bit IP addresses.
Strict Source and Record Routes
The strict source and record route (SSRR) option provides a means for the source of an internet datagram to supply routing information to be used by the gateways in forwarding the datagram to the destination, and to record the route information.The recorded route address is the internet module's own internet address as known in the environment into which this datagram is being forwarded.This procedure of replacing the source route with the recorded route (though it is in the reverse of the order it must be in to be used as a source route) means the option (and the IP header as a whole) remains a constant length as the datagram progresses through the internet.This option is a strict source route because the gateway or host IP must send the datagram directly to the next address in the source route through only the directly connected network indicated in the next address to reach the next gateway or host specified in the route.Must be copied on fragmentation. Appears at most once in a datagram.MAC header | IP header | IP option 9 | Data ::: |
IP Option 9:
00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | Length | Pointer | Route Data [] ::: |
Type. 8 bits. Set to 137.
00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 |
---|---|---|---|---|---|---|---|
C | Class | Option |
C, Copy flag. 1 bit. Set to 1.
Indicates the option is to be copied into all fragments.
Class. 2 bits. Cleared to 0.
This is a control option.
Option. 5 bits. Set to 9.
The IP option number.
Length. 8 bits.
Total length of the option.
Pointer. 8 bits. 4 to 255
The pointer into the route data indicates the byte which begins the next source address to be processed. The pointer is relative to this option.
If the address in destination address field has been reached and the pointer is not greater than the length, the next address in the source route replaces the address in the destination address field, and the recorded route address replaces the source address just used, and pointer is increased by four.
Route Data []. Variable length.
A route data is composed of a series of internet addresses. Each internet address is 32 bits. If the pointer is greater than the length, the source route is empty (and the recorded route full) and the routing is to be based on the destination address field.
Comments
Post a Comment