Tip

Propagating static routes

 

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

    Requires Free Membership to View

, 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.

RIP

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

OSPF

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

EIGRP

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

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 first published in April 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.