Overview of Layer 3 Policy-based Routing

The policy-based routing feature lets you use policies (based on criteria such as access control lists (ACLs), protocols, packet size, and source and destination IP addresses) to selectively forward and route IP packets.

Feature Description

With policy-based routing, you define a set of classifications that, when met, cause a packet to be forwarded to a predetermined next-hop interface. With this process, the packet bypasses the normal routing path in the routing table. If your policy has multiple next hops to a destination, packets are forwarded to the first available (UP) hop. If none of the next hops in the policy is available, then packets are forwarded according to the routing table.

You can define multiple match and next-hop specifications on the same interface. The configuration of a set of match criteria and routing information is called a "stanza." You assign each stanza an instance ID, which controls the stanza's position in a route map. When you create a route map, you specify deny and permit criteria. The combination of permit and deny criteria for route maps and ACLs results in specific TCAM actions.
Table 1. Permit and deny matrix for route maps and ACLs
Route map ACL TCAM action

Permit

Permit

The contents of the set command of the route-map entry are applied.

Permit

Deny

The packet is passed and routed normally. The contents of the set command are not applied.

A "permit" rule with no result actions is programmed in TCAM, which prevents further application of the route-map ACL.

No ACL actions (except counter) are applied.

Deny

Permit

The packet is passed and routed normally. No set commands follow the match command of a deny route-map stanza.

A "permit" rule with no result actions is programmed in TCAM, which prevents further application of the route-map ACL.

No ACL actions (except counter) are applied.

Deny

Deny

No TCAM entry is programmed, therefore other route-map ACL entries are compared for a match. If no match is made, the packet is forwarded normally.

If you do not specify an ACL in a stanza, normal routing occurs. The default ACL is not used.

Scalability

Table 2. Policy-based routing scalability
System Resource Maximum amount
Configurable route maps 200
Configurable stanzas 1024
Available TCAMs 2048
Configurable next-hops in a stanza 128