Content

| 9.5 |  | The BGP Routing Process |
| 9.5.3 |  | Implementing BGP routing policy |

Input and output policies generally are defined using route maps. Route maps are used with BGP to control and modify routing information. Route maps are used to define how the routes are redistributed between routing domains.

Recall from Module 8, Route Optimization, that the

route-map command is entered using the following syntax:

> Router(config)#route-map map-tag [permit | deny] [sequence-number]

Notice that map-tag is a name that identifies the route map. The sequence-number indicates the position that an instance of the route map is to have in relation to other instances of the same route map. Instances are ordered sequentially, starting with the number ten by default.

For example, the

route-map command might be used as follows, to define a route map named MYMAP:

> route-map MYMAP permit 10
> ! First set of conditions goes here.
> route-map MYMAP permit 20
> ! Second set of conditions goes here.

When BGP applies MYMAP to routing updates, it applies the lowest instance first. In this case, instance ten (10). If the first set of conditions is not met, the second instance is applied, and so on, until either a set of conditions has been met or there are no more sets of conditions to apply. If the update does not match in any instance, the update is not redistributed or controlled.

The condition portion of a route map is set by using the

match and set commands. The match command specifies what criteria must be matched. The set command specifies an action that is to be taken if the routing update meets the conditions defined by the match command.

Figure shows the commands needed to create a simple route map. Access list 1 is used in the configuration as a way to specify routes.

Recall that there are two types of access lists, standard and extended. The main difference is that a standard access list is applied to the source IP address, whereas an extended access list is normally applied to the source and destination of a packet. However, when used to filter routes within BGP, the first address or wildcard bit set given in an extended access list applies to the prefix. The second address or wildcard bit set applies to the subnet mask of the advertised route.

Access list 1 identifies all routes of the form 1.1.1.x. A routing update of the form 1.1.1.x will match the access list and will be propagated with a metric set to five (5). This is because of the

permit keyword in the access list.

A route map can be applied on the incoming, using the keyword

in, or the outgoing, using the keyword out, BGP updates. Figure shows the commands needed to apply the route map MYMAP on the outgoing updates toward BGP neighbor 172.16.20.2.

| Lab Activity e-Lab Activity: Implementing BGP Routing Policy This lab is to implement BGP routing policy.