Are you able to ping 126.96.36.199.....???
(but output interface fa0/0 is up )
since this is an ethernet interface it will always shows up up ....it is a P to P connectivity ..??/..
share the out put of sh ip route ...
Given the information provided, it could exist, but only because someone put it there ... but it'll never work (if the router is configured with conventional parameters).
Generally speaking, the "next hop" should be an interface that exists in the same segment as the host that needs to use it.
That said, you add nearly any static route into the routing table, it doesn't make the route valid; it's just saying "if you see a packet for this network, send it to this address" if the address is invalid, the packet gets dropped.
martin also check if 188.8.131.52 is not reachable and the same router is having default router in that case the route is not going to flush from the routing table. Remeber one thing that static routes are recursive in nature. For that you need to add the route like given
ip route 10.10.10.10 255.255.255.0 ser0/0 184.108.40.206
After adding that route if the serial interface will down the route will flush from routing table.
Shivlu, it seems that you are quite confused about how static routing works.
As ScottMac ha explained before, a correct static router aleways uses a directly connected next-hop address or interface.
Pointing a static route to another static route doesn'tmake any sense and should not be done.
Also, the ip route example that you gave, specifies both an interface and a next-hop address. That is never required.
Please make sure that you have full command of matters when you reply, as you can induce others in confusion and errors.
I believe that it is quite a stretch to say:"a correct static router aleways uses a directly connected next-hop address". You might say that it is best practice or you might say that it is preferred, but to say "always" goes too far.
Cisco's implementation of static routes is recursive, and it is quite valid to have a static routes whose next hop is not directly connected but is reached through some other entry in the routing table. We could create an example of when we might want to do this by thinking of 4 routers in a diamond patter with routers A, B, C, and D and with routers A and D at opposite ends of the diamond. So A can reach D through B or through C. Now assume that A wants to reach some destination that is outbound of router D, A needs to get to D to get to the destination. In your rule where a correct static always uses a directly connected next hop A could only have a static with B as the next hop or a static with C as the next hop. But it may be advantageous to have the static on A for the destination specify the address on D as the next hop, which gives the single static route the ability to use either of the neighbor routers.
Rick, I don't agree with that approach.
Even if cisco routing is forgiving of the bad practice of using a non directly connected next-hop, its use generates confusing configurations that are in direct contrast to the basic hop-by-hop paradigm of IP routing.
I understand that in iBGP recursive routing must be used, however in that case it is done by design and in a controlled manner.
In your example, if all static routing is to be used, A must be able to reach D via explicitly configured B and C routes. The same should be done for any destination behind D, without seeking configuration shortcuts. If you want less configuration work, use a routing protocol instead of a topology-hiding kludge.
At least, that is the way I and my peers have been taught to do in 20 years of IP networking.
I confirm that static routes can be configured with a non-directly connected next-hop. The best practice is to avoid them because they converge more slowly and can create unexpected routing loops. Also, static routes that reference interfaces only are recommended when the corresponding interface is point-to-point. In all other cases, the recommendation is to use both output interface and next-hop. That is so because, in most other cases, if only the next-hop is specified, the outgoing interface is determined by recursive routing lookup. If only the interface is specified, another step is needed to find the next-hop. All these are described in detail in the book Cisco IP Routing by Alex Zinin, which is (surprisingly) not from cisco press and I would call it the bible of IGP routing.
the recommendation is to use both output interface and next-hop
Why? A next-hop on a multi-access interface already identifies uniquely the interface to be used. Unless you want to use that to prevent recursive routing precisely, however in sane networks I never saw that need.
The interface to be used is seemingly identified automatically via the next-hop, but, as is the case with many computer functions perceived as automatic by humans, some machine has to do some more work to maintain the automatic illusion and some programmer wrote some code that actually instructs the machine to do the required task. The router has to determine the interface out of which the particular next hop is reachable, which means more work for the machine. Still, the most common pitfall to avoid in practical situations is to not specify only an outgoing interface in multi-access segments.
p.s. In my first semester in technical school (that would be 13 years ago) we were asked to write a program that added fractions. I had never used a computer before (there were no computers in the village I come from) and I was left with mouth open: Do you really mean that a computer cannot add fractions? :-)))
Maria, the way you present your arguments is so convincing that from now on I'll have interface and next-hop tattooed on the router case.
When I began technical school, our only preoccupation was to destroy anything. I've improved a lot since then, however.
Specifing an interface as well as a next hop is useful when you're injecting a static route into BGP (ie on the edge of two routing domains).
If the interface goes down the route will stop being advertised into BGP and BGP will find an alternative route (second entry point).
If you don't specify an interface parameter the route will still be advertised into BGP if there is a recursive lookup available (ie via a default route). This is probably not desirable!!
I agree with what you said except that recursive routes are never installed in table by virtue of default.
You need a specific route to the distant next-hop for a recursive route to be effective.
Lets take the original example, if you have the following configured
ip route 10.10.10.10 255.255.255.0 220.127.116.11
and you have an interface with IP 18.104.22.168. Now the interface goes down. Normally this route will disappear from the routing table unless the router thinks it can still get to it via a default route or a summarised route (ie 20.20.0./16). If there is another less specific route in the table to the next hop then it will still place the static route into the table because it can do a recursive lookup.
I hope that makes sense?
If you are then advertising that static into a routing protocol then you can end up with a routing loop. That's where specifying the interface and next hop IP is useful.
I understand you explanation. My objection is that a default route is not usable to install a recursive route. You can try that yourself.
Since you specifically have mentioned default in your examples, I wanted to clarify that this is not the case.