This chapter provides information about configuring route policies.
The 7210 SAS supports two databases for routing information. The routing database is composed of the routing information learned by the routing protocols. The forwarding database is composed of the routes actually used to forward traffic through a router. In addition, link state databases are maintained by interior gateway protocols (IGPs), such as IS-IS and OSPF.
Routing protocols calculate the best route to each destination and place these routes in a forwarding table. The routes in the forwarding table are used to forward routing protocol traffic, sending advertisements to neighbors and peers.
A routing policy can be configured that will not place routes associated with a specific origin in the routing table. Those routes will not be used to forward data packets to the intended destinations and the routes are not advertised by the routing protocol to neighbors and peers.
Routing policies control the size and content of the routing tables, the routes that are advertised, and the best route to take to reach a destination. Careful planning is essential to implement route policies that can affect the flow of routing information or packets in and traversing through the router. Before configuring and applying a route policy, develop an overall plan and strategy to accomplish your intended routing actions.
There are no default route policies. Each policy must be created explicitly and applied to a routing protocol or to the forwarding table. Policy parameters are modifiable.
Route policies contain policy statements containing ordered entries containing match conditions and actions you specify. The entries should be sequenced from the most explicit to least explicit. Packet forwarding and routing can be implemented according to your defined policies. Policy-based routing allows you to dictate where traffic can be routed, through specific paths, or whether to forward or drop the traffic. Route policies can match a specific route policy entry and continue searching for other matches within either the same route policy or the next route policy.
The process can stop when the first complete match is found and executes the action defined in the entry, either to accept or reject packets that match the criteria or proceed to the next entry or the next policy. You can specify matching criteria based on source, destination, or particular properties of a route. Route policies can be constructed to support multiple stages to the evaluation and setting various route attributes. You can also provide more matching conditions by specifying criteria, such as:
The default action specifies how packets are to be processed when a policy related to the route is not explicitly configured. The following default actions are applied in the event that:
If a default action is defined for one or more of the configured route policies, then the default action is handled as follows:
The following IP address prefixes are not allowed by the routing protocols and the Route Table Manager and are not be populated within the forwarding table:
Any other prefixes that need to be filtered can be filtered explicitly using route policies.
Route damping is a controlled acceptance of unstable routes from BGP peers so that any ripple effect caused by route flapping across BGP AS border routers is minimized. The motive is to delay the use of unstable routes (flapping routes) to forward data and advertisements until the route stabilizes.
Nokia implementation of route damping is based on the following parameters:
Events that could trigger the route flapping algorithm are:
If the route continues to flap, the FoM, with respect to time scale, looks like a sawtooth waveform with the exponential rise and decay of FoM. To control flapping, the following parameters can be configured:
The ability to perform a filter match on confederations in the AS-PATH is supported. This feature allows customers to configure match criteria for specific confederation sets and sequences within the AS path so that they can be filtered out before cluttering the service provider’s routing information base (RIB).
7210 SAS uses regular expression strings to specify match criteria for:
A regular expression is expressed in terms of terms and operators. A term for an AS path regular expression is:
A term for a community string regular expression is a string that is evaluated character by character and is composed of:
The regular expression OPERATORS are listed in Table 76.
Operator | Description |
| | Matches the term on alternate sides of the pipe. |
* | Matches multiple occurrences of the term. |
? | Matches 0 or 1 occurrence of the term. |
+ | Matches 1 or more occurrence of the term. |
( ) | Used to parenthesize so a regular expression is considered as one term. |
[ ] | Used to demarcate a set of elementary or range terms. |
- | Used between the start and end of a range. |
{m,n} | Matches least m and at most n repetitions of the term. |
{m} | Matches exactly m repetitions of the term. |
{m,} | Matches m or more repetitions of the term. |
^ | Matches the beginning of the string - only allowed for communities. |
$ | Matches the end of the string - only allowed for communities. |
\ | An escape character to indicate that the following character is a match criteria and not a grouping delimiter. |
Examples of AS path and community string regular expressions are listed in Table 77.
AS Path to Match Criteria | Regular Expression | Example Matches |
Null AS path | null a | Null AS path |
AS path is 11 | 11 | 11 |
AS path is 11 22 33 | 11 22 33 | 11 22 33 |
Zero or more occurrences of ASN 11 | 11* | Null AS path 11 11 11 11 11 11 11 … 11 |
Path of any length that begins with AS numbers 11, 22, 33 | 11 22 33 .* | 11 22 33 11 22 33 400 500 600 |
Path of any length that ends with AS numbers 44, 55, 66 | .* 44 55 66 | 44 55 66 100 44 55 66 100 200 44 55 66 100 200 300 44 55 66 100 200 300 … 44 55 66 |
One occurrence of the AS numbers 100 and 200, followed by one or more occurrences of the number 33 | 100 200 33+ | 100 200 33 100 200 33 33 100 200 33 33 33 100 200 33 33 33 … 33 |
One or more occurrences of ASN 11, followed by one or more occurrences of ASN 22, followed by one or more occurrences of ASN 33 | 11+ 22+ 33+ | 11 22 33 11 11 22 33 11 11 22 22 33 11 11 22 22 33 33 11 … 11 22 … 22 33 …33 |
Path whose second ASN must be 11 or 22 | (. 11) | (. 22) .* or . (11 | 22) .* | 100 11 200 22 300 400 … |
Path of length one or two whose second ASN might be 11 or 22 | . (11 | 22)? | 100 200 11 300 22 |
Path whose first ASN is 100 and second ASN is either 11 or 22 | 100 (11 | 22) .* | 100 11 100 22 200 300 |
Either AS path 11, 22, or 33 | [11 22 33] | 11 22 33 |
Range of AS numbers to match a single ASN | 10-14 | 10 or 11 or 12 or 13 or 14 |
[10-12]* | Null AS path 10 or 11 or 12 10 10 or 10 11 or 10 12 11 10 or 11 11 or 11 12 12 10 or 12 11 or 12 12 … | |
Zero or one occurrence of ASN 11 | 11? or 11{0,1} | Null AS path 11 |
One through four occurrences of ASN 11 | 11{1,4} | 11 11 11 11 11 11 11 11 11 11 |
One through four occurrences of ASN 11 followed by one occurrence of ASN 22 | 11{1,4} 22 | 11 22 11 11 22 11 11 11 22 11 11 11 11 22 |
Path of any length, except nonexistent, whose second ASN can be anything, including nonexistent | . .* or . .{0,} | 100 100 200 11 22 33 44 55 |
ASN is 100. Community value is 200. | ^100:200$ | 100:200 |
ASN is 11 or 22. Community value is any number. | ^((11)|(22)):(.*)$ | 11:100 22:100 11:200 … |
ASN is 11. Community value is any number that starts with 1. | ^11:(1.*)$ | 11:1 11:100 11:1100 … |
ASN is any number. Community value is any number that ends with 1, 2, or 3. | ^(.*):(.*[1-3])$ | 11:1 100:2002 333:55553 … |
ASN is 11 or 22. Community value is any number that starts with 3 and ends with 4, 5 or 9. | ^((11)|(22)):(3.*[459])$ | 11:34 22:3335 11:3777779 … |
ASN is 11 or 22. Community value ends in 33 or 44. | [^((11|22)):(.*((33)|(44)))$ | 11:33 22:99944 22:555533 … |
Note:
OSPF and BGP requires route policy support. Figure 24 and Figure 25 show where route policies are evaluated in the protocol. Figure 24 shows BGP which applies a route policy as an internal part of the BGP route selection process. Figure 25 shows OSPF which applies routing policies at the edge of the protocol, to control only the routes that are announced to or accepted from the Route Table Manager (RTM).
The Nokia implementation of BGP uses route policies extensively. The implied or default route policies can be overridden by customized route policies. The default BGP properties, with no route policies configured, behave as follows:
Occasionally, BGP routes may be readvertised from BGP into OSPF, IS-IS. OSPF export policies control which routes are exported to OSPF) are not handled by the main OSPF task but are handled by a separate task or an RTM task that filters the routes before they are presented to the main OSPF task.
The following are examples of circumstances of when to configure and apply unique route policies.
Figure 26 shows the process to provision basic route policy parameters.
This section describes route policy configuration caveats.
When configuring policy statements, the policy statement name must be unique.