cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
27737
Views
51
Helpful
4
Replies

Static route with 'permanent'

djones
Level 1
Level 1

Studying for BSCI and I ran across the option of adding 'permanent' to a static route. It says that with this option, a static route will stay in the routing table even if the interface it's related to goes down.

However, what I can't figure out is what good is that? Why would I want an invalid route to stay there? Anyone have any ideas?

1 Accepted Solution

Accepted Solutions

There can be many reasons why using the permanent keyword in a static route can be beneficial. I can think of one scenario where this would be helpful.

 

Here's a router config. Let's say the only way to get to network

10.1.1.0 is via e0

If you didn't have the permanent keyword in the static route for

10.1.1.0

then when

e0

is down the router would forward the traffic using the

default route via e1

and the traffic would have eventually failed but in the process would have used up some router resources unnecessarily. Instead, using the permanent keyword would cause the packets to

10.1.1.0

get dropped when

e0

is down.

 

Router_A:







int e0

ip add 172.16.1.1 255.255.255.0




int e1

ip add 192.168.1.1 255.255.255.0







ip route 10.1.1.0 255.255.255.0 172.16.1.2 permanent

ip route 0.0.0.0 0.0.0.0 192.168.1.2

 

 

HTH

 

Sundar

View solution in original post

4 Replies 4

There can be many reasons why using the permanent keyword in a static route can be beneficial. I can think of one scenario where this would be helpful.

 

Here's a router config. Let's say the only way to get to network

10.1.1.0 is via e0

If you didn't have the permanent keyword in the static route for

10.1.1.0

then when

e0

is down the router would forward the traffic using the

default route via e1

and the traffic would have eventually failed but in the process would have used up some router resources unnecessarily. Instead, using the permanent keyword would cause the packets to

10.1.1.0

get dropped when

e0

is down.

 

Router_A:







int e0

ip add 172.16.1.1 255.255.255.0




int e1

ip add 192.168.1.1 255.255.255.0







ip route 10.1.1.0 255.255.255.0 172.16.1.2 permanent

ip route 0.0.0.0 0.0.0.0 192.168.1.2

 

 

HTH

 

Sundar

Richard Burts
Hall of Fame
Hall of Fame

David

Sure. Sometimes it is "better" to have a more stable network than it is to have exact precision in your routing table. One scenario: you have some destinations for which you have static routes which you redistribute into your dynamic protocol. And you have some remote locations where you do not want to consume bandwidth with routing updates that you could avoid or you have some routers where you do not want routing updates and convergence to chew up CPU cycles if you can avoid it. So you configure your static routes as permanent. They always stay in the routing table, no bandwidth used for routing updates, no CPU cycles for convergence. The downside is that some traffic gets sent to you that you can not forward and must discard.

Second scenario: probably even more common. You are running BGP with multiple service providers. You have some static routes in your routing table so that the BGP network statements will have a match. To prevent flapping of your advertisements to the providers you want the static route to always be present in the routing table. (Of course many of us accomplish this with static routes to null 0 - but the static permanent is another alternatie).

And Sundar makes another good point about possible advantage of the permanent static.

HTH

Rick

HTH

Rick

djones
Level 1
Level 1

Thank you both for your replies. Those are some valid reasons. Thanks for clearing that up for me.

David

localnetwork
Level 1
Level 1

Another reason for using Permanent in the static route is for IPSLA to perform a static route manipulation. Imagine you have 2 possible routes where one is proffered and the other one is a backup. You then create 2 static routes, where the least optimal have a higher administrative distance. IPSLA would use a route with "permanent" listed so if the route is down, the 2nd less optimal route is selected. The significance of permanent is when the IP that is monitored start to respond, the IPSLA track is up and the route with lower admin dist is selected once again. If permanent is not present in the configuration, then IPSLA would pick a 2nd route to check for the reach ability and the traffic would try to go to the route that is down. 

 

 

ip sla 1
icmp-echo 11.11.11.11 source-interface GigabitEthernet1/0
frequency 200
threshold 1000
ip sla schedule 1 life forever start-time now


ip route 11.11.11.11 255.255.255.255 gig1/0 10.0.7.1 permament


ip route 0.0.0.0 0.0.0.0 10.6.0.2 name DEFAULT_PRI track 1
ip route 0.0.0.0 0.0.0.0 10.223.253.13 2 name DEFAULT_SEC

 

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card