Table Of Contents
Prerequisites for BGP Route-Map Continue
Restrictions for BGP Route-Map Continue
Information About BGP Route-Map Continue Clauses
Route-Map Operation Without Continue Clauses
Route-map Operation With Continue Clauses
Match Operations With Continue Clauses
Set Operations With Continue Clauses
How to Configure BGP Route-map Continue Clauses
Configuring BGP Route-map Continue Clauses
Verifying the Configuration of BGP Route-map Continue
Configuration Examples for BGP Route-map Continue
BGP Route Map Continue Clause Example Configuration
BGP Route-map Continue Clause Verification Example
BGP Route-Map Continue
The BGP Route-Map Continue feature introduces the continue clause to Border Gateway Protocol (BGP) route-map configuration. The continue clause provides more programmable policy configuration and route filtering. It introduces the capability to execute additional entries in a route map after an entry is executed with successful match and set clauses. Continue clauses allow you to configure and organize more modular policy definitions to reduce the number of policy configurations that are repeated within the same route map.
Feature History for the BGP Route-Map Continue Feature
Finding Support Information for Platforms and Cisco IOS Software Images
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
Contents
•
Prerequisites for BGP Route-Map Continue
•
Restrictions for BGP Route-Map Continue
•
Information About BGP Route-Map Continue Clauses
•
How to Configure BGP Route-map Continue Clauses
•
Configuration Examples for BGP Route-map Continue
Prerequisites for BGP Route-Map Continue
•
This document assumes that BGP is enabled and peering has been established.
Restrictions for BGP Route-Map Continue
•
Continue clauses are supported in outbound route maps only in Cisco IOS Release 12.0(31)S and subsequent releases.
•
Continue clauses can only go to a higher route-map entry (higher sequence number) and cannot go to a lower route-map entry.
Information About BGP Route-Map Continue Clauses
•
Route-Map Operation Without Continue Clauses
•
Route-map Operation With Continue Clauses
•
Match Operations With Continue Clauses
•
Set Operations With Continue Clauses
Route-Map Operation Without Continue Clauses
A route map evaluates match clauses until a successful match occurs. After the match occurs, the route map stops evaluating match clauses and starts executing set clauses, in the order in which they were configured. If a successful match does not occur, the route-map "falls through" and evaluates the next sequence number of the route map until all configured route-map entries have been evaluated or a successful match occurs. Each route map sequence is tagged with a sequence number to identify the entry. Route-map entries are evaluated in order starting with the lowest sequence number and ending with the highest sequence number. If the route map contains only set clauses, the set clauses will be executed automatically, and the route map will not evaluate any other route-map entries.
Route-map Operation With Continue Clauses
When a continue clause is configured, the route map will continue to evaluate and execute match clauses in the specified route-map entry after a successful match occurs. The continue clause can be configured to go to (or jump to) a specific route-map entry by specifying the sequence number, or if a sequence number is not specified, the continue clause will go to the next sequence number. This behavior is called an "implied continue." If a match clause exists, the continue clause is executed only if a match occurs. If no successful matches occur, the continue clause is ignored.
Match Operations With Continue Clauses
If a match clause does not exist in the route-map entry but a continue clause does, the continue clause will be automatically executed and go to the specified route-map entry. If a match clause exists in a route-map entry, the continue clause is executed only when a successful match occurs. When a successful match occurs and a continue clause exists, the route map executes the set clauses and then goes to the specified route-map entry. If the next route map contains a continue clause, the route map will execute the continue clause if a successful match occurs. If a continue clause does not exist in the next route map, the route map will be evaluated normally. If a continue clause exists in the next route map but a match does not occur, the route map will not continue and will "fall through" to the next sequence number if one exists.
Set Operations With Continue Clauses
Set clauses are saved during the match clause evaluation process and executed after the route-map evaluation is completed. The set clauses are evaluated and executed in the order in which they were configured. Set clauses are only executed after a successful match occurs, unless the route map does not contain a match clause. The continue statement proceeds to the specified route-map entry only after configured set actions are performed. If a set action occurs in the first route map and then the same set action occurs again, with a different value, in a subsequent route map entry, the last set action may override any previous set actions that were configured with the same set command unless the set command permits more than one value. For example, the set as-path prepend command permits more than one autonomous system number to be configured.
Note
A continue clause can be executed, without a successful match, if a route-map entry does not contain a match clause.
Benefits of Continue Clauses
The benefits of this feature include the following:
•
Continue clauses provide a programmable method to organize and control the flow of a route map. Route-map configuration was linear before this feature was introduced.
•
Continue clauses allow you to modularize network policy configuration so that repeated policy definitions can be reduced within the same route-map.
How to Configure BGP Route-map Continue Clauses
This section contains the following procedures:
•
Configuring BGP Route-map Continue Clauses (required)
•
Verifying the Configuration of BGP Route-map Continue(optional)
Configuring BGP Route-map Continue Clauses
To configure a continue clause in a route map, perform the steps in this section.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
router bgp as-number
4.
neighbor ip-address | peer-group-name remote-as as-number
5.
neighbor ip-address | peer-group-name route-map route-map-name in | out
6.
exit
7.
route-map [permit | deny] [sequence-number]
8.
match
9.
set
10.
continue [sequence-number]
11.
exit
Note
The match and set commands in step 8 and 9 are examples that are used to help describe the operation of the continue command. For a list of specific match and set commands, see the "Related Commands" table at the end of the continue command reference page.
DETAILED STEPS
Command or Action PurposeStep 1
enable
Example:Router> enable
Enables higher privilege levels, such as privileged EXEC mode.
•
Enter your password if prompted.
Step 2
configure terminal
Example:Router# configure terminal
Enters global configuration mode.
Step 3
router bgp as-number
Example:Router(config)# router bgp 50000
Enters router configuration mode, and creates a BGP routing process.
Step 4
neighbor ip-address | peer-group-name remote-as as-number
Example:Router(config-router)# neighbor 10.0.0.1 remote-as 50000
Establishes a peering session with the specified neighbor.
Step 5
neighbor ip-address | peer-group-name route-map route-map-name in | out
Router(config-router)# neighbor 10.0.0.1 route-map BLUE in
Applies the inbound route map to routes received from the specified neighbor, or applies an outbound route map to routes advertised to the specified neighbor.
Note
Outbound route maps are supported in Cisco IOS Release 12.0(31)S and subsequent release.
Step 6
exit
Example:Router(config-router)# exit
Exits router configuration mode and enters global configuration mode.
Step 7
route-map [permit | deny] [sequence-number]
Example:Router(config)# route-map ROUTE-MAP-NAME permit 10
Enters route-map configuration mode to create or configure a route map.
Step 8
match
Example:Router(config-route-map)# match ip address
Configures a match command that specifies the conditions under which policy routing and route filtering occur.
•
Multiple match commands can be configured. If a match command is configured, a match must occur in order for the continue statement to be executed. If a match command is not configured, set and continue clauses will be executed.
Note
The match and set commands in step 8 and 9 are examples that are used to help describe the operation of the continue command. For a list of specific match and set commands, see the "Related Commands" table at the end of the continue command reference page.
Step 9
set
Example:Router(config-route-map)# set
Configures a set command that specifies the routing action to perform if the criteria enforced by the match commands are met. Multiple set commands can be configured.
Step 10
continue [sequence-number]
Example:Router(config-route-map)# continue
Configures a route map to continue to evaluate and execute match statements after a successful match occurs.
•
If a sequence number is configured, the continue clause will go to the route map with the specified sequence number.
•
If no sequence number is specified, the continue clause will go to the route map with the next sequence number. This behavior is called an "implied continue."
Step 11
end
Example:Router(config-route-map)# end
Exits route-map configuration mode and enters privileged EXEC mode.
Verifying the Configuration of BGP Route-map Continue
To verify the configuration and flow of continue clauses in a route map, perform the task in this section.
SUMMARY STEPS
1.
show route-map [map-name]
DETAILED STEPS
Configuration Examples for BGP Route-map Continue
The following examples show configuration and verification of this feature:
•
BGP Route Map Continue Clause Example Configuration
•
BGP Route-map Continue Clause Verification Example
BGP Route Map Continue Clause Example Configuration
The following example shows continue clause configuration in a route-map sequence.
The first continue clause in route-map entry 10 indicates that the route map will go to route-map entry 30 if a successful matches occurs. If a match does not occur, the route map will "fall through" to route-map entry 20. If a successful match occurs in route-map entry 20, the set action will be executed and the route map will not evaluate any additional route-map entries.
If a successful match does not occur in route-map entry 20, the route map will "fall through" to route-map entry 30. This sequence does not contain a match clause, so the set clause will be automatically executed and the continue clause will go to the next route-map entry because a sequence number is not specified.
If there are no successful matches, the route-map will "fall through" to route-map entry 30 and execute the set clause, and route-map entry 40 will not be evaluated.
route-map ROUTE-MAP-NAME permit 10match ip address 1match metric 10set as-path prepend 10continue 30!route-map ROUTE-MAP-NAME permit 20match ip address 2match metric 20set as-path prepend 10 10!route-map ROUTE-MAP-NAME permit 30set as-path prepend 10 10 10continue!route-map ROUTE-MAP-NAME permit 40match community 10:1set local-preference 104BGP Route-map Continue Clause Verification Example
To verify the configuration of continue clauses, use the show route-map command. The output of this command will display configured route-maps, match, set, and continue clauses. The following sample output is similar to the output that will be displayed:
Router# show route-maproute-map ROUTE-MAP-NAME, permit, sequence 10Match clauses:ip address (access-lists): 1metric 10Continue: sequence 40Set clauses:as-path prepend 10Policy routing matches: 0 packets, 0 bytesroute-map ROUTE-MAP-NAME, permit, sequence 20Match clauses:ip address (access-lists): 2metric 20Set clauses:as-path prepend 10 10Policy routing matches: 0 packets, 0 bytesroute-map ROUTE-MAP-NAME, permit, sequence 30Match clauses:Continue: to next entry 40Set clauses:as-path prepend 10 10 10Policy routing matches: 0 packets, 0 bytesroute-map ROUTE-MAP-NAME, permit, sequence 40Match clauses:community (community-list filter): 10:1Set clauses:local-preference 104Policy routing matches: 0 packets, 0 bytesroute-map LOCAL-POLICY-MAP, permit, sequence 10Match clauses:Set clauses:community 655370Policy routing matches: 0 packets, 0 bytesAdditional References
The following sections provide references related to configuring BGP and route maps:
Related Documents
Related Topic Document TitleBGP commands
Cisco IOS IP Configuration Guide, Release 12.3
BGP configuration tasks
Cisco IOS IP Command Reference, Volume 2 of 4: Routing Protocols, Release 12.3
Standards
Standards TitleNo new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
—
MIBs
RFCs
RFCs TitleNo new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.
—
Technical Assistance
Description LinkTechnical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, tools, and lots more. Registered Cisco.com users can log in from this page to access even more content.
TAC Home Page:
http://www.cisco.com/public/support/tac/home.shtml
BGP Support Page:
http://www.cisco.com/cgi-bin/Support/browse/psp_view.pl?p=Internetworking:BGP
Command Reference
This section documents new and modified commands.
New Commands
Modified Commands
continue
To configure a route-map to go to a route-map entry with a higher sequence number, use the continue command in route-map configuration mode. To remove a continue clause from a route map, use the no form of this command.
continue sequence-number
no continue
Syntax Description
Defaults
If the sequence number argument is not configured when this command is entered, the continue clause will go to the route-map entry with the next default sequence number.
If a route-map entry contains a continue clause and no match clause, the continue clause will be executed automatically.
Continue clauses can be configured in outbound route maps only in Cisco IOS Release 12.0(31)S, and subsequent releases.
Command Modes
Route-map configuration
Command History
Usage Guidelines
The continue command is used to configure continue clauses in inbound Border Gateway Protocol (BGP) route maps.
Route-map Operation Without Continue Clauses
A route map evaluates match clauses until a successful match occurs. After the match occurs, the route map stops evaluating match clauses and starts executing set clauses, in the order in which they were configured. If a successful match does not occur, the route map "falls through" and evaluates the next sequence number of the route map until all configured route-map entries have been evaluated or a successful match occurs. Each route-map sequence is tagged with a sequence number to identify the entry. Route-map entries are evaluated in order starting with the lowest sequence number and ending with the highest sequence number. If the route map contains only set clauses, the set clauses will be executed automatically, and the route map will not evaluate any other route-map entries.
Route-map Operation With Continue Clauses
When a continue clause is configured, the route map will continue to evaluate and execute match clauses in the specified route-map entry after a successful match occurs. The continue clause can be configured to go to (or jump to) a specific route-map entry by specifying the sequence number, or if a sequence number is not specified, the continue clause will go to the next sequence number. This behavior is called an "implied continue." If a match clause exists, the continue clause is executed only if a match occurs. If no successful matches occur, the continue clause is ignored.
Match Operations With Continue Clauses
If a match clause does not exist in the route-map entry but a continue clause does, the continue clause will be automatically executed and go to the specified route-map entry. If a match clause exists in a route-map entry, the continue clause is executed only when a successful match occurs. When a successful match occurs and a continue clause exists, the route map executes the set clauses and then goes to the specified route-map entry. If the next route map contains a continue clause, the route map will execute the continue clause if a successful match occurs. If a continue clause does not exist in the next route map, the route map will be evaluated normally. If a continue clause exists in the next route map but a match does not occur, the route map will not continue and will "fall through" to the next sequence number if one exists.
Set Operations With Continue Clauses
Set clauses are saved during the match clause evaluation process and executed after the route-map evaluation is completed. The set clauses are evaluated and executed in the order in which they were configured. Set clauses are only executed after a successful match occurs, unless the route map does not contain a match clause. The continue statement proceeds to the specified route-map entry only after configured set actions are performed. If a set action occurs in the first route map and then the same set action occurs again, with a different value, in a subsequent route-map entry, the last set action will override any previous set actions that were configured with the same set command.
Note
A continue clause can be executed, without a successful match, if a route-map entry does not contain a match clause.
Examples
In the following example, continue clause configuration is shown.
The first continue clause in route-map entry 10 indicates that the route map will go to route map entry 30 if a successful matches occurs. If a match does not occur, the route map will "fall through" to route-map entry 20. If a successful match occurs in route-map entry 20, the set action will be executed and the route map will not evaluate any additional route-map entries.
If a successful match does not occur in route-map entry 20, the route map will "fall through" to route-map entry 30. This sequence does not contain a match clause, so the set clause will be automatically executed and the continue clause will go to the next route-map entry because a sequence number is not specified.
If there are no successful matches, the route-map will "fall through" to route-map entry 30 and execute the set clause. Route-map entry 40 will not be evaluated.
Router(config)# route-map ROUTE-MAP-NAME permit 10Router(config-route-map)# match ip address 1Router(config-route-map)# match metric 10Router(config-route-map)# set as-path prepend 10Router(config-route-map)# continue 30Router(config-route-map)# exitRouter(config)# route-map ROUTE-MAP-NAME permit 20Router(config-route-map)# match ip address 2Router(config-route-map)# match metric 20Router(config-route-map)# set as-path prepend 10 10Router(config-route-map)# exitRouter(config)# route-map ROUTE-MAP-NAME permit 30Router(config-route-map)# set as-path prepend 10 10 10Router(config-route-map)# continueRouter(config-route-map)# exitRouter(config)# route-map ROUTE-MAP-NAME permit 40Router(config-route-map)# match community 10:1Router(config-route-map)# set local-preference 104Router(config-route-map)# exitRelated Commands
show route-map
To display configured route maps, use the show route-map command in EXEC mode.
show route-map [map-name]
Syntax Description
Defaults
No default behavior or values.
Command Modes
EXEC
Command History
Examples
The output of this command will display configured route-maps, match, set, and continue clauses. The following sample output is similar to the output that will be displayed:
Router# show route-maproute-map ROUTE-MAP-NAME, permit, sequence 10Match clauses:ip address (access-lists): 1metric 10Continue: sequence 40Set clauses:as-path prepend 10Policy routing matches: 0 packets, 0 bytesroute-map ROUTE-MAP-NAME, permit, sequence 20Match clauses:ip address (access-lists): 2metric 20Set clauses:as-path prepend 10 10Policy routing matches: 0 packets, 0 bytesroute-map ROUTE-MAP-NAME, permit, sequence 30Match clauses:Continue: to next entry 40Set clauses:as-path prepend 10 10 10Policy routing matches: 0 packets, 0 bytesroute-map ROUTE-MAP-NAME, deny, sequence 40Match clauses:community (community-list filter): 20:2Set clauses:local-preference 100Policy routing matches: 0 packets, 0 bytesroute-map LOCAL-POLICY-MAP, permit, sequence 10Match clauses:Set clauses:community 655370Policy routing matches: 0 packets, 0 bytesTable 1 describes the significant fields shown in the display.
Related Commands
Copyright © 2005 Cisco Systems, Inc. All rights reserved

