Using a route-map as referenced on the “redistribute” command provides many features. For example, we can tweak routes while filtering them at the same time, edit metrics, or assign external route types among others.

 

Route maps are similar to “programming  logic.” For example, when programmers create statements in their code, they might use ( If/then conditions) to process certain instructions in their code. Similarly, route-maps have a set of rules and each rule has  two fields: “Match/Set.”

 

Route-maps are typically use for

 

  • Modifying BGP Attributes.
  • Policy Routing.
  • Route Filtering.

 

Route maps are ordered lists of statements processed  similar to an ACL. ( Jeremy Cioara)

 

Facts

 

  • As ACL, route maps are processed in sequential order
  • When traffic is passing through a router, it hits the “route-map statements” instead of the routing table

–    Route maps relies on other mechanism like ACLs or Prefix-list to tweak and filter routes

 

Below there is a lab I have created on “GNS3” to practice redistribution. There are different ways we could use route-maps. I will give an example using this lab:

 

 

Task: Redistribute “Eigrp into OSPF” (lo1 1.1.1/24) from R1 to R3. We do not want subnets 2.2.2.2/24 and 3.3.3.3/24 from being redistributed (Only loopback 1)

Steps:

  1. We create the ACL on R2, since route-map is the engine that empowers ACL to be trigger in the command itself

 

 

 

  1. We create the route-map statement. I name it “jesus.” Remember, route map has two set of rules (Match/Set), so we are going to match the “ACL(Access-list)” we have created above with the route-map statement:

 

 

 

  1. Now, we have to tell R2 :OSPF routing process” to redistribute eigrp using the route-map we have created:

 

 

Notice that if we check the ACL with the “show access-list” command, we can see there is two matches, which is a good indication that the route-map is working fine.  Now let’s go to  R3 and check the IP routing table:

 

 

As you can see in the picture above, the ip routing table it is showing only 1 subnet (1.1.1.1/24) redistributed into ospf. In addition, we can use the “set” rule to tweak the route. For example, let’s say we want to set the metric of the OSPF external route (1.1.1.1/24) to 150.

 

 

 

Now, let’s check R3 again:

 

 

Isn’t that cool? There are many ways we can treat the routes using route-map depending of what we want to accomplish.

Thank you,

Jesus Contreras.

Leave a Reply

Your email address will not be published. Required fields are marked *

Bitnami