M Config Local Policy Based Routing
M Config Local Policy Based Routing
This chapter describes how to configure local policy-based routing (PBR) on the Cisco NX-OS device.
• Finding Feature Information, on page 1
• Information About Local Policy-Based Routing, on page 1
• Prerequisites for Local Policy-Based Routing, on page 2
• Guidelines and Limitations, on page 3
• Default Settings for Local Policy-Based Routing, on page 3
• Configuring Local Policy-Based Routing, on page 3
• Verifying the Local Policy-Based Routing Configuration, on page 6
• Configuration Example for Local Policy-Based Routing, on page 6
• Feature History for Local Policy-Based Routing, on page 6
If the statement is marked as permit and the packets do not match any route-map statements, the packets are
sent back through the normal forwarding channels and destination-based routing is performed.
Route Maps
You can use route maps for route redistribution or policy-based routing. Route map entries consist of a list
of match and set criteria. The match criteria specify match conditions for incoming routes or packets, and the
set criteria specify the action taken if the match criteria are met.
You can configure multiple entries in the same route map. These entries contain the same route map name
and are differentiated by a sequence number.
You create a route map with one or more route map entries arranged by the sequence number under a unique
route map name. The route map entry has the following parameters:
• Sequence number
• Permission—permit or deny
• Match criteria
• Set changes
By default, a route map processes routes or IP packets in a linear fashion, that is, starting from the lowest
sequence number. You can configure the route map to process in a different order using the continue statement,
which allows you to determine which route map entry to process next.
Match Criteria
You can use a variety of criteria to match a route or IP packet in a route map. When Cisco NX-OS processes
a route or packet through a route map, it compares the route or packet to each of the match statements
configured. If the route or packet matches the configured criteria, Cisco NX-OS processes it based on the
permit or deny configuration for that match entry in the route map and any set criteria configured.
The match categories and parameters are as follows:
• IP access lists—(For policy-based routing only). Match based on source or destination IP address, protocol,
or QoS parameters.
Set Changes
Once a route or packet matches an entry in a route map, the route or packet can be changed based on one or
more configured set statements.
The set changes are as follows:
• Policy-based routing only—Change the interface or the default next-hop address.
Parameter Default
SUMMARY STEPS
1. switch# configure terminal
2. switch(config)# route-map map-name [permit | deny] [seq]
DETAILED STEPS
Step 2 switch(config)# route-map map-name [permit | deny] Creates a route map or enters route-map configuration mode
[seq] for an existing route map. Use seq to order the entries in a
route map.
Step 3 (Optional) switch(config-route-map)# continue seq Determines what sequence statement to process next in the
route map. Used only for filtering and redistribution.
You can configure the following optional match parameters for route maps in route-map configuration mode:
SUMMARY STEPS
1. switch(config-route-map)# match ipv6 address ip access list number
DETAILED STEPS
You can configure the following optional set precedence parameter for route maps in route-map configuration
mode:
SUMMARY STEPS
1. [no] set precedence {number | name}
DETAILED STEPS
SUMMARY STEPS
1. switch# configure terminal
2. switch(config)# [no] feature pbr
3. (Optional) switch(config)# show feature
4. (Optional) switch(config)# copy running-config startup-config
DETAILED STEPS
Step 2 switch(config)# [no] feature pbr Enables the policy-based routing feature.
Use the no form of this command to disable the feature.
Step 3 (Optional) switch(config)# show feature Displays enabled and disabled features.
SUMMARY STEPS
1. switch# configure terminal
2. switch(config)# feature pbr
3. switch(config)# [no] ipv6 local policy route-map map-name
DETAILED STEPS
Step 3 switch(config)# [no] ipv6 local policy route-map Assigns a route map for local policy-based routing to the
map-name interface.
Use the no form of this command to disable the feature.
Step 4 (Optional) switch(config)# show ipv6 local policy Displays information about the policy.
Command Purpose
show ipv6 local policy Displays information about the local IPv6 policy.
For detailed information about the fields in the output from these commands, see the Cisco Nexus 7000 Series
NX-OS Quality of Service Command Reference.
feature pbr
route-map Testmap, permit, sequence 10
ip address 10
ip next-hop
ip precedence: internet
latest caveats and feature information, see the Bug Search Tool at https://tools.cisco.com/bugsearch/ and the
release notes for your software release.