What is a route-map ?

A route-map is a list of conditions that specify targets to be processed and a processing content. The route-map enables various controls, such as determining the forwarding path of IP packets and changing parameters such as the routing information metric of a routing protocol. The conditions of the target to be processed by the route map are determined by match conditions. What to process is then configured with the permit/deny and set commands.

Fig. Route-map Overview
Fig. Route-map Overview
Key points on the route-map
  • The most important thing is to be clear about the purpose of the route-map.
  • Depending on the purposes, the configuration of the match command, which determines the target of processing, and the set command, which determines the content of processing, will change.

The main purposes of the route-map

Route-maps can seem difficult to get used to. Route maps are used in so many ways. And the targets and processes are different depending on the purposes. This is probably the reason why you may feel that route-map is difficult.

There is not much in the way of detailed explanation of the route map. Most of the time, you’ll get to know it somewhat after configuring it and doing a few things by imitating the way you look at it. If you’re reading this article, let’s shortcut the process of configuring a route map by doing a few things and getting to know it somewhat better. The first step in understanding a route map is to identify the purpose of the route map.

Since the targets to be processed are different for each route map purpose, the match condition configuration to specify the targets to be processed changes. In addition, the configuration of the “set” command is also different because of the different processing contents.

When configuring a route map, it is important to be clear about what it is used for and what is being processed. The main purposes of the route map include the following.

  • Policy Based Routing(PBR)
  • Specifying a packet for NAT conversion
  • Filter the BGP routes and specify attributes
  • Filter routes on redistribution, change metrics, add route tags, etc.

The following section describes the main targets and main processes for each of these purposes.

There are other purposes for the route-map.

Purpose of the route-map: Policy Based Routing

Target of the process

When using a route map with PBR, the target is the IP packets received by the router. We can use match conditions to identify what IP packets the router receives as the target. To do this, we often associate standard/extended ACLs.

Processing details

The IP packets that match the conditions of the match and are permitted in the route-map are subject to PBR processing. You can then use the set command to specify the packet forwarding destination (next hop) and output interface, set the IP Precedence and DSCP values in the IP header, and so on.

Fig. Purpose of the route-map: Policy Based Routing
Fig. Purpose of the route-map: Policy Based Routing

Purpose of the route-map : Specifying a packet for NAT conversion

Target of the process

You can use a route map to specify packets for NAT conversion. The packets to be processed are IP packets received by the router. Among the IP packets received by the router, the IP packets to be converted to NAT can be identified by match conditions. For this purpose, we often associate standard/extended ACLs.

Processing details

IP packets that match the match condition and are permitted in the route-map are NAT converted. In this case, there is no additional processing in the set command; IP packets denied in the route-map without matching the match condition are not NAT converted, but are not discarded.

Fig. Purpose of the route-map : Specifying a packet for NAT conversion
Fig. Purpose of the route-map : Specifying a packet for NAT conversion

Purpose of the route-map : Filter the BGP routes and specify attributes

Target of the process

A route-map can be used to filter route information sent to and from a specific BGP neighbor or to set attributes. The target of the process is the BGP route; you can configure the match condition to identify the BGP route. It is often necessary to associate a prefix-list or a standard/extended ACL with it, and often an AS_PATH access list, since it is a BGP route.

Processing details

Additional processing can be done with the set command for a BGP route that matches the match condition and is permitted in the route-map, often setting path attributes such as LOCLA_PREF, MED, and COMMUNITY. BGP routes denied by the route-map are discarded.

Fig. Purpose of the route-map : Filter the BGP routes and specify attributes
Fig. Purpose of the route-map : Filter the BGP routes and specify attributes

Purpose of the route-map : Filter routes on redistribution, change metrics, add route tags, etc.

Target of the process

Route maps can be used to filter routes to be redistributed between routing processes and to change the metric. The target of the process is the route information to be redistributed. The match condition allows you to specify route information such as network address/subnet mask. Most of the time, you can associate a prefix list or ACL with it.

Processing details

Route information that matches the match conditions and is permitted in the route map is redistributed. You can then change the value of the metric, the metric type, and add route tags. What configuration you can do depends on the routing process of the redistribution destination. Route information that is denied in the route map is not redistributed.

Fig. Purpose of the route-map : Filter routes on redistribution, change metrics, add route tags, etc.
Fig. Purpose of the route-map : Filter routes on redistribution, change metrics, add route tags, etc.