It's important that network administrators know what routing redistribution is and understand which situations call for it. Routing redistribution involves taking the routes from one source of routing information and sending those routes to another routing protocol.
Network administrators typically use redistribution between routing protocols—for example, redistributing routes from the Routing Information Protocol (RIP) to the Open Shortest Path First (OSPF) protocol. However, in some cases, a network administrator may also redistribute routes that are either static or that connect directly to the router.
How do I use redistribution?
You can redistribute routes using the redistributecommand. However, keep in mind that you can only use this command in the routing configuration for a certain protocol. Here's an example:
Router(config)# router ospf 100 Router(config-router)# redistribute rip
When should I use routing redistribution?
You don't want to use redistribution unless you have a special situation that requires it. That's because redistribution complicates configuration and troubleshooting efforts. It can even make routing protocols so complex that you might develop a routing loop and bring your network down.
In other words, you don't want to use redistribution unless you have to. Ideally, it's a best practice to choose a single routing protocol for your network (for example, OSPF) and use only that routing protocol. That said, there are valid reasons to use redistribution. Let's look at some examples to better understand the use of redistribution.
Situation 1: You have two different routing protocols on a network
Let's say your company has purchased another company, and the two use different routing protocols. Your company has one set of routers running OSPF, and the new company's set of routers run RIP.
You don't want to run OSPF and RIP on the same routers—often referred to as ships-in-the-night routing. To move the OSPF routes into RIP, you can redistribute the OSPF routes to RIP. Conversely, to move the RIP routes into OSPF, you can redistribute RIP into OSPF.
Redistributing both routes is what we call mutual redistribution. You must be very careful when doing this—you can easily create routing loops in your network.
To prevent a routing loop, you need to control exactly which routes go into which protocol. One method to do this is by using a route map.
In addition, you also must be conscious of how the different routing protocols work. For example, RIP V1 doesn't support classless networks.
How should you configure this? On the network where you've performed the mutual redistribution, you should have a single router that's running both RIP and OSPF. That router would be the single distribution point between the two routing domains.
Situation 2: You have devices that don't support the routing protocol of your network
Some firewalls and other lower-end network devices only support a single routing protocol, such as RIP. If your organization has a firewall that only supports RIP but it uses OSPF on its network, you may need to connect the network devices to the firewall in order for the internal routers to see them.
To do this, configure the router closest to the firewall to use RIP, and redistribute the RIP routes to OSPF. It's very likely that you don't need to redistribute the OSPF routes to RIP because you can just configure the firewall running RIP with a default route to point to the closest router.
Situation 3: You have static routes that you need to move into your dynamic routing protocol
There will always be special cases where you have some static routes but would like to put them into a dynamic routing protocol, such as OSPF. To do this, use the redistribute static command. This command takes the static routes and sends them through the existing routing protocol to all routers on the network.
Miss a column?
Check out the Cisco Routers and Switches Archive, and catch up on David Davis' most recent columns.
Want to learn more about router and switch management? Automatically sign up for our free Cisco Routers and Switches newsletter, delivered each Friday!
David Davis has worked in the IT industry for 12 years and holds several certifications, including CCIE, MCSE+I, CISSP, CCNA, CCDA, and CCNP. He currently manages a group of systems/network administrators for a privately owned retail company and performs networking/systems consulting on a part-time basis.