HSRP Configuration on Cisco IOS

hsrp-topology

HSRP Configuration Example on Cisco Routers

In this Cisco HSRP Configuration Example we will focus on How to Configure HSRP (Hot Standby Router Protocol) on Cisco Routers with GNS3. For our GNS3 HSRP Configuration Example, we will use the below HSRP topology. At the end of this HSRP lesson, you will find the GNS3 Configuration Lab File of this lesson.

 

 

redundancy protocols HSRP example (Hot Standby Router Protocol) topology, protocols for redundancy

HSRP Example Topology

 


Download All GNS3 Configuration Labs


Download All Packet Tracer Configuration Labs


Before the HSRP (Hot Standby Router Protocol) configuration, we must prepare our topology. We will change the router names and we will assigned the ip addresses of the router interfaces.

 

For the left side of the topology, we will use 10.10.10.0 network and for the right side, we will use 10.10.20.0 network. All the interfaces connected to the layer 2 switch will be assigned with the ip addresses related to its connected port. For example the fa0/0 interface of the Site1 router will be assigned the ip address 10.10.10.1 and the GW1’s and GW2’s fa0/0 ip addresses will be 10.10.10.2 and 10.10.10.3 orderly.

 

After interface configuration, we will configure a static route on each Site1 and Site2. In this static route we will use two virtual ip addresses that we will explain in this article. This virtual addresses will be 10.10.10.10 and 10.10.20.20.

 


Site1(config)# ip route 10.10.20.0 255.255.255.0 10.10.10.10
Site2(config)# ip route 10.10.10.0 255.255.255.0 10.10.20.20

 


You can also check Cisco VRRP Configuration Example


 

Now our configuration is ready for HSRP configuration. Let’s start on one side(left) on GW1 and GW2 and after that we will configure a second HSRP Cisco Configuration for the other side(right).

 

GW1


GW1(config)# interface fastethernet 0/0
GW1(config-if)# standby 1 ip 10.10.10.10
GW1(config-if)# standby 1 preempt
GW1(config-if)# standby 1 priority 110
GW1(config-if)# standby 1 track fa0/1 
GW1(config-if)# exit
GW1(config)# interface fastethernet 0/1
GW1(config-if)# standby 1 ip 10.10.20.20
GW1(config-if)# standby 1 preempt
GW1(config-if)# exitGW2

 

GW2


GW2(config)# interface fastethernet 0/0
GW2(config-if)# standby 1 ip 10.10.10.10
GW2(config-if)# standby 1 preempt
GW2(config-if)# standby 1 priority 100
GW2(config-if)# standby 1 track fa0/1 
GW2(config-if)# exit
GW2(config)# interface fastethernet 0/1
GW2(config-if)# standby 1 ip 10.10.20.20
GW2(config-if)# standby 1 preempt
GW2(config-if)# exit

 

You do not need to do this HSRP Cisco Configuration for both sides, but in this configuration, we do it for both sites. After this you can check the configuration with “show standby” command on GW1 and GW2. As you see below, for both redundancy configuration GW1 is the active router and the GW2 is the standby.

 

 

redundancy protocols HSRP (Hot Standby Router Protocol) show standby on active router cisco

Show Standby On Active Router (HSRP)

 

 

redundancy protocols HSRP (Hot Standby Router Protocol) show standby on standby router cisco

Show Standby On Standby Router (HSRP)

 

To check that the traffic from Site1 to Site2 is prefering the GW1 while it is active, do traceroute from Site1. AS you see below the next hop will be the GW1.

 

 

redundancy protocols HSRP (Hot Standby Router Protocol) trace route site1 to site2

Trace Route From Router X (HSRP)

And like the same, when you start traceroute from Site2 to Site1, the traffic will choose the GW1 again, because for this redundancy session, the active router is GW1 again.

 

 

redundancy protocols HSRP (Hot Standby Router Protocol) trace route site2 to site1 cisco

 Trace Route From Router Y (HSRP)

 

When we administratively shutdown the fastethernet 0/0 interface of GW1 for test, we see that GW2 become active by a console message and after that when we check the status, we see that it is active like below.

 

 

redundancy protocols HSRP (Hot Standby Router Protocol) show standby on new active router cisco

 Show Standby On New Active Router (HSRP)

 

Lastly, when we start traceroute from Site1 to Site2 then we realize that the traffic is no longer go through GW1, but it is going through GW2.

 

Beside this basic Cisco HSRP Configuration commands, we can also use the below command while configuring the redundancy with HSRP.

 

We use “preempt” command above but it is necessary to tell about something about this command. This command is used to force a router that has higher friority become active router. By default if a higher priority router come online, it does not become active if the preempt command is not used on it.

 

Another important point is “delay” command. It is use to mention the waiting time before becoming active router.

 


Router(config-if)# stanby 1 preempt delay 10

 

You can also do HSRP hello and hold timers configuration with the below command.

 


Router(config-if)# stanby 1 timers 4 12

 

By default HSRP Hello packets are sent to the multicast address 224.0.0.2 over UDP port 1985.

 

There can be multiple HSRP virtual ip addresses.

 


Router(config-if)# stanby 1 ip 192.168.1.5
Router(config-if)# stanby 1 ip 192.168.1.6 secondary

 

HSRP Group is also assigned a “virtual MAC address”. For HSRP Group 8, the value is 0000.0c07.ac08.

 


Router(config-if)# stanby 1 mac-address 0001.0023.0456

 

For authentication, all the HSRP group must be configured with the same password.

 


Router(config-if)# stanby 1 authentication CISCO

 

Lastly I want to refer one point, “tracking”. During HSRP usage, there can be a problem on an interface that is critical for the connection. This interface can be other than the interface that provide standby-active routers’ connection. So, a link down in this interface can not be realize by stanby router. To overcome this issues, HSRP use “track” command that provide decreasing the priority of the router even if a specified interface become down. With this decrease, the active router is changed.

 


Router(config-if)# stanby 1 track fa0/1 50

 


All First Hop Redundancy Lessons:

What is FHRP (First Hop Redundancy Protocol)? | HSRP vs VRRP vs GLBP

What is HSRP (Hot Standby Router Protocol)?

What is VRRP (Virtual Router Redundancy Protocol)?

What is GLBP (Gateway Load Balancing Protocol)?

Cisco HSRP Configuration Example

HSRP Configuration with GNS3

Cisco VRRP Configuration Example

Cisco GLBP Configuraton Example


 

Lesson tags: Redundancy, hsrp, Cisco HSRP, HSRP Configuration
Back to: CCNA 200-301 v1.1 > First Hop Redundancy

Leave a Reply

Your email address will not be published. Required fields are marked *

CCNA 200-301 v1.1

Collapse
Expand