4.5 Policy Routing

There are several mechanisms that can be implemented to manipulate the distribution of routing information within and among routing protocols. These mechanism include route mapping, policy based routing, distribute lists, route tagging and redistribution.

4.5.1 Route Maps

Route maps are script-like procedures that can filter and modify the routing information that is passed between BGP peers or policy routing, or that are learned through route redistribution. A route map instance consists of MATCH statements that identify routes or their attributes, and SET statements that modify route attributes. A route map name is referenced when applied to a scheme. Route maps provide for flexibility, which simplifies access lists. You can use several BGP parameters to match. IP matches also include the route address, next-hop address, or source address.

A route map can consist of multiple instances, but it is recommended that the first instance is numbered greater than 1 and that there is a gap between subsequent instance numbers so that new instances can be added to the route map without having to reconfigure all instances numbers.

4.5.2 Policy Based Routing (PBR)

In policy based routing (PBR) the next-hop address is modified, or the packets are marked to receive differential service and is configured using route maps.. In PBR, routing is based on destination addresses and is commonly used to modify the next-hop IP address, which is based on the source address. More recently, PBR has also been implemented to mark the IP precedence bits in outbound IP packets so that they comply with Quality of Service (QoS) policies.

4.5.3 Distribute Lists

Distribute lists filter the inbound and/or outbound contents of routing updates. In so doing, they can control which network updates are accepted into the routing table or which network updates are advertised.

4.5.4 Redistribution

The redistribution between routing protocols must be configured carefully to prevent routing loops. Access lists, distribution lists, and route maps can affect redistribute routes; these methods specify (select) routes for redistribution, for setting metrics, or for setting other policies to the routes.

4.5.4.1 Default Metric

When redistributing routes into RIP, IGRP, and EIGRP, you must also configure the metric of the redistributed routes. The metric can be configured in the redistribution statement or a default metric can be configured using the default-metric bandwidth delay reliability load mtu. In this command:

  • bandwidth can be 1 to 4,294,967,295 kbps
  • delay can be (0 to 4,294,967,295) x 10 microseconds
  • reliability can be0 to 255
  • load can be1 to 255
  • mtu can be1 to 4,294,967,295

You can also use this command in OSPF, however, IS-IS does not use the default-metric command. The default-metric command has the following syntax for IGRP and EIGRP:

4.5.4.2 EIGRP Redistribution

You need to keep two things in mind regarding EIGRP redistribution. First, routes redistributed into EIGRP must have an administrative distance of 170. Second, if the autonomous systems numbers are the same when redistributing between IGRP and EIGRP, the redistribution command is not needed.

4.5.4.3 OSPF Redistribution

You also need to keep two things in mind regarding OSPF redistribution. Because OSPF performs automatic summarization, you must use the subnets keyword when you redistribute routes into OSPF. The subnets keyword allows subnetted routes to be received, otherwise only the major network route is redistributed without any sub-networks. By default, redistributed routes are classified as external Type 2 (E2) in OSPF. The metric-type keyword changes the external route to an external Type 1 (E1).

4.5.5 Route Tagging

Route tagging is another method for the internetwork administrator to mark or tag certain routes, usually redistributed routes, and then to use the tag as the deciding factor on route policy decisions. The tag identifies the origin of the route. Thus, routes originated from a particular external source can be set with a tag of 1, and routes from another external source can be set with a tag of 2. This is useful in identifying routes to be filtered when redistributing into other networks. The tag can be matched during redistribution. OSPF, RIPv2, and EIGRP carry tags on external routes. The tag can set policy on routes redistributed into BGP. Also, static routes can be configured with the tag keyword.