|
The BGP Route-Map Policy List Support feature introduces new functionality to Border Gateway Protocol (BGP) route maps. This feature adds the capability for a network operator to group route map match clauses into named lists called policy lists. A policy list functions like a macro. When a policy list is referenced in a route map, all of the match clauses are evaluated and processed as if they had been configured directly in the route map. This enhancement simplifies the configuration of BGP routing policy in medium-size and large networks because a network operator can preconfigure policy lists with groups of match clauses and then reference these policy lists within different route maps. The network operator no longer needs to manually reconfigure each recurring group of match clauses that occur in multiple route map entries.
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn . You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
This document assumes that BGP is configured in your network and that neighbors have been established.
The following restrictions apply to the BGP Route-Map Policy List Support feature for this release:
This feature does not support the configuration of IP version 6 (IPv6) match clauses in policy-lists.
Policy lists are not supported in versions of Cisco IOS Software prior to Cisco IOS Release 12.0(22)S and 12.2(15)T. Reloading a router that is running an older version of Cisco IOS software may cause some routing policy configurations to be lost.
Policy lists support only match clauses and do not support set clauses. However, policy lists can coexist, within the same route map entry, with match and set clauses that are configured separately from the policy lists.
Policy lists are supported only by BGP. They are not supported by other IP routing protocols. This limitation does not interfere with normal operations of a route map, including redistribution, because policy list functions operate transparently within BGP and are not visible to other IP routing protocols.
To configure this feature, you must understand the following concepts:
This feature introduces policy-list configuration mode and the ip policy-list command that is used to configure policy lists. A policy list is like a route map that contains only match clauses. The policy list is created and then referenced within a route map. There are no changes to match clause semantics and route map functions. Match clauses are configured in policy lists with permit and deny statements. The route map evaluates and processes each match clause and permits or denies routes based on the configuration. AND and OR semantics in the route map function the same way for policy-lists as they do for match and set clauses. This feature also introduces the match policy-list command to route-map configuration mode. The match policy-list command is used to reference a policy list within a route map for evaluation.
A policy lists functions like a macro when it is configured in a route map and has the following capabilities and characteristics:
Policy lists support only match clauses and do not support set clauses. Policy lists can be configured for all applications of route maps, including redistribution, and can also coexist, within the same route map entry, with match and set clauses that are configured separately from the policy lists.
Note Policy lists are supported only by BGP and not supported by other IP routing protocols. |
This section contains the following procedures:
To configure a route-map policy list, perform the steps in this section.
Policy lists simplify the configuration of BGP routing policy in medium-size and large networks. The network operator can reference preconfigured policy lists with groups of match clauses in route maps and easily apply general changes to BGP routing policy. The network operator no longer needs to manually reconfigure each recurring group of match clauses that occur in multiple route map entries.
This document assumes that BGP is configured in your network and that neighbors have been established.
The following restrictions apply to the BGP Route-Map Policy List Support feature:
To create a BGP policy list that matches the autonomous system path and Multi Exit Discriminator (MED) of a router, use the following steps:
3. ip policy-list policy-list-name {permit | deny}
To create a BGP policy list that matches the specified BGP community using a regular expression and the next hop of a router, use the following steps:
3. ip policy-list policy-list-name {permit | deny}
4. match community regular-expression
5. match ip next-hop ip-address
To create a BGP policy list to deny external routes and routes with the specified tag, use the following steps:
3. ip policy-list policy-list-name {permit | deny}
The next step is to create a route-map to reference the policy lists. For more information, refer to the next section "Configuring a Route-Map to Reference a Policy List."
To configure a route-map to reference a policy list, perform the steps in this section.
Policy lists support only match clauses and do not support set clauses. However, policy lists can coexist, within the same route map entry, with match and set clauses that are configured separately from the policy lists. The first route-map example configures AND semantics, and the second route-map configuration example configures semantics. Both examples in this section show sample route map configurations that reference policy lists and separate match and set clauses in the same configuration.
The steps in this section assume that policy lists have already been created.
3. route-map route-map-name permit sequence-number
4. match ip-address access-list-number
5. match policy-list policy-list-name
6. set community community-number
3. route-map route-map-name permit sequence-number
4. match policy-list policy-list-name
5. set community community-number
6. set local-preference preference-value
To verify the configuration of policy lists, and verify the configuration of route-map to reference a policy list, perform the steps in this section.
The ouput from both of the show commands in the section can be filtered to display information about a single policy-list or route-map by entering the name of a route-map or policy at the end of each show command.
The following examples illustrate the configuration and verification of this feature:
The following configuration example creates a BGP policy list that permits matches on the autonomous system path and MED of a router:
The following configuration example creates a BGP policy list that permits matches on the specified BGP community and the next hop of a router:
The following configuration example creates a BGP policy list that denies matches on the specified BGP community and the next hop of a router:
The configuration examples in this section create BGP route maps that reference BGP policy lists with the route-map route-map configuration command.
The following configuration example creates a route map that references policy lists and separate match and set clauses in the same configuration. This example uses AND semantics between POLICY-LIST-NAME-1 and POLICY-LIST-NAME-2.
The following configuration example creates a route map that references policy lists and separate match and set clauses in the same configuration. This example uses OR semantics between POLICY-LIST-NAME-3 and POLICY-LIST-NAME-4.
To verify that a policy list has been created, use the show ip policy-list command. The output of this command will display the policy-list name and configured match clauses. The following sample output is similar to the output that will be displayed:
Note A policy list name can be specified when the show ip policy-list command is entered. This option can be useful for filtering the output of this command and verifying a single policy list. |
To verify that a route map has been created and a policy list is referenced, use the show route-map command. The output of this command will display the route map name and policy lists that are referenced by the configured route maps. The following sample output is similar to the output that will be displayed:
|
This section documents new commands. All other commands used with this feature are documented in the Cisco IOS command reference publications.
To create a Border Gateway Protocol (BGP) policy list, use the ip policy-list command in policy-map configuration mode. To remove a policy list, use the no form of this command.
Syntax Description
|
Defaults
This command is not enabled by default.
Command Modes
Command History
Usage Guidelines
When a policy list is referenced within a route map, all the match statements within the policy list are evaluated and processed.
Two or more policy lists can be configured with a route map. Policy- lists can be configured within a route map to be evaluated with AND semantics or OR semantics.
Policy lists can also coexist with any other preexisting match and set statements that are configured within the same route map but outside of the policy lists.
When multiple policy lists perform matching within a route map entry, all policy lists match on the incoming attribute only.
Examples
The following configuration example creates a BGP policy list that permits matches on the autonomous system path and Multi Exit Discriminator (MED) of a router:
The following configuration example creates a BGP policy list that permits matches on the specified BGP community using a regular expression and the next hop of a router:
The following configuration example creates a BGP policy list that denies matches on the specified BGP community using a regular expression and the next hop of a router:
Related Commands
To configure a route map to evaluate and process a Border Gateway Protocol (BGP) policy list in a route map, use the match policy-list command in route-map configuration mode. To remove a path list entry, use the no form of this command.
Syntax Description
Defaults
This command is not enabled by default.
Command Modes
Command History
Usage Guidelines
When a policy list is referenced within a route map, all the match statements within the policy list are evaluated and processed.
Two or more policy lists can be configured with a route map. Policy lists can be configured within a route map to be evaluated with AND semantics or OR semantics.
Policy lists can also coexist with any other preexisting match and set statements that are configured within the same route map but outside of the policy lists.
When multiple policy lists perform matching within a route map entry, all policy lists match on the incoming attribute only.
Examples
The following configuration example creates a route map that references policy lists and separate match and set clauses in the same configuration:
The following configuration example creates a route map that references policy lists and separate match and set clauses in the same configuration. This example processes the policy lists named POLICY-LIST-NAME-2 and POLICY-LIST-NAME-3 with OR semantics. A match is required from only one of the policy lists.
Related Commands
To display information about a configured policy list and policy list entries, use the show ip policy-list command in user EXEC mode.
Syntax Description
Command Modes
Command History
Examples
The following is sample output from the show ip policy-list command in EXEC mode. The output of this command will display the policy-list name and configured match clauses. The following sample output is similar to the output that will be displayed:
Related Commands
To display configured route maps, use the show route-map command in EXEC mode.
Syntax Description
Command Modes
Command History
Examples
The following is sample output from the show route-map command:
Table 1 describes the significant fields shown in the display.
Related Commands
Related Commands
Posted: Thu Aug 21 13:59:20 PDT 2003
All contents are Copyright © 1992--2003 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.