Unused protocol features (ip options)
Djerk | 18 Feb 2006 21:34Anyone ever heard of ‘Strict Source Routing’ or ‘Loose Source Routing’?
Well it’s in IPv4, CLNP and IPv6, but no-one seems to use it. Please leave a comment if you think I’m wrong! It could be ever so usefull for network monitoring and reporting if one could specify the route a packet should take. One could test, monitor or report on links / paths which one can’t do now due to SFP (Shortest Path First) routing, if only… Sigh
Hint: http://www.iana.org/assignments/ip-parameters
Appears the world has not been standing still, googling for “ip option” “source route” gives enough examples of what RFC’s are involved (RFC791 or others) and how to use these options in different OSes (Operating Systems). For example Windows:
C:\Documents and Settings\user>ping /?
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] target_nameOptions:
-t Ping the specified host until stopped.
To see statistics and continue – type Control-Break;
To stop – type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don’t Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.
Ip options in Linux, grep ip.h for ‘IPOPT’:
suzy:~# less /usr/include/netinet/ip.h | grep IPOPT
u_int8_t ipt_code; /* IPOPT_TS */ #define IPOPT_COPY 0x80 #define IPOPT_CLASS_MASK 0x60 #define IPOPT_NUMBER_MASK 0x1f #define IPOPT_COPIED(o) ((o) & IPOPT_COPY) #define IPOPT_CLASS(o) ((o) & IPOPT_CLASS_MASK) #define IPOPT_NUMBER(o) ((o) & IPOPT_NUMBER_MASK) #define IPOPT_CONTROL 0x00 #define IPOPT_RESERVED1 0x20 #define IPOPT_DEBMEAS 0x40 #define IPOPT_MEASUREMENT IPOPT_DEBMEAS #define IPOPT_RESERVED2 0x60 #define IPOPT_EOL 0 /* end of option list * #define IPOPT_END IPOPT_EOL #define IPOPT_NOP 1 /* no operation */ #define IPOPT_NOOP IPOPT_NOP #define IPOPT_RR 7 /* record packet route */ #define IPOPT_TS 68 /* timestamp */ #define IPOPT_TIMESTAMP IPOPT_TS #define IPOPT_SECURITY 130 /* provide s,c,h,tcc */ #define IPOPT_SEC IPOPT_SECURITY #define IPOPT_LSRR 131 /* loose source route */ #define IPOPT_SATID 136 /* satnet id */ #define IPOPT_SID IPOPT_SATID #define IPOPT_SSRR 137 /* strict source route */ #define IPOPT_RA 148 /* router alert */ #define IPOPT_OPTVAL 0 /* option ID */ #define IPOPT_OLEN 1 /* option length */ #define IPOPT_OFFSET 2 /* offset within option */ #define IPOPT_MINOFF 4 /* min value of above */ #define MAX_IPOPTLEN 40 #define IPOPT_TS_TSONLY 0 /* timestamps only */ #define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ #define IPOPT_TS_PRESPEC 3 /* specified modules only */ #define IPOPT_SECUR_UNCLASS 0x0000 #define IPOPT_SECUR_CONFID 0xf135 #define IPOPT_SECUR_EFTO 0x789a #define IPOPT_SECUR_MMMM 0xbc4d #define IPOPT_SECUR_RESTR 0xaf13 #define IPOPT_SECUR_SECRET 0xd788 #define IPOPT_SECUR_TOPSECRET 0x6bc5
Categories: CCIE R&S, Networking
1 Comment »
One Response to “Unused protocol features (ip options)”
Well it’s in IPv4, CLNP and IPv6, but no-one seems to use it.
I use it for past 10 years whenever I can – this is efficient way to see routing from customer prospective without actually logging in to their router (just just specify CPE in the list of required/desired hops). Unfortunatelly, most of the time you can’t use it because due to security reason almost all routers are configured to prohibit source routing.