Static route confusion.....!

Unanswered Question

Hi,

I'm having a confusion on static routing!

Let's say we have two static routes:

ip route 0.0.0.0 0.0.0.0 x.x.x.x

ip route y.y.y.y 255.255.255.255 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 0.0.0.0 route (default) or it will get dropped?

....and why?

--gaurav

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

Hi,

the x.x.x.x and z.z.z.z are the next hop for the networks 0.0.0.0 0.0.0.0 (default route) and y.y.y.y 255.255.255.255 (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.

Massimiliano

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

Guarav

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 255.255.255.255 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.

HTH

Jon

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

G:

The ip route 0.0.0.0 0.0.0.0 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.

HTH

If so, please rate this post.

Victor

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...

Thanks

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

Gaurav

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.

Jon

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

gaurav

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.

HTH

Rick

Actions

This Discussion