Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Spotlight January 2018 Silver

Differences between statics routes

Hi I have a doubt using statsic routes, What is the difference if I use:

ip route 0.0.0.0 0.0.0.0 10.10.10.1

or

ip route 0.0.0.0 0.0.0.0 serial 0/0 10.10.10.1

or

ip route 0.0.0.0 0.0.0.0 serial 0/0

or

ip route 0.0.0.0 0.0.0.0 10.10.10.1 permanet

when should I use one of another?}

Thanks

Regards

Leo

9 REPLIES

Re: Differences between statics routes

Hi Leo

The last command should be avoided mostly coz by adding the permanent keyword the route will not be removed from the routing table when your interface goes down.

That will result in getting your traffic dropped since the route is there in the routing table but still the path to reach the next hop is unavailable...

Its always preferable to use ip route x.x.x.x x.x.x.x serial x/x so that when the serial link goes down the route will be moved out of the routing table and traffic will be diverted via the backup path...

ip route x.x.x.x x.x.x.x serial 0/0 10.10.10.1 i would rather use this when i am in a situation to route the traffic via an ethernet interface so that i can point the traffic via the ethernet interface and mention the next hop ip address to go out to the external world...

First statement is normal statment which simply routes all the traffic to the next hop which is mentioned over there in the next hop option..

You can use this option when you dont have any secondary backup path defined...

If you have some secondary backup path defined then i would suggest to go with ip route x.x.x.x x.x.x.x serial 0/0 followed with another route (static floating route) with some admin distance attached to it...

so that once the primary goes off the secondary route(static floating route) will be installed in the routing table and the traffic will be routed via the same...

regds

Re: Differences between statics routes

HI Prem,

I don't understand your explanation on:

ip route 0.0.0.0 0.0.0.0 serial 0/0 10.10.10.1

Can you please explain still more in detail or if you can provide some Link / documentation for complete understanding of Various usage of IP Route Commands.

Best Regards,

Guru Prasad R

Cisco Employee

Re: Differences between statics routes

Hi Leo,

If you point a static route to an interface, the route is inserted into the routing table only when the interface is up. This configuration is not recommended because when the next hop of a static route points to an interface, the router considers each of the hosts within the range of the route to be directly connected through that interface. For example, ip route 0.0.0.0 0.0.0.0 S0.

With this type of configuration, a router performs Address Resolution Protocol (ARP) on the Ethernet for every destination the router finds through the default route because the router considers all of these destinations as directly connected to Ethernet 0.

This kind of default route, especially if it is used by a lot of packets to many different destination subnets, can cause high processor utilization and a very large ARP cache.So you can use a default route pointing to a next hop IP which will take care of all these issues.Specifying a numerical next hop on a directly connected interface prevents the router from performing ARP or each destination address.

However, if the interface with the next hop goes down and the numerical next hop is reachable through a recursive route, you should specify both the next hop IP address and the interface through which the next hop should be found. For example, ip route 0.0.0.0 0.0.0.0 serial 0/0 10.10.10.1

With ip route 0.0.0.0 0.0.0.0 10.10.10.1 permanent, the route will not be removed, even if the interface shuts down.

HTH,Please rate if it does.

-amit singh

Community Member

Re: Differences between statics routes

My understanding is that if you point a route out an interface that it has a shorter AD (0) then if you point it out a next-hop address (AD of 1). I'm also told that if you go out over an interface versus a next hop that your routing happens faster because its hardware based and not software.

I've never heard that running a route out of an interface slows down the process but Amit is a smart guy so I wouldn't argue the point with him but from my experience its always worked well for us.

Hall of Fame Super Bronze

Re: Differences between statics routes

Wil,

Your AD statement is incorrect.

R1#sh run | i ip route 0.0.0.0

ip route 0.0.0.0 0.0.0.0 10.141.12.2

R1#sh ip route 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "static", distance 1, metric 0, candidate default path

Routing Descriptor Blocks:

* 10.141.12.2

Route metric is 0, traffic share count is 1

R1#sh run | i ip route 0.0.0.0

ip route 0.0.0.0 0.0.0.0 Serial2/0

R1#sh ip route 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "static", distance 1, metric 0 (connected), candidate default path

Routing Descriptor Blocks:

* directly connected, via Serial2/0

Route metric is 0, traffic share count is 1

____________________

Notice, both have distance of 1

Community Member

Re: Differences between statics routes

Edsion,

my question is that if next hop router 10.141.12.2 is down, will the below route be still in the routing table?

ip route 0.0.0.0 0.0.0.0 10.141.12.2

Hall of Fame Super Gold

Re: Differences between statics routes

Joe

The answer to your question depends on the type of interface through which 10.141.12.2 is reached. In the original post in this thread the question was in terms of a serial interface. On most serial interfaces (HDLC, PPP, point to point Frame Relay) if the interface goes down the next hop through that interface is removed from the routing table. (Technically this is because those interfaces will go protocol down when they fail and when an interface goes protocol down then IOS removes next hop through the interface from the routing table.) Other types of interfaces (especially Ethernet) do not go protocol down when they fail and the IOS does not remove the next hop from the routing table.

I note that the original post was in terms of serial interface static routes and that Amit changed the frame of reference of the question when he talked about doing ARP. His comments are quite correct about static routes pointing to output interfaces when the output interface is Ethernet. Through an Ethernet interface the router must ARP for every individual destination address which leads to increased CPU utilization (to generate the request and process the response), leads to increased memory utilization (to store the greatly increased ARP table), and is dependent on the next hop router enabling proxy ARP.

So a static route specifying an output interface is problematic on Ethernet interfaces. But those disadvantages are not present when the static route points out a (point to point) serial interface.

So to answer your question if 10.141.12.2 is reachable through a point to point serial interface and becomes unreachable then the IOS should remove the route from the routing table. But if 10.141.12.2 is reachable through an Ethernet interface and becomes unreachable then the route will still appear in the routing table.

For a number of years I was a Certified Cisco Systems Instructor (CCSI # 94069) and I acknowledge that neither the training materials nor the documentation is very clear about the impact of interface type on how static routes work. I had to go through a number of experiences of trying to figure out static routes that worked as expected and other static routes that did not work as expected before I really realized the importance of interface type in the way that static routes work.

HTH

Rick

Community Member

Re: Differences between statics routes

Rick,

Great post,i have tested what you said on Ethernet media, it's true that even next hop is not reachable the static route is still in the table.

Thx

Joe

Hall of Fame Super Gold

Re: Differences between statics routes

Joe

Thanks for the compliment.

It is one of the subtle differences that with normal serial (point to point) that if the next hop is not reachable the static route is withdrawn (because the serial interface will go protocol down when the next hop is not reachable). But with Ethernet the route stays in the table.

Cisco has added a fairly new capability to deal with this. It is reliable static routing with object tracking.

HTH

Rick

178
Views
15
Helpful
9
Replies
CreatePlease to create content