Let’s say we want to configure a group of objects to track
and if some or all objects are down then we will trigger a failover.
IP SLA and track object are both used frequently for FHRP monitoring;
with IP SLA we can measure responsiveness of nodes in the network and if we can’t
access them then we can trigger HSRP/VRRP failover to second member.
So first let’s configure the IP SLA objects:
!
ip sla 101
icmp-echo 208.67.222.222 source-interface
gigabitEthernet 0/0
owner OPENDNS_SERVER
frequency 5
threshold 2000
timeout 4000
history buckets-kept 15
exit
!
ip sla 102
icmp-echo 8.8.8.8 source-interface
gigabitEthernet 0/0
owner GOOGLE_DNS_SERVER
frequency 5
threshold 2000
timeout 4000
history buckets-kept 15
exit
!
ip sla 103
icmp-echo 8.8.4.4 source-interface
gigabitEthernet 0/0
owner GOOGLE_DNS_SERVER
frequency 5
threshold 2000
timeout 4000
history buckets-kept 15
exit
!
ip sla 104
icmp-echo 4.2.2.1 source-interface
gigabitEthernet 0/0
owner LEVEL3_ANYCAST
frequency 5
threshold 2000
timeout 4000
history buckets-kept 15
exit
!
ip sla schedule 101
start-time now life forever
ip sla schedule 102
start-time now life forever
ip sla schedule 103
start-time now life forever
ip sla schedule 104
start-time now life forever
!
|
Here I used OpenDNS and Google DNS servers and Level3
anycast IP’s.
Then configure track objects:
track 101 ip sla 101
track 102 ip sla 102
track 103 ip sla 103
track 104 ip sla 104
!
|
Each track object is linked to IP SLA object.
Then configure track group:
track 10 list boolean and
object 101
object 102
object 103
object 104
exit
!
|
Here I used Boolean syntax with AND operator but we can also
use OR operator or even change it to weighted threshold where each object has
certain weight on the trigger decision.
And last link the track group to the FHRP monitoring:
interface Gi0/1
standby 1 ip 192.168.10.1
standby 1 preempt
standby 1 priority 150
standby 1 track 10 decrement 100
!
|
In order to view the tracking group type:
show track
|
Here is a list of best tracking IP’s:
#Google DNS servers
8.8.8.8
8.8.4.4
#OpenDNS servers
208.67.222.222
208.67.220.220
#Level3 anycast
4.2.2.1
4.2.2.2
4.2.2.3
|
No comments:
Post a Comment