Static route confusion.....!

Unanswered Question


I'm having a confusion on static routing!

Let's say we have two static routes:

ip route x.x.x.x

ip route y.y.y.y z.z.z.z

Here, z.z.z.z is one link to one destination and x.x.x.x is other destination via another link of the same router.

Now what will happen if I put formar link

i.e. z.z.z.z down by doing 'shutdown' on serial interface, Does the packet to destination y.y.y.y will follow route (default) or it will get dropped?

....and why?


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading. Sat, 03/08/2008 - 07:46


the x.x.x.x and z.z.z.z are the next hop for the networks (default route) and y.y.y.y (single host in this case!). Next hop is on the same netowrk of interface you defined on the router..but when you shut down one interface, you "shut down" the route toward next hop. The packet for that destination follow the default route, because router sees the routing table and when there is no specific route toward network, it will forward the packet toward the next hop of the default route (in this case x.x.x.x).

I hope this helps.

Best regards.


Jon Marshall Sat, 03/08/2008 - 07:47


The packet will follow the default route. The reason being that if you shut the serial interface down and z.z.z.z is reached via that serial interface then the static route

y.y.y.y z.z.z.z

will be removed from the routing table so there is now the default route left. Assuming you haven't got a more specific route in your routing table for y.y.y.y then it will use the default route.



lamav Sat, 03/08/2008 - 07:57


The ip route x.x.x.x command is called a default route. This is the route to be used in the event that the router cannot find a prefix match in its routing table for a given network. A default route, also known as the gateway of last resort, is the network route used by a router when no other known route exists for a given IP packet's destination address.

So, if you bring down the interface that the static route for network y.y.y.y points to, that static route will be removed from the routing table. The router will then forward the packet according to the default route.

It would have perhaps been a bit less confusing had you posted actual IP addresses.


If so, please rate this post.


lamav Sat, 03/08/2008 - 08:02

Damn, we jumped on this one but good! LOL...

I would not have intruded had I seen your informative posts before responding...


Jon Marshall Sat, 03/08/2008 - 08:52


The route should disappear from the routing table however if the z.z.z.z is the next hop there is a slight delay after you shut the interface before it is removed. At least in my lab although i was testing on an Ethernet interface.


Richard Burts Sat, 03/08/2008 - 08:59


If the interface that has z.z.z.z is shut down (and assuming that z.z.z.z is not reachable through some other interface) then the static route should be removed from the table. To help us understand better what is going on perhaps you could supply some additional information?

Would you post the output of show ip route when the interface is up, then shut down the interface, and post the output of show ip route when the interface is shut down? It would also be helpful to have the output of show ip interface brief when the interface is shutdown.

I am wondering if there is an alternate path to z.z.z.z and whether the next hop for y.y.y.y changes when the interface is shut down.




This Discussion