Static Route Redistribution

There are several ways to redistribute static routes that are defined on a Cisco router. The methods in this article are by no means the defacto standard, however they are considered best practice in most circles. First a simple topology:

Topology used for Route Redistribution Example

In this example R0 and R1 are owned by a fictitious business, running EIGRP as the routing protocol between them. R2 is a vendor who has placed their router at the premises in order to establish a connection to a server ( providing a service to the business.

Since this is a single location, most likely the network person at the business and the vendor of the new service will agree to use simple static routing between R1 and R2. The network person for the business will configure a static route on R1 to with a next hop address of . This will work just fine, except the rest of his network will need to know how to reach this new server. Here again, another simple solution, R1 needs to redistribute the static route into the EIGRP process running between R0 and R1.

In most instances the network administrator for the business will simply insert the 'redistribute static' command under the routing protocol configuration:

router eigrp 10
no auto-summary

r1#conf t
r1(config)#router eigrp 10
r1(config-router)#redistribute static</pre>

If we look at the routes on R0, the route to the new server is being advertised to it via the EIGRP process.

r0#show ip route
Gateway of last resort is not set is subnetted, 1 subnets
D EX [170/30720] via, 00:00:03, FastEthernet0/0 is subnetted, 1 subnets
C is directly connected, FastEthernet0/0

Mission accomplished right? Well maybe, but this is a very small network in this example. What if this same scenario happened in a much larger network? In a larger network, R1 would most likely be a distribution router that contains much of the traffic flow for that location. If this is the case, you probably want a little more control over what routes get advertised to the rest of the network. There are many scenarios where R1 may contain static routes that you would not want to advertise into a routing protocol. So, how can we be selective with witch static routes get put into the routing instance?

The answer: route maps

Let's back up a bit and remove the redistribute static command from R1, so now the config looks like this:

router eigrp 10
 no auto-summary</pre>

Now, let's define a route map that will tell the router specifically which routes to redistribute into EIGRP:

! Define a route map named static-into-eigrp
R1(config)#route-map static-into-eigrp
! Tell the route map to match and ip addresses contained in the prefix list static-redist
R1(config-route-map)#match ip address prefix-list static-redist
! Define/Add entry to the prefix list with the route allowed into the routing protocol
R1(config)#ip prefix-list static-redist permit
R1(config)#router eigrp 10
! Tell the routing process to only redistribute static routes controlled by the route map
R1(config)#redistribute static route-map static-into-eigrp

As static routes are added to R1, they will not be automatically redistributed into the routing protocol - hence more control. All that is needed to add another existing static route into eigrp would be:

R1(config)#ip prefix-list static-redist permit x.x.x.x/xx

Once the prefix-list entry is entered the static route is immediately added into the routing protocol.