Examples
The following configuration sample shows a configuration used to track an object:
! Configure the objects to be tracked.
! Object 123 will be up if the router can ping 10.1.1.1.
! Object 124 will be up if the router can ping 10.2.2.2.
ip sla monitor 1
type echo protocol ipicmpecho 10.1.1.1
ip sla monitor schedule 1 start-time now life forever
!
ip sla monitor 2
type echo protocol ipicmpecho 10.2.2.2
ip sla monitor schedule 2 start-time now life forever
!
track 123 rtr 1 reachability
track 124 rtr 2 reachability
!
! Enable policy routing using route-map alpha on Ethernet 0.
interface ethernet 0
ip address 10.4.4.254 255.255.255.0
ip policy route-map alpha
!
! 10.1.1.1 is via this interface
interface ethernet 1
ip address 10.1.1.254 255.255.255.0
! 10.2.2.2 is via this interface
interface ethernet 2
ip address 10.2.2.254 255.255.255.0
!
! Configure a route-map to set the next-hop to 10.1.1.1 if object 123 is up. If object 123
! is down, the next hop will be set to 10.2.2.2 if object 124 is up. If object 124 is also
! down, then policy routing fails and unicast routing will route the packet.
route-map alpha
set ip next-hop verify-availability 10.1.1.1 10 track 123
set ip next-hop verify-availability 10.2.2.2 20 track 124
The following configuration sample shows a configuration used to track an object:
! Configure the objects to be tracked.
! Object 123 will be up if the router can ping 10.1.1.1.
! Object 124 will be up if the router can ping 10.2.2.2.
ip sla monitor 1
type echo protocol ipicmpecho 10.1.1.1
ip sla monitor schedule 1 start-time now life forever
!
ip sla monitor 2
type echo protocol ipicmpecho 10.2.2.2
ip sla monitor schedule 2 start-time now life forever
!
track 123 rtr 1 reachability
track 124 rtr 2 reachability
!
! Enable policy routing using route-map alpha on Ethernet 0.
interface ethernet 0
ip address 10.4.4.254 255.255.255.0
ip policy route-map alpha
!
! 10.1.1.1 is via this interface
interface ethernet 1
ip address 10.1.1.254 255.255.255.0
! 10.2.2.2 is via this interface
interface ethernet 2
ip address 10.2.2.254 255.255.255.0
!
! Configure a route-map to set the next-hop to 10.1.1.1 if object 123 is up. If object 123
! is down, the next hop will be set to 10.2.2.2 if object 124 is up. If object 124 is also
! down, then policy routing fails and unicast routing will route the packet.
route-map alpha
set ip next-hop verify-availability 10.1.1.1 10 track 123
set ip next-hop verify-availability 10.2.2.2 20 track 124
Comments
Post a Comment