Technical Documentation

Routing Policy Match Conditions

A match condition defines the criteria that a route must match. You can define one or more match conditions. If a route matches all match conditions, one or more actions are applied to the route.

Match conditions fall into two categories: standard and extended. In general, the extended match conditions include criteria that are defined separately from the routing policy (AS path regular expressions, communities, and prefix lists) and are more complex than standard match conditions. The extended match conditions provide many powerful capabilities. The standard match conditions include criteria that are defined within a routing policy and are less complex than the extended match conditions, also called named match conditions.

Table 1 describes each match condition, including its category, when you typically use it, and any relevant notes about it. For more information about match conditions, see Configuring Match Conditions in Routing Policy Terms.

Table 1: Match Conditions

Match Condition

Category

When to Use

Notes

AS path regular expression—A combination of AS numbers and regular expression operators.

Extended

(BGP only) Match a route based on its AS path. (An AS path consists of the AS numbers of all routers a packet must go through to reach a destination.) You can specify an exact match with a particular AS path or a less precise match.

You use regular expressions to match the AS path.

Community—A group of destinations that share a property. (Community information is included as a path attribute in BGP update messages.)

Extended

Match a group of destinations that share a property. Use a routing policy to define a community that specifies a group of destinations you want to match and one or more actions that you want taken on this community.

Actions can be performed on the entire group.

You can create multiple communities associated with a particular destination.

You can create match conditions using regular expressions.

Prefix list—A named list of IP addresses.

Extended

Match a route based on prefix information. You can specify an exact match of a particular route only.

You can specify a common action only for all prefixes in the list.

Route list—A list of destination prefixes.

Extended

Match a route based on prefix information. You can specify an exact match of a particular route or a less precise match.

You can specify an action for each prefix in the route list or a common action for all prefixes in the route list.

Standard—A collection of criteria that can match a route.

Standard

Match a route based on one of the following criteria: area ID, color, external route, family, instance (routing), interface name, level number, local preference, metric, neighbor address, next-hop address, origin, preference, protocol, routing table name, or tag.

For the protocol criterion, you can specify one of the following: BGP, direct, DVMRP, IS-IS, local, MPLS, OSPF, PIM dense mode, PIM sparse mode, RIP, RIPng, static, and aggregate.

None.

Subroutine—A routing policy that is called repeatedly from another routing policy.

Extended

Use an effective routing policy in other routing policies. You can create a subroutine that you can call over and over from other routing policies.

The subroutine action influences but does not necessarily determine the final action. For more information, see How a Routing Policy Subroutine Is Evaluated.


Published: 2010-04-15