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?
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.
ip add 172.16.1.1 255.255.255.0
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