Guest

Cisco IOS Software Releases 12.0 S

BGP Route-Map Continue Support for Outbound Policy

  • Viewing Options

  • PDF (286.4 KB)
  • Feedback
BGP Route-Map Continue

Table Of Contents

BGP Route-Map Continue

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

Benefits of 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

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

continue

show route-map


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

Release
Modification

12.0(24)S

This feature was introduced.

12.3(2)T

This feature was integrated.

12.2(18)S

This feature was integrated.

12.0(31)S

BGP Route-map Continue Support for Outbound Policy was introduced.


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

Additional References

Command Reference

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

Benefits of 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
Purpose

Step 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

 
Command or Action
Purpose

Step 1 

show route-map [map-name]

Example:

Router# show route-map

(Optional) Displays locally configured route maps. The name of the route map can be entered to filter the output.

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 10
 match ip address 1
 match metric 10
 set as-path prepend 10
 continue 30
 !
route-map ROUTE-MAP-NAME permit 20
 match ip address 2
 match metric 20
 set as-path prepend 10 10
 !
route-map ROUTE-MAP-NAME permit 30
 set as-path prepend 10 10 10
 continue
 !
route-map ROUTE-MAP-NAME permit 40
 match community 10:1
 set local-preference 104

BGP 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-map
route-map ROUTE-MAP-NAME, permit, sequence 10
  Match clauses:
    ip address (access-lists): 1 
    metric 10 
  Continue: sequence 40
  Set clauses:
    as-path prepend 10
  Policy routing matches: 0 packets, 0 bytes
route-map ROUTE-MAP-NAME, permit, sequence 20
  Match clauses:
    ip address (access-lists): 2 
    metric 20 
  Set clauses:
    as-path prepend 10 10
  Policy routing matches: 0 packets, 0 bytes
route-map ROUTE-MAP-NAME, permit, sequence 30
  Match clauses:
  Continue: to next entry 40
  Set clauses:
    as-path prepend 10 10 10
  Policy routing matches: 0 packets, 0 bytes
route-map ROUTE-MAP-NAME, permit, sequence 40
  Match clauses:
    community (community-list filter): 10:1 
  Set clauses:
    local-preference 104
  Policy routing matches: 0 packets, 0 bytes
route-map LOCAL-POLICY-MAP, permit, sequence 10
  Match clauses:
  Set clauses:
    community 655370
  Policy routing matches: 0 packets, 0 bytes

Additional References

The following sections provide references related to configuring BGP and route maps:

Related Documents

Related Topic
Document Title

BGP 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
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


MIBs

MIBs
MIBs Link

No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

To obtain lists of supported MIBs by platform and Cisco IOS release, and to download MIB modules, go to the Cisco MIB website on Cisco.com at the following URL:

http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml


RFCs

RFCs
Title

No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.


Technical Assistance

Description
Link

Technical 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

continue

Modified Commands

show route-map

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

sequence-number

(Optional) Route-map sequence number.

If a route-map sequence number is not specified when configuring a continue clause, the continue clause will continue to the route-map entry with the next sequence number. This behavior is referred to as an "implied continue."


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

Release
Modification

12.0(22)S

This command was introduced.

12.3(2)T

This command was integrated into Cisco IOS Release 12.3(2)T.

12.2(18)S

This command was integrated into Cisco IOS Release 12.2(18)S.

12.0(31)S

Support for outbound route maps was introduced.


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 10 
Router(config-route-map)# match ip address 1 
Router(config-route-map)# match metric 10 
Router(config-route-map)# set as-path prepend 10 
Router(config-route-map)# continue 30 
Router(config-route-map)# exit 
Router(config)# route-map ROUTE-MAP-NAME permit 20 
Router(config-route-map)# match ip address 2 
Router(config-route-map)# match metric 20 
Router(config-route-map)# set as-path prepend 10 10 
Router(config-route-map)# exit 
Router(config)# route-map ROUTE-MAP-NAME permit 30 
Router(config-route-map)# set as-path prepend 10 10 10 
Router(config-route-map)# continue 
Router(config-route-map)# exit 
Router(config)# route-map ROUTE-MAP-NAME permit 40
Router(config-route-map)# match community 10:1
Router(config-route-map)# set local-preference 104
Router(config-route-map)# exit 

Related Commands

Command
Description

aggregate-address

Creates an aggregate entry in a BGP or multicast BGP database.

match as-path

Match BGP autonomous system path access lists.

match community

Matches a BGP community.

match extcommunity

Matches a BGP extended community.

match interface (IP)

Distributes routes that have their next hop out one of the interfaces specified.

match ip address

Distributes any routes that have a destination network number address permitted by a standard or extended access list, or performs policy routing on packets.

match ip next-hop

Redistributes any routes that have a next-hop router address passed by one of the access lists specified.

match ip route-source

Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.

match length

Bases policy routing on the Level 3 length of a packet.

match metric (IP)

Redistributes routes with the metric specified.

match mpls-label

Redistributes routes that include MPLS labels if the routes meet the conditions specified in the route map.

match route-type (IP)

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

neighbor default-originate

Allows a BGP speaker (the local router) to send the default route 0.0.0.0 to a neighbor for use as a default route.

neighbor route-map

Applies a route map to incoming or outgoing routes.

neighbor remote-as

Adds an entry to the BGP or multiprotocol BGP neighbor table.

redistribute (IP)

Redistributes routes from one routing domain into another routing domain.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.

set as-path

Modifies an autonomous system path for BGP routes.

set automatic-tag

Automatically computes the tag value in a route map configuration.

set comm-list delete

Removes communities from the community attribute of an inbound or outbound update.

set community

Sets the BGP communities attribute.

set dampening

Sets the BGP route dampening factors.

set default interface

Indicates where to output packets that pass a match clause of a route map for policy routing and have no explicit route to the destination.

set extcommunity

Sets the BGP extended communities attribute.

set interface

Indicates where to output packets that pass a match clause of route map for policy routing.

set ip default next-hop

Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco IOS software has no explicit route to a destination.

set ip default next-hop verify-availability

Configures a router to check the CDP database for the availability of an entry for the default next hop that is specified by the set ip default next-hop command.

set ip next-hop

Indicates where to output packets that pass a match clause of a route map for policy routing.

set ip next-hop verify-availability

Configures policy routing to verify if the next hops of a route map are CDP neighbors before policy routing to those next hops.

set ip precedence

Sets the precedence value in the IP header.

set level (IP)

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric (BGP, OSPF, RIP)

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set mpls-label

Enables a route to be distributed with an MPLS label if the route matches the conditions specified in the route map.

set next-hop

Specifies the address of the next hop.

set nlri

This command was replaced by the address-family ipv4 and address-family vpnv4 commands.

set origin (BGP)

Sets the BGP origin code.

set qos-group

Sets a group ID that can be used later to classify packets.

set tag (IP)

Sets the value of the destination routing protocol.

set traffic-index

Defines where to output packets that pass a match clause of a route map for BGP policy accounting.

set weight

Specifies the BGP weight for the routing table.

show ip bgp

Displays entries in the BGP routing table.

show route-map

Displays all route maps configured or only the one specified.


show route-map

To display configured route maps, use the show route-map command in EXEC mode.

show route-map [map-name]

Syntax Description

map-name

(Optional) Name of a specific route map.


Defaults

No default behavior or values.

Command Modes

EXEC

Command History

Release
Modification

10.0

This command was introduced.

12.0(22)S

Support for continue clauses was integrated into the output.

12.3(2)T

Support for continue clauses was integrated into the output.

12.2(18)S

Support for continue clauses was integrated into the output.


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-map
route-map ROUTE-MAP-NAME, permit, sequence 10
  Match clauses:
    ip address (access-lists): 1 
    metric 10 
  Continue: sequence 40
  Set clauses:
    as-path prepend 10
  Policy routing matches: 0 packets, 0 bytes
route-map ROUTE-MAP-NAME, permit, sequence 20
  Match clauses:
    ip address (access-lists): 2 
    metric 20 
  Set clauses:
    as-path prepend 10 10
  Policy routing matches: 0 packets, 0 bytes
route-map ROUTE-MAP-NAME, permit, sequence 30
  Match clauses:
  Continue: to next entry 40
  Set clauses:
    as-path prepend 10 10 10
  Policy routing matches: 0 packets, 0 bytes
route-map ROUTE-MAP-NAME, deny, sequence 40
  Match clauses:
    community (community-list filter): 20:2 
  Set clauses:
    local-preference 100
  Policy routing matches: 0 packets, 0 bytes
route-map LOCAL-POLICY-MAP, permit, sequence 10
  Match clauses:
  Set clauses:
    community 655370
  Policy routing matches: 0 packets, 0 bytes

Table 1 describes the significant fields shown in the display.

Table 1 show route-map Field Descriptions 

Field
Description

route-map ROUTE-MAP-NAME

Name of the route map.

permit

Indicates that the route is redistributed as controlled by the set actions.

sequence

Number that indicates the position a new route map is to have in the list of route maps already configured with the same name.

Match clauses:

Match criteria—conditions under which redistribution is allowed for the current route map.

Continue:

Continue clause—shows the configuration of a continue clause and the route-map entry sequence number that the continue clause will go to.

Set clauses:

Set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met.

Policy routing matches:

The number of packets and bytes that have been successfully policy routed.


Related Commands

Command
Description

redistribute (IP)

Redistributes routes from one routing domain into another routing domain.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.