I would clarify some basic concept.I know this maybe a silly question, but after reading a document, my concept about static route is not so clear.
Router1 e1(192.168.1.1/24)--- e1 (192.168.1.2/24) Router2 e2 (192.168.2.2/24)
ip route 192.168.2.0 255.255.255.0 192.168.1.2
ip route 192.168.2.0 255.255.255.0 e1
so I would like to know when I shut down the R1E1 and R2E1 separately in both scenarios , whether or not the static route to 192.168.2.0 will be installed in R1's routing table.
Basically, I'm not sure if the static route status in routing table is related the reachability of the interface TO the next hop router and the interface OF the next hop router.
Thanks in advance.
The behavior of IOS about static routes is fairly clear. A static route is installed in the routing table if the interface that the router uses to reach that prefix is up. So in your example R1 will install the static route is e1 is up. It does not matter to R1 and its static route whether R2 interface is up or down.
Even if the R2 interface is down and there is no connectivity, if the R1 e1 interface is up then R1 installs the static route into its routing table.
The behavior is the same whether you configure the static route with the next hop address or with just the outbound interface.