Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Static routes

Question for you....I have a cisco 2600 with 2 static routes going to the same subnet:

ip route 192.168.81.0 255.255.255.240 192.168.180.1

ip route 192.168.81.0 255.255.255.240 192.168.204.2 2

I noticed that it always takes the 180.1 route even though 204.2 is shorter is that because the 180.1 is

frist in the table or does that matter?

5 ACCEPTED SOLUTIONS

Accepted Solutions
Silver

Re: Static routes

The second route has been configured with an administrative distance of 2. By default static routes have an administrative distance of 1 (your firs route will have AD of 1 as you have not configured it for another value). If there are two (equally specific) routes to the same destination with different administrative distances, the one with the lower administrative distance will be entered in the routing table and consequently used for routing. The second route will not be entered in the routing table unless the first one disappears for some reason (interface shutting down, etc.).

In your case the route pointing to 192.168.204.2 will not be entered in the routing table. That is why you are noticing that packets always go to 180.1. You can verify this by doing a show ip route 192.168.81.0 and confirming that the only route available to reach it is via 192.168.180.1

Re: Static routes

can you send the out put of sh run

and as per your post there must be only one route in the routing table ...there may be possible both the path may be confiuger with the different metrics so best matrics path will apear in routing table ...and all trafic will flow through it...

rate this post if it helps

regards

Devang

Hall of Fame Super Silver

Re: Static routes

Warren

The first static route is a regular static route and the second static route is a floating static route. A floating static route assigns an administrative distance different from the default distance of 1. The purpose of a floating static route is that it will be used only if there is no route to that destination with a better administrative distance.

In effect the second (floating) static route is a backup to the first. The first static route will be used when it is available and if the first static route is removed from the routing table (perhaps because the interface toward the next hop becomes unavailable, or some other reason) then the floating static will be used.

HTH

Rick

Silver

Re: Static routes

The extra '2' is making this a floating static route. By putting this 2 you are changing the administrative distance of this route to 2 from the default of 1.

Hall of Fame Super Silver

Re: Static routes

War

In the second static route you have an extra parameter. You have the normal static route parameters: network_address mask next_hop (192.168.81.0 255.255.255.240 192.168.204.2) and then you have the extra parameter (2) which is administrative distance. For normal static routes they have administrative distance of 1. You have assigned administrative distance of 2 to this static route which makes it a floating static route. When you have a normal static route (AD=1) and a floating static route (AD=2 in this case) for the same destination the floating static will only be used if the normal static becomes unavailable.

So what you configuration has now is a primary static route and a backup (floating) static route. If you remove the final 2 from the floating static route then you will have two primary static routes and the router should use both of them.

HTH

Rick

8 REPLIES
Silver

Re: Static routes

The second route has been configured with an administrative distance of 2. By default static routes have an administrative distance of 1 (your firs route will have AD of 1 as you have not configured it for another value). If there are two (equally specific) routes to the same destination with different administrative distances, the one with the lower administrative distance will be entered in the routing table and consequently used for routing. The second route will not be entered in the routing table unless the first one disappears for some reason (interface shutting down, etc.).

In your case the route pointing to 192.168.204.2 will not be entered in the routing table. That is why you are noticing that packets always go to 180.1. You can verify this by doing a show ip route 192.168.81.0 and confirming that the only route available to reach it is via 192.168.180.1

Re: Static routes

can you send the out put of sh run

and as per your post there must be only one route in the routing table ...there may be possible both the path may be confiuger with the different metrics so best matrics path will apear in routing table ...and all trafic will flow through it...

rate this post if it helps

regards

Devang

Hall of Fame Super Silver

Re: Static routes

Warren

The first static route is a regular static route and the second static route is a floating static route. A floating static route assigns an administrative distance different from the default distance of 1. The purpose of a floating static route is that it will be used only if there is no route to that destination with a better administrative distance.

In effect the second (floating) static route is a backup to the first. The first static route will be used when it is available and if the first static route is removed from the routing table (perhaps because the interface toward the next hop becomes unavailable, or some other reason) then the floating static will be used.

HTH

Rick

New Member

Re: Static routes

Hi Rick;

How is this floating static route configured? All I did for both static route is the normal "ip route....."

ThANKS

war

Silver

Re: Static routes

The extra '2' is making this a floating static route. By putting this 2 you are changing the administrative distance of this route to 2 from the default of 1.

Hall of Fame Super Silver

Re: Static routes

War

In the second static route you have an extra parameter. You have the normal static route parameters: network_address mask next_hop (192.168.81.0 255.255.255.240 192.168.204.2) and then you have the extra parameter (2) which is administrative distance. For normal static routes they have administrative distance of 1. You have assigned administrative distance of 2 to this static route which makes it a floating static route. When you have a normal static route (AD=1) and a floating static route (AD=2 in this case) for the same destination the floating static will only be used if the normal static becomes unavailable.

So what you configuration has now is a primary static route and a backup (floating) static route. If you remove the final 2 from the floating static route then you will have two primary static routes and the router should use both of them.

HTH

Rick

New Member

Re: Static routes

Thank you everyone for your response I see now...thanks Rick for breaking it down as well

I appreciate everyone's help....thank you!!!!!

Hall of Fame Super Silver

Re: Static routes

War

I am glad that we were able to help you understand this. Thank you for rating posts and marking this as solved. It makes the forum more useful for everyone when items are marked as solved so that readers know that they will see a problem or a question and will also find the solution.

I encourage you to continue your participation in the NetPro forum.

HTH

Rick

799
Views
9
Helpful
8
Replies