Problem solve Get help with specific problems with your technologies, process and projects.

Propagating static routes

How to go about it, with code snippetsHow to go about it, with code snippets.


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, 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
 ! redistribute my static routes with a default metric
  redistribute static
 ip route


Again, I've added the static default route through 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 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

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.17.0,0
  network 192.168.100
! redistribute my static routes with a default metric
 redistribute static
ip route

To learn more about Managing IP Networks with Cisco Routers, or to buy this book, click here to go to our online bookstore.

This was last published in April 2002

Dig Deeper on Network Administration

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.