Tuesday, January 1, 2013

Cisco's PBR - set ip next-hop verify-availability

Normally set ip next-hop will forward packets when the route-map is matched regardless if the next hop is alive or not. Adding the verify-availability keyword, the router will check the next hop availability via CDP before forwarding the packets, and when next-hop is dead, the packets will be routed through the normal routing table.

http://www.cisco.com/en/US/docs/ios/12_3t/12_3t4/feature/guide/gtpbrtrk.html#wp1057830


Example:

R1#show run | section route-map RPB
 ip policy route-map RPB
route-map RPB permit 10
 match ip address FROM_R3_TO_R4
 set ip next-hop 155.30.0.5
 set ip next-hop verify-availability --> VERIFY VIA CDP
 set ip default next-hop 155.30.146.4
route-map RPB permit 20
 match ip address FROM_R3_TO_R5
 set ip next-hop verify-availability 155.30.146.4 1 track 1
 set ip default next-hop 150.30.0.5