CONFIGURING IP SLA OVER HSRP
Chirag Dhall
CCIE #68677 | Corporate Trainer at PyNet Labs | CCIE Enterprise Infrastructure | SDWAN | CCNP ENCOR | CCNP ENARSI | CCNA Enterprise | CCNA DevNet | Ansible | Foundations of Network Automation
In this article I'll help you configure and test HSRP (Hot Standby Router Protocol) for a small campus network to ensure the recovery of user traffic transparently and immediately from first hop router failures.
Create a topology like shown below:
Configure the IP addresses on R1, R2 and R3. Then configure the virtual IP address 192.168.10.254 /24 and priority for the router using the commands given below.
R1:
R1(config)#int gi 0/0
R1(config-if)#standby ip 192.168.10.254
R1(config-if)#standby preempt
R1(config-if)#standby priority 110
R1(config-if)#standby track 1 decrement 20
R1(config-if)#ex
Now, configure the same IP address on R2’s interface.
R2:
R2(config)#int gi 0/0
R2(config-if)#standby ip 192.168.10.254
R2(config-if)#standby preempt
R2(config-if)#exit
Use the command ‘show standby’ in the enable mode to check the details.
We can observe that R1 is the active router because of the priority we set while configuring the HSRP.
Configure DHCP pool on R1 and R2 with the default gateway as 192.168.10.254 and R3 with 192.168.30.3
Now, the next step is to configure routing on the devices. I am configuring EIGRP 1 here.
R1:
R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.10.0
R1(config-router)#network 192.168.20.0
R1(config-router)#ex
R2:
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.10.0
R2(config-router)#network 192.168.20.0
R2(config-router)#ex
R3:
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.20.0
R3(config-router)#network 192.168.30.0
R3(config-router)#ex
Now, we will create the SLA to keep a check on the reachability to destination 192.168.30.3 from source R1.
R1(config)#ip sla 1
R1(config-ip-sla)#icmp-echo 192.168.30.3
R1(config-ip-sla-echo)#frequency 10
R1(config-ip-sla-echo)#exit
R1(config)#ip sla schedule 1 start-time now life forever
Now, let’s bind the IP SLA with the HSRP.
R1(config)#track 1 ip sla 1 reachability
You can use the command ‘show ip sla statistics’ in the enable mode to look into the details and verify the working of SLA after this by shutting the Gi0/1 interface of the Active Router. You will observer IP SLA failing, making the standby router active.
Senior Network Engineer
6 个月Great !!