How to redistribute routes using Cisco route maps and IP prefix lists

Home > Blogs > Cisco > How to redistribute routes using Cisco route maps and IP prefix lists

How to redistribute routes using Cisco route maps and IP prefix lists

Like This Blog 2 Mark Jacob
Added by February 6, 2013

In previous blogs I have covered both ip prefix lists and route maps How to interpret Cisco IP prefix lists and How to Decipher Cisco Route Maps. Now I want to take some of what has been discussed and make a useful application to an actual network scenario and router configurations.

Let’s say I have a network that looks like this:

Now let’s say that my super-secret developer team is on the 10.2.0.0 network and I don’t want to redistribute that network into EIGRP. I can accomplish this using an ip prefix list tied to a route map. 

On R1, I have the following relevant configuration:

router rip
 version 2
 network 10.0.0.0
 network 192.168.1.0
 no auto-summary

Also:

router eigrp 1
 no auto-summary
 network 172.16.1.0 0.0.0.3

On R2, I have this:

router eigrp 1
 network 172.16.1.0 0.0.0.3
 no auto-summary

On R2, I issue the command show ip route:

R2#sh ip route
Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
       D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area 
       N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
       E1 – OSPF external type 1, E2 – OSPF external type 2
       i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
       ia – IS-IS inter area, * – candidate default, U – per-user static route
       o – ODR, P – periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/30 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, FastEthernet0/0

As shown, I have no external EIGRP routes, which I would have if the RIP routes on R3 were being redistributed into EIGRP. So let’s make it happen.

Keeping in mind that redistribution can be considered a ‘PULL’ operation, I need to go to the router EIGRP configuration section on R1 to pull in the RIP routes.  However, considering that I wish to use a route map tied to a prefix list to accomplish my goal, I am better served to create these first.  So let’s get to global configuration mode on R1 and get ‘er done.

(R1-config)# ip prefix-list PL-No_10.2 permit 10.2.0.0/16 

That’s my whole prefix list! Keep in mind what I am doing is defining some portion of my network which will be matched by my (yet-to-be-created) route map. My route map will be used to deny the network that is specified by my prefix list. Let’s continue so this makes sense. To create the route map:

R1(config)# route-map R2E deny 10
R1(config-route-map)# match ip address prefix-list PL-No_10.2
R1(config-route-map)# exit
R1(config)# route-map R2E permit 20

Sequence number 10 matches the information specified by my prefix list. Notice that sequence number 20 has no ‘match’ statement. This means everything else is allowed. If I forget that crucial ‘permit’ statement, the implicit deny after my line 10 deny will kill everything else. So I need at least one ‘permit’ statement to make this work. 

The last piece is to ‘pull’ the RIP routes into EIGRP. Let’s do that.

R1(config)#router eigrp 1
R1(config-router)# redistribute rip metric 100 100 255 1 1500 route-map R2E

I could just type ‘redistribute rip’ but this would lead to a problem. When RIP routes are redistributed into EIGRP, a seed metric is needed. If you redistribute without specifying a seed metric, there is a default that occurs. Unfortunately, the default action is to set the route to an infinite (unreachable) metric, which means your routes won’t show up. Not what you want to happen, is it? For more information on the metric numbers in the above command, see Redistribute RIP into EIGRP network.

The last step in our process is to go to the receiving router and verify that the redistributed routes are appearing. 

R2#sh ip route
Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
       D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area 
       N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
       E1 – OSPF external type 1, E2 – OSPF external type 2
       i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
       ia – IS-IS inter area, * – candidate default, U – per-user static route
       o – ODR, P – periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/30 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, FastEthernet0/0
     10.0.0.0/16 is subnetted, 3 subnets
D EX    10.3.0.0 [170/25651200] via 172.16.1.1, 00:00:04, FastEthernet0/0
D EX    10.1.0.0 [170/25651200] via 172.16.1.1, 00:00:04, FastEthernet0/0
D EX    10.4.0.0 [170/25651200] via 172.16.1.1, 00:00:04, FastEthernet0/0
     192.168.1.0/30 is subnetted, 1 subnets
D EX    192.168.1.0 [170/25651200] via 172.16.1.1, 00:00:04, FastEthernet0/0

Sure enough, there they are!  As stated at the outset, I wanted all the RIP routes on R3 to be redistributed into my EIGRP domain EXCEPT the 10.2.0.0 network. Voila! that is exactly what I see in the output. I can see the 10.1, the 10.3, and the 10.4 networks as external EIGRP routes, but not 10.2. It is so cool when a plan comes together.

Practice redistributing from one routing protocol into another and vice versa until it becomes second nature. This will pay you dividends both on the exam and in your network admin life.

Until next time, thanks for reading!

Mark Jacob
Cisco Instructor – Interface Technical Training
Phoenix, AZ

Videos You May Like

A Simple Introduction to Cisco CML2

0 3877 0

Mark Jacob, Cisco Instructor, presents an introduction to Cisco Modeling Labs 2.0 or CML2.0, an upgrade to Cisco’s VIRL Personal Edition. Mark demonstrates Terminal Emulator access to console, as well as console access from within the CML2.0 product. Hello, I’m Mark Jacob, a Cisco Instructor and Network Instructor at Interface Technical Training. I’ve been using … Continue reading A Simple Introduction to Cisco CML2

Cable Testers and How to Use them in Network Environments

0 724 1

This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader demonstrates how to use cable testers in network environments. Let’s look at some tools that we can use to test our different cables in our environment. Cable Testers Properly Wired Connectivity … Continue reading Cable Testers and How to Use them in Network Environments

Government Edition – Encrypting a USB Flash Drive in Windows 10

0 276 2

In this video, Security Instructor Mike Danseglio demonstrates how to use BitLocker in Window 10 to secure files on a USB Flash drive that adhere to stricter data protection requirements as found inside Government entities. BitLocker 2-day instructor-led training is now available at Interface: BITLOCK: Planning and Deploying BitLocker Drive Encryption Training Video Transcription: Hi. … Continue reading Government Edition – Encrypting a USB Flash Drive in Windows 10

Write a Comment

See what people are saying...

    Share your thoughts...

    Please fill out the comment form below to post a reply.