Reliable policy based routing

August 31, 2008 at 5:16 pm | Posted in Protocol independent, Routing | 1 Comment

Policy based routing with next hop reachability verification via CDP and via enhanced object tracking.

Sample Configuration:

!
!
!
! Track next hop R4 reachibility
ip sla monitor 4
 type echo protocol ipIcmpEcho 155.1.146.4 source-ipaddr 155.1.146.1
 timeout 2000
 frequency 5
ip sla monitor schedule 4 start-time now
!
track 4 rtr 4
!
!
!
interface FastEthernet0/0
 ip address 155.1.146.1 255.255.255.0
!
interface Serial0/0
 ip address 155.1.0.1 255.255.255.0
 encapsulation frame-relay
! enable CDP to check if R5 is availble.
 cdp enable
 frame-relay map ip 155.1.0.5 105 broadcast
 no frame-relay inverse-arp
!
interface Serial0/1
 ip address 155.1.13.1 255.255.255.0
 ip policy route-map POLICY
 clock rate 56000
!
!
ip access-list extended TO_R4
 permit ip any 150.1.4.0 0.0.0.255
ip access-list extended TO_R5
 permit ip any 150.1.5.0 0.0.0.255
!
! By default CDP is sent every 60sec, and neighbor only decleared
! dead after a holdtime of 180sec. Setting CDP timers to quicken convergence
cdp timer 5
cdp holdtime 15
!
!
! This first statement shows tracking via CDP
route-map POLICY permit 10
 match ip address TO_R4
 set ip next-hop 155.1.0.5
 set ip next-hop verify-availability
 set ip default next-hop 155.1.146.4
!
! This second statement shows tracking via enhanced object
route-map POLICY permit 20
 match ip address TO_R5
 set ip next-hop verify-availability 155.1.146.4 1 track 4
 set ip default next-hop 155.1.0.5
!

Verification:
Rack1R3#ping 150.1.4.4 rep 1

Rack1R1#debug track
Rack1R1#debug ip policy
Rack1R1#
*Mar  1 01:19:58.887: IP: s=155.1.13.3 (Serial0/1), d=150.1.4.4, len 100, FIB policy match
*Mar  1 01:19:58.887: IP: s=155.1.13.3 (Serial0/1), d=150.1.4.4, g=155.1.0.5, len 100, FIB policy routed

! Shutdown R5 Serial0 frame interface.

Rack1R1#sh cdp nei | in R5
Rack1R1#

*Mar  1 01:21:47.071: IP: s=155.1.13.3 (Serial0/1), d=150.1.4.4, len 100, FIB policy match
*Mar  1 01:21:47.071: IP: s=155.1.13.3 (Serial0/1), d=150.1.4.4, g=155.1.146.4, len 100, FIB policy routed

! Bringback R5 Serial0 frame interface
Rack1R1#sh cdp nei | in R5
Rack1R5          Ser 0/0            14          R S       1721      Ser 0

Rack1R3#ping 150.1.5.5 rep 1

Rack1R1#
*Mar  1 01:23:06.019: IP: s=155.1.13.3 (Serial0/1), d=150.1.5.5, len 100, FIB policy match
*Mar  1 01:23:06.019: IP: s=155.1.13.3 (Serial0/1), d=150.1.5.5, g=155.1.146.4, len 100, FIB policy routed

! Shutdown R4 ethernet interface.

Rack1R1#
*Mar  1 01:25:41.151: Track: 4 Change #2 rtr 4, state Up->Down

*Mar  1 01:25:55.471: IP: s=155.1.13.3 (Serial0/1), d=150.1.5.5, len 100, FIB policy match
*Mar  1 01:25:55.471: IP: s=155.1.13.3 (Serial0/1), d=150.1.5.5, g=155.1.0.5, len 100, FIB policy routed
Doc CD Navigation

  • Cisco IOS IP Routing Protocols Configuration Guide, Release 12.4
  • Part 6: Protocol-Independent Routing
  • PBR Support for Multiple Tracking Options
Advertisements

Blog at WordPress.com.
Entries and comments feeds.