Table Of Contents
How to Configure PBR Recursive Next Hop
Setting the Recursive Next-Hop IP Address
Verifying the Recursive Next-Hop Configuration
Configuration Examples for PBR Recursive Next Hop
Recursive Next-Hop IP Address: Example
PBR Recursive Next Hop
The PBR Recursive Next Hop feature enhances route maps to enable configuration of a recursive next-hop IP address that is used by policy-based routing (PBR). The recursive next-hop IP address is installed in the routing table and can be a subnet that is not directly connected. If the recursive next-hop IP address is not available, packets are routed using a default route.
Because Cisco Express Forwarding (CEF) or process switching provides the infrastructure, the benefit of this feature is the CEF load sharing.
Feature History for the PBR Recursive Next Hop Feature
Release Modification12.0(28)S
This feature was introduced.
12.3(14)T
This feature was integrated into Cisco IOS Release 12.3(14)T.
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
•
How to Configure PBR Recursive Next Hop
•
Configuration Examples for PBR Recursive Next Hop
How to Configure PBR Recursive Next Hop
This section contains the following procedures:
•
Setting the Recursive Next-Hop IP Address (required)
•
Verifying the Recursive Next-Hop Configuration (optional)
Setting the Recursive Next-Hop IP Address
The infrastructure provided by CEF or process switching performs the recursion to the next-hop IP address. The configuration sequence, which affects routing, is as follows:
1.
Next-hop
2.
Next-hop recursive
3.
Interface
4.
Default next-hop
5.
Default interface
If both a next-hop and a recursive next-hop IP address are present in the same route-map entry, the next-hop is used. If the next-hop is not available, the recursive next-hop is used. If the recursive next-hop is not available and no other IP address is present, the packet is routed using the default routing table; it is not dropped. If the packet is supposed to be dropped, use the set next-hop recursive command followed by a set interface null0 configuration.
Perform this task to set the IP address for the recursive next-hop router.
Prerequisites
If load sharing is required, CEF load sharing should be configured for per-packet or per-destination load sharing. Load balancing should be done over all equal-cost routes to the subnet that have been configured by the set next-hop recursive command.
This functionality should be available in centralized and distributed systems.
Restrictions
Only one recursive next-hop IP address is supported per route-map entry.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
access-list permit source
4.
route-map map-tag
5.
set ip next-hop ip-address
6.
set ip next-hop recursive ip-address
7.
match ip address access-list-number
8.
exit
DETAILED STEPS
Verifying the Recursive Next-Hop Configuration
To verify the recursive next-hop configuration, perform the following steps.
SUMMARY STEPS
1.
show running-config | beg abccomp
2.
show route-map abccomp
DETAILED STEPS
Step 1
show running-config | beg abccomp
Use this command to verify the IP addresses for a next-hop and recursive next-hop IP address, for example:
Router# show running-config | beg abccomproute-map abccomp permit 10match ip address 101 ! Defines the match criteria for an access list.set ip next-hop recursive 10.3.3.3 ! If the match criteria is met, the recursive IP address is set.set ip next-hop 10.1.1.1 10.2.2.2 10.4.4.4Step 2
show route-map abccomp
Use this command to display the route-maps, for example:
Router# show route-map abccomproute-map abccomp, permit, sequence 10Match clauses:ip address (access-lists): 101Set clauses:ip next-hop recursive 10.3.3.3ip next-hop 10.1.1.1 10.2.2.2 10.4.4.4Policy routing matches: 0 packets, 0 bytes
Configuration Examples for PBR Recursive Next Hop
This section provides the following configuration example:
•
Recursive Next-Hop IP Address: Example
Recursive Next-Hop IP Address: Example
The following example shows the configuration of IP address 10.3.3.3 as the recursive next-hop router:
route-map abccompset ip next-hop 10.1.1.1set ip next-hop 10.2.2.2set ip next-hop recursive 10.3.3.3set ip next-hop 10.4.4.4Additional References
The following sections provide references related to the PBR Recursive Next Hop feature.
Related Documents
Related Topic Document TitleIP routing commandss: complete command syntax, command mode, command history, defaults, usage guidelines, and examples
Cisco IOS IP Command Reference, Volume 2 of 4: Routing Protocols, Release 12.3T
Policy-based routing overview and configuration
" Configuring Policy-Based Routing" chapter in the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2
MIBs
Technical Assistance
Command Reference
This section documents modified commands only.
set ip next-hop
To indicate where to output packets that pass a match clause of a route map for policy routing, use the set ip next-hop command in route-map configuration mode. To delete an entry, use the no form of this command.
set ip next-hop {ip-address [...ip-address] | recursive ip-address}
no set ip next-hop ip-address [...ip-address]
Syntax Description
Defaults
This command is disabled by default.
Command Modes
Route-map configuration
Command History
Release Modification11.0
This command was introduced.
12.0(28)S
The recursive keyword was added.
12.3(14)T
This command was integrated into Cisco IOS Release 12.3(14)T.
Usage Guidelines
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the ip-address argument.
Use the ip policy route-map interface configuration command, the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for policy routing packets. The ip policy route-map command identifies a route map by name. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which policy routing occurs. The set commands specify the set actions—the particular routing actions to perform if the criteria enforced by the match commands are met.
If the interface associated with the first next hop specified with the set ip next-hop command is down, the optionally specified IP addresses are tried in turn.
The set clauses can be used in conjunction with one another. They are evaluated in the following order:
1.
set ip next-hop
2.
set interface
3.
set ip default next-hop
4.
set default interface
Note
The set ip next-hop and set ip default next-hop are similar commands but have a different order of operations. Configuring the set ip next-hop command causes the system to use policy routing first and then use the routing table. Configuring the set ip default next-hop command causes the system to use the routing table first and then policy route the specified next hop.
Examples
In the following example, packets with a Level 3 length of 3 to 50 bytes are output to the router at IP address 10.14.2.2:
interface serial 0ip policy route-map thataway!route-map thatawaymatch length 3 50set ip next-hop 10.14.2.2In the following example, the IP address of 10.3.3.3 is set as the recursive next-hop address:
route-map map_recurseset ip next-hop recursive 10.3.3.3Related Commands
show route-map
To display static and dynamic route maps, use the show route-map command in privileged EXEC mode.
show route-map [map-name | dynamic [dynamic-map-name | application [application-name]] | all]
Syntax Description
Command Modes
Privileged EXEC
Command History
Examples
show route-map Command with No Keywords Specified Example
The following is sample output from the show route-map command:
Router# show route-maproute-map sid, permit, sequence 10Match clauses:tag 1 2Set clauses:metric 5route-map sid, permit, sequence 20Match clauses:tag 3 4Set clauses:metric 6Policy routing matches: 0 packets; 0 bytesThe following example shows MPLS-related route map information:
Router# show route-maproute-map OUT, permit, sequence 10Match clauses:ip address (access-lists): 1Set clauses:mpls labelPolicy routing matches: 0 packets, 0 bytesroute-map IN, permit, sequence 10Match clauses:ip address (access-lists): 2mpls labelSet clauses:Policy routing matches: 0 packets, 0 bytesTable 1 describes the significant fields shown in the display.
show route-map Command with Dynamic Route Map Specified Example
The following is sample output from the show route-map command when entered with the dynamic keyword:
Router# show route-map dynamicroute-map AAA-02/06/04-14:01:26.619-1-AppSpec, permit, sequence 0, identifier 1137954548Match clauses:ip address (access-lists): PBR#1 PBR#2Set clauses:Policy routing matches: 0 packets, 0 bytesroute-map AAA-02/06/04-14:01:26.619-1-AppSpec, permit, sequence 1, identifier 1137956424Match clauses:ip address (access-lists): PBR#3 PBR#4Set clauses:Policy routing matches: 0 packets, 0 bytesroute-map AAA-02/06/04-14:01:26.619-1-AppSpec, permit, sequence 2, identifier 1124436704Match clauses:ip address (access-lists): PBR#5 PBR#6length 10 100Set clauses:ip next-hop 7.1.1.1ip gateway 7.1.1.1Policy routing matches: 0 packets, 0 bytesCurrent active dynamic routemaps = 1The following is sample output from the show route-map command when entered with the dynamic and application keywords:
Router# show route-map dynamic applicationApplication - AAANumber of active routemaps = 1When you specify an application name, only dynamic routes for that application are shown. The following is sample output from the show route-map command when entered with the dynamic and application keywords and the AAA application name:
Router# show route-map dynamic application AAAAAANumber of active rmaps = 2AAA-02/06/04-14:01:26.619-1-AppSpecAAA-02/06/04-14:34:09.735-2-AppSpecRouter# show route-map dynamic AAA-02/06/04-14:34:09.735-2-AppSpecroute-map AAA-02/06/04-14:34:09.735-2-AppSpec, permit, sequence 0, identifier 1128046100Match clauses:ip address (access-lists): PBR#7 PBR#8Set clauses:Policy routing matches: 0 packets, 0 bytesroute-map AAA-02/06/04-14:34:09.735-2-AppSpec, permit, sequence 1, identifier 1141277624Match clauses:ip address (access-lists): PBR#9 PBR#10Set clauses:Policy routing matches: 0 packets, 0 bytesroute-map AAA-02/06/04-14:34:09.735-2-AppSpec, permit, sequence 2, identifier 1141279420Match clauses:ip address (access-lists): PBR#11 PBR#12length 10 100Set clauses:ip next-hop 7.1.1.1ip gateway 7.1.1.1Policy routing matches: 0 packets, 0 bytesCurrent active dynamic routemaps = 2In the following example, a recursive route-map has been configured for the route-map named abccomp:
Router# show route-map abccomproute-map abccomp, permit, sequence 10Match clauses:ip address (access-lists): 101Set clauses:ip next-hop recursive 10.3.3.3ip next-hop 10.1.1.1 10.2.2.2 10.4.4.4Policy routing matches: 0 packets, 0 bytesRelated Commands
Copyright © 2005 Cisco Systems, Inc. All rights reserved.


