Propagating static routes
Scott M. Ballew
If you are setting up new routing in a legacy network, chances are you'll run into static routes that are already in place. What do you do with them? This tip, excerpted from Managing IP Networks with Cisco Routers, by Scott M. Ballew, published by O'Reilly & Associates Inc., offers some insights.
One of the most common problems you'll face is how to propagate static routes. Static routes may exist because of legacy networking equipment that doesn't speak the dynamic routing protocol you've chosen, or because you don't wish to accept dynamic routing updates from another network administration. Or you may have a static default route pointing to your Internet connection. In these cases, you need a static route on the router or routers closest to these static routing needs. However, you don't want to install the static routes manually on all the routers in your network, which would be time-consuming and error prone. Instead, you'd like these edge routers to propagate any static routes using your dynamic routing protocol.
In the configuration below, I added a static default route through the host 192.168.100.250, presumably our Internet connection, and told the router to redistribute all static routes the RIP protocol. This is the general form any route redistribution takes, but be warned: distributing routes from one protocol; to another isn't simple. I'll cover it more later, but one of the most important tasks is specifying how to translate the metrics of one protocol to another. In the case of static routes and the RIP protocol, the software defines a default metric of 1, so this router sends the default route in its RIP updates with that metric.
router rip network 172.16.0.0 network 172.17.0.0 network 192.168.100.0 ! redistribute my static routes with a default metric redistribute static ! ip route 0.0.0.0.0.0.00 192.168.100.250
Again, I've added the static default route through 192.168.100.250 and I'd like to propagate this route to the other OSPF routers in the network. Unlike RIP, OSPF doesn't have a d efault value to use for all metrics translated from other routing protocol' that limits my optyions, so I've chosen to state explicitly that all static routes should get an OSPF metric of one. Unlike RIP's metric, the OSPF metric doesn't represent a hop-count. Instead, it's used to compare the relative cost of this default route to the cost of another route it might learn about.
router ospf 1 network 0.0.0.0. 255.255.255.255 area 0 ! redistribute my static routes with a type-2 external metric of 1 redistribute static metric 1 ! originate a default route of 1 if I have one default-information originate ! ip route 0.0.0.0 0.0.0.0 192.168.100.250
I've chosen to use a type 2 metric in this example. A type 1 metric could be specified by saying:
redistribute static metric 1 metric-type 1
Again, I have defined a static default route that I wish to redistribute. As is the case with RIP, EIGRP defines a default metric to use for static routes, so I don't need to do anything else special.
router eogrp 1 network 172.16.0.0 network 172.17.0,0 network 192.168.100 ! redistribute my static routes with a default metric redistribute static ! ip route 0.0.0.0 0.0.0.0 192.168.100.250