Recent Posts

Saturday, 19 August 2017

HSRP Lab work

HSRP Configuration

In this tutorial we are going to learn about HSRP (Hot Standby Router Protocol).
What do you know about HSRP ?
HSRP stands for Hot Standby Routing Protocol. It is a Cisco proprietary protocol that provides high availability and redundancy. It enables a set of router interfaces to work together and present them as a single virtual router (Default gateway) to the clients on a network. HSRP uses a virtual MAC address and an IP address that is shared by a group of configured routers. It uses the concept of Active and Standby (Master/Backup) routers for redundancy. The Active router is the router that is preferred to route the network packets. The Standby router is the router that takes over the routing responsibilities when the Active router fails. In this post, we will learn how to configure HSRP on Cisco routers.
The Active router is the router that is preferred to route the network packets. The Standby router is the router that takes over the routing responsibilities when the Active router fails. In this post, we will learn how to configure HSRP on Cisco routers.
Before to configure HSRP, you should consider the following:
The following interface configuration commands are used to set the characteristics to elect the Active and Standby routers.
standby priority
standby preempt
standby track

In addition, these commands are also used to set the behavior regarding when a new active router will take over the routing responsibilities.
The Active and Standby routers can be elected by using the Priority value. If preemption is enabled, the router with the highest priority will become the Active router. If the priority values of two or more routers are equal in a group of configured routers, the current Active router will not be changed. The priority value can vary from 1 to 255. The highest number means the highest priority and higher the chances to become the Active router. The priority of a router can change dynamically if an interface is configured with the standby track command, and another interface on the router goes down.

Configure HSRP step by step

To configure in HSRP on cisco router , we should first start preparing the following topology;


  1. On WAN router, execute the following commands to configure the appropriate IP addresses on the Loopback1, Fa0/0, and Fa0/1 interfaces.
RouterA(config)#interface Loopback1
RouterA(config-if)#ip address 200.200.200.1 255.255.255.0
RouterA(config-if)#no shutdown
RouterA(config-if)#exit

RouterA(config)#interface Fa0/0
RouterA(config-if)#ip address 172.16.2.1 255.255.255.0
RouterA(config-if)#no shutdown
RouterA(config-if)#exit

RouterA(config)#interface Fa0/1
RouterA(config-if)#ip address 172.16.1.1 255.255.255.0
RouterA(config-if)#no shutdown
RouterA(config-if)#exit



  1. Once you have configured the appropriate IP addresses, execute the following commands to configure the RIP version 2 Protocol.
RouterA(config)#router rip
RouterA(config-router)#version 2
RouterA(config-router)#network 172.16.1.0
RouterA(config-router)#network 172.16.2.0
RouterA(config-router)#network 200.200.200.0
RouterA(config-router)#no auto-summary
RouterA(config-router)#exit



  1. Once you have configured IP addresses and routing on WAN router, move on to Master router and execute the following command. This router will act as Active router.
  2. Execute the following commands to configure IP address on the Fa0/0 interface.
RouterB(config)#interface Fa0/0
RouterB(config-if)#ip address 10.0.0.10 255.255.255.0
RouterB(config-if)#no shutdown
RouterB(config-if)#exit



  1. Next, execute the following command to define a group number (1-4096) and set 10.0.0.150 as the virtual IP address.
RouterB(config-if)#standby 1 ip 10.0.0.150



  1. Next, execute the following command to set the priority value, to enable preempt, and to set the track interface.
RouterB(config-if)#standby 1 priority 101
RouterB(config-if)#standby 1 preempt
RouterB(config-if)#standby 1 track fa0/1



  1. Next, execute the following commands to set the IP address on the Fa0/1 interface.
RouterB(config)#interface Fa0/1
RouterB(config-if)#ip address 172.16.1.2 255.255.255.0
RouterB(config-if)#no shutdown
RouterB(config-if)#exit


  1. Next, execute the following commands to configure the RIP version 2 routing.
RouterB(config)#router rip
RouterB(config-router)#version 2
RouterB(config-router)#network 172.16.1.0
RouterB(config-router)#network 10.0.0.0
RouterB(config-router)#no auto-summary
RouterB(config-router)#exit



  1. Now, move on to the Backup router and execute the following commands. On this router, we will set the priority value as 99 (lower than Master router).
Backup(config)#interface Fa0/0
Backup(config-if)#ip address 10.0.0.20 255.255.255.0
Backup(config-if)#no shutdown

Backup(config-if)#standby 1 ip 10.0.0.150
Backup(config-if)#standby 1 priority 99
Backup(config-if)#standby 1 preempt
Backup(config-if)#exit

Backup(config)#interface Fa0/1
Backup(config-if)#ip address 172.16.2.2 255.255.255.0
Backup(config-if)#no shutdown
Backup(config-if)#exit

Backup(config)#router rip
Backup(config-router)#version 2
Backup(config-router)#network 172.16.2.0
Backup(config-router)#network 10.0.0.0
Backup(config-router)#no auto-summary
Backup(config-router)#exit



  1. Once you have configured the HSRP routing protocol on Master and Backup routers, now it’s time to verify your configuration. To do so, execute the following command on Master router and examine the output shown in the following figure.
Master#show standby



  1. In the preceding figure, you can see that Master router is currently acting as an Active router because it has higher priority (101) than the Backup router (99).
  2. To explain what happens when the Active router fails, we will shut down the Fa0/0 interface on Master router. To do so, execute the following commands.
Master(config)#int fa0/0
Master(config-if)#shutdown



  1. Now, move on to the Backup router and execute the following command.
Backup#show standby



  1. In the preceding figure, you can see that Backup router becomes the Active router and takes the routing responsibilities as soon as the interface of Master router goes down.
The destination network can still be reached because clients will use 10.0.0.150 virtual IP address as the default gateway. When the Master router fails, the Backup router will take the routing responsibilities. When the Backup router fails, the Master router will take the routing responsibilities. This is what the HSRP protocol does.
Therefore, we have completed HSRP configuration in packet tracer version 7.0.
In this post, we have discussed how to configure HSRP on Cisco switch and how it can help to provide the redundancy. Please share the post if you think it can help others too.

No comments:

Post a Comment

Popular Posts