25-6

Software Configuration Guide—Release 12.2(25)SG
OL-7659-03
Chapter25 Configuring Policy-Based Routing
Policy-Based Routing Configuration Examples
!
route-map equal-access permit 10
match ip address 1
set ip default next-hop 6.6.6.6
route-map equal-access permit 20
match ip address 2
set ip default next-hop 7.7.7.7
route-map equal-access permit 30
set default interface null0

Note If the packets you want to drop do not match either of the first two route-map clauses, then change set

default interface null0 to set interface null0.

Differing Next Hops Example

The following example illustrates how to route traffic from different sources to different places (next

hops). Packets arriving from source 1.1.1.1 are sent to the next hop at 3.3.3.3; packets arriving from

source 2.2.2.2 are sent to the next hop at 3.3.3.5.

access-list 1 permit ip 1.1.1.1
access-list 2 permit ip 2.2.2.2
!
interface fastethernet 3/1
ip policy route-map Texas
!
route-map Texas permit 10
match ip address 1
set ip next-hop 3.3.3.3
!
route-map Texas permit 20
match ip address 2
set ip next-hop 3.3.3.5
Deny ACE Example

The following example illustrates how to stop processing a given route map sequence, and to jump to

the next sequence. Packets arriving from source 1.1.1.1 will skip sequence 10 and jump to sequence 20.

All other packets from subnet 1.1.1.0 will follow the set statement in sequence 10.

access-list 1 deny ip 1.1.1.1
access-list 1 permit ip 1.1.1.0 0.0.0.255
access-list 2 permit ip 1.1.1.1
access-list 2 permit ip 2.2.2.2
!
interface fastethernet 3/1
ip policy route-map Texas
!
route-map Texas permit 10
match ip address 1
set ip next-hop 3.3.3.3
!
route-map Texas permit 20
match ip address 2
set ip next-hop 3.3.3.5