Why doesn't ping -j
work?
Loose Source Routing, specified using ping -j
, tracert -j
or pathping -g
, can be used to specify a system through which the packets should pass through before proceeding on to their destination.
However, source routing has a great potential for abuse (see later), and therefore most network administrators block all source-routed packets at their border routers.
So, in practice, Loose Source Routes aren't going to work.
This is unfortunate as the ability to see a Reverse Route (which can be done using Source Routing) would be very useful when using tracert
and pathping
to diagnose network issues.
- Normal and Reverse Routes may be (and often are) completely different ("Asymmetric").
- If they differ, a problem in the connection could be a problem with either the route to the target, or with the route back from the target.
- A problem reflected in a Traceroute output may actually not lie with the obvious system in the trace; it may rather be with some other system on the reverse route back from the system that looks, from the trace, to be the cause of the problem.
The reverse path itself is completely invisible in the normal Traceroute output.
There is an interesting article at The Dangers of Source Routing explaining the risks when Loose Source Routing is enabled.
What is source routing?
Source Routing is a technique whereby the sender of a packet can
specify the route that a packet should take through the network.
Remember that as a packet travels through the network, each router
will examine the "destination IP address" and choose the next hop to
forward the packet to. In source routing, the "source" (i.e. the
sender) makes some or all of these decisions
In strict source routing, the sender specifies the exact route the
packet must take. This is virtually never used.
The more common form is loose source record route (LSRR), in which the
sender gives one or more hops that the packet must go through
LSRR can be used in a number of ways for hacking purposes. Sometimes
machines will be on the Internet, but will not be reachable. (It may
be using a private address like 10.0.0.1). However, there may be some
other machine that is reachable to both sides that forwards packets.
Someone can then reach that private machine from the Internet by
source routing through that intermediate machine.
Source Source Routing
Should source routing be disabled?
Cisco routers normally accept and process source routes. Unless a
network depends on it, source routing should be disabled.
Source routing is a technique whereby the sender of a packet can
specify the route that a packet should take through the network. As a
packet travels through the network, each router will examine the
destination IP address and choose the next hop to forward the packet
to. In source routing, the "source" (i.e., the sender) makes some or
all of these decisions.
Attackers can use source routing to probe the network by forcing packets into specific parts of the network. Using source routing, an
attacker can collect information about a network's topology, or other
information that could be useful in performing an attack. During an
attack, an attacker could use source routing to direct packets to
bypass existing security restrictions.
Source IP-source routing is enabled for the router (CiscoIpsourceRoutingEnabled)
What is a reverse route?
Any connection over the Internet actually depends on two routes: the
route from your system to the server, and the route from that server
back to your system. These routes may be (and often are) completely
different (asymmetric). If they differ, a problem in your connection
could be a problem with either the route to the server, or with the
route back from the server. A problem reflected in a traceroute output
may actually not lie with the obvious system in your trace; it may
rather be with some other system on the reverse route back from the
system that looks, from the trace, to be the cause of the problem.
So a traceroute from you to the server is only showing you half of the
picture. The other half is the return route or reverse route. So how
can you see that route?
In the good old days, you could use source routing with traceroute to
see the reverse trace back to you from a host. The idea is to specify
what is called a loose source route, which specifies a system your
packets should pass through before proceeding on to their destination.
The ability to use loose source routing to see the reverse route could
be pretty handy. Unfortunately, source routing has a great potential
for abuse, and therefore most network administrators block all
source-routed packets at their border routers. So, in practice, loose
source routes aren't going to work.
These days, the only hope you likely have of running a reverse
traceroute is if the system you want to trace from has a traceroute
facility on their web site. Many systems, and Usenet providers in
particular, have a web page where you can run a traceroute from their
system back to yours. In combination with your trace to their system,
this can give you the other half of the picture. I have a list of
Usenet provider traceroute pages here.
Source Using Tracert