access-list 100 permit ip host 1.1.1.1 host 4.4.4.4
!
route-map PBR permit 10
match ip address 100
set ip next-hop recursive 3.3.3.3
##################################################################################
set ip next-hop recursive [3.3.3.3] - The router will forward matching traffic to the interface of "show ip route 3.3.3.3", if can not find any it forward using normal routing table.
##################################################################################
Successful PBR
*Mar 1 00:19:31.507: IP: tableid=0, s=1.1.1.1 (Ethernet0/0), d=4.4.4.4 (Ethernet1/3), routed via RIB
*Mar 1 00:19:31.507: IP: s=1.1.1.1 (Ethernet0/0), d=4.4.4.4, len 100, policy match
*Mar 1 00:19:31.511: ICMP type=8, code=0
*Mar 1 00:19:31.511: IP: route map PBR, item 10, permit
*Mar 1 00:19:31.511: IP: s=1.1.1.1 (Ethernet0/0), d=4.4.4.4 (Ethernet0/3), len 100, policy routed
*Mar 1 00:19:31.511: ICMP type=8, code=0
*Mar 1 00:19:31.511: IP: Ethernet0/0 to Ethernet0/3 10.2.23.3
*Mar 1 00:19:31.515: IP: s=1.1.1.1 (Ethernet0/0), d=4.4.4.4 (Ethernet0/3), g=10.2.23.3, len 100, forward
*Mar 1 00:19:31.515: ICMP type=8, code=0
Unsuccessful PBR
*Mar 1 00:15:53.939: IP: tableid=0, s=1.1.1.1 (Ethernet0/0), d=4.4.4.4 (Ethernet1/3), routed via RIB
*Mar 1 00:15:53.939: IP: s=1.1.1.1 (Ethernet0/0), d=4.4.4.4, len 100, policy match
*Mar 1 00:15:53.943: ICMP type=8, code=0
*Mar 1 00:15:53.943: IP: route map PBR, item 10, permit
*Mar 1 00:15:53.943: IP: s=1.1.1.1 (Ethernet0/0), d=4.4.4.4 (Ethernet1/3), len 100, policy rejected -- normal forwarding
*Mar 1 00:15:53.943: ICMP type=8, code=0
*Mar 1 00:15:53.943: IP: s=1.1.1.1 (Ethernet0/0), d=4.4.4.4 (Ethernet1/3), g=10.0.24.4, len 100, forward
*Mar 1 00:15:53.947: ICMP type=8, code=0
Ref: http://cisconinja.wordpress.com/category/pbr/
http://www.cisco.com/en/US/docs/ios/12_0s/feature/guide/12s_pbr.html
No comments:
Post a Comment