The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes how to configure policy based routing on the Cisco NX-OS device.
This chapter includes the following sections:
Policy-based routing allows you to configure a defined policy for IPv4 and IPv6 traffic flows, lessening reliance on routes derived from routing protocols. All packets received on an interface with policy-based routing enabled are passed through enhanced packet filters or route maps. The route maps dictate the policy, determining where to forward packets.
Route maps are composed of match and set statements that you can mark as permit or deny. You can interpret the statements as follows:
For more information, see the “Route Maps” section.
Policy-based routing includes the following features:
This section includes the following topics:
Each entry in a route map contains a combination of match and set statements. The match statements define the criteria for whether appropriate packets meet the particular policy (that is, the conditions to be met). The set clauses explain how the packets should be routed once they have met the match criteria.
You can mark the route-map statements as permit or deny. If the statement is marked as a deny, the packets that meet the match criteria are sent back through the normal forwarding channels (destination-based routing is performed). If the statement is marked as permit and the packets meet the match criteria, all the set clauses are applied. If the statement is marked as permit and the packets do not meet the match criteria, those packets are also forwarded through the normal routing channel.
Note Policy routing is specified on the interface that receives the packets, not on the interface from which the packets are sent.
The set criteria in a route map are evaluated in the order listed in the route map. Set criteria specific to route maps used for policy-based routing are as follows:
If the packets do not meet any of the defined match criteria, the packets are routed through the normal destination-based routing process.
The following table shows the licensing requirements for this feature:
Policy-based routing has the following prerequisites:
Policy-based routing has the following configuration guidelines and limitations:
Table 14-1 lists the default settings for policy-based routing parameters.
|
|
---|---|
This section includes the following topics:
Note If you are familiar with the Cisco IOS CLI, be aware that the Cisco NX-OS commands for this feature might differ from the Cisco IOS commands that you would use.
You must enable the policy-based routing feature before you can configure a route policy.
|
|
|
---|---|---|
Use the no feature pbr command to disable the policy-based routing feature and remove all associated configuration.
|
|
---|---|
Disables policy-based routing and removes all associated configuration. |
You can use route maps in policy-based routing to assign routing policies to the inbound interface. See the “Configuring Route Maps” section.
3. ip policy route-map map - name
|
|
|
---|---|---|
Assigns a route map for IPv4 policy-based routing to the interface. |
||
Assigns a route map for IPv6 policy-based routing to the interface. |
||
This example shows how to add a route map to an interface:
switch(config)# interface ethernet 1/2
switch(config-if)# ip policy route-map Testmap
switch(config)# copy running-config startup-config
You can configure the following optional match parameters for route maps in route-map configuration mode:
You can configure the following optional set parameters for route maps in route-map configuration mode:
Cisco Nexus 5500 routes the packet as soon as it finds a next hop and an interface.
To display policy-based routing configuration information, perform one of the following tasks:
|
|
---|---|
Use the route-map map-name pbr-statistics to enable policy statistics. Use the clear route-map map-name pbr-statistics to clear these policy statistics
This example shows how to configure a simple route policy on an interface:
The following output verifies this configuration:
The following topics can give more information on Policy Based Routing:
For additional information related to implementing IP, see the following sections:
|
|
---|---|
Cisco Nexus 5500 Series NX-OS Unicast Routing Command Reference, Release 6.x |
|
|
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |