Virtual Router Redundancy Protocol (VRRP) is very similar to HSRP and can create a virtual gateway but the difference that it is not the Cisco Proprietary Protocol.
It is a standard protocol defined by the IETF in RFC 3768. If you learn and understood HSRP then it is very easy for you to understand the Virtual Router Redundancy Protocol (VRRP).
The Virtual Router Redundancy Protocol (VRRP) is an election protocol that dynamically assigns responsibility for one or more virtual routers to the VRRP routers on a LAN and elects the role of the router.
Virtual Router Redundancy Protocol (VRRP) allows several routers on a multi-access link to utilize the same virtual IP address. In a VRRP configuration, one router is elected as the virtual router master and other routers acting as backups in case the virtual router master fails.
As in the previous two articles, Router2 and Router3 are neighbouring to the LAN segment. We will use the same topology for the Virtual Router Redundancy Protocol (VRRP) configuration. Router2 will be the master router and Router3 role is the backup router.
In the above topology, we are using two Cisco routers for VRRP. We have been tasked to configure VRRP. The IP addresses, routing and other pre-requisite have done. This is important to know that each device participating in the VRRP process also needs to be in the same broadcast domain and also requires a unique IP address on the interface or VLAN where you are configuring VRRP. Let’s go-ahead to the configuration and add the VRRP configuration.
When we type vrrp in the command prompt we are stating to the router that we are configuring vrrp on this interface, the number next to it is the VRRP group we are configuring, the range of the group is from 1 to 254.
The groups required to be matched on all equipment participating in the VRRP election process, and the last part of the configuration we are stating what the floating IP address is. We have added the group 1 to configuration.
We have set the priority of both routers. Router2 is configured with higher value, so this will be a master router. If Router2 fails, the Router3 will become master. The preemption is enabled, so whenever Router2 recover from failure, it will again become a master router.
HSRP is a Cisco-proprietary First Hop Redundancy Protocol (FHRP) planned to allow for transparent failover of a first-hop IPv4 device. It allows configuring two or more routers as standby routers and only a single router as an active router at a time which ensure high network availability by providing first-hop routing redundancy for IPv4 hosts on networks configured with an IPv4 default gateway address.
All the routers in a single HSRP group share a single MAC address and IP address, which acts a default gateway to the local network. It selects an active router as well as a standby router in the group.
The active router responsible for forwarding traffic to the network and sends the hello packet to the standby router. If it fails and the Standby router doesn’t receive a hello packet for three specific times, it takes up all the responsibilities of the active router and forwards the traffic.
The HSRP configuration can be complicated at times, so this article will cover the basic points step by step. Now, look at the topology in the figure below.
Basic HSRP Configuration
The above topology contains two HSRP routers (Router2 and Router3) both can act as the default gateway for the network 192.168.10.0/24 network. At a particular time, only one of these routers will be active with a virtual IP address of 192.168.10.1.
So, virtual IP 192.168.10.1 will be configured as the default gateway for all devices on the network 192.168.10.0/24. So let’s configure the Router1 and Router2 as HRSP router. The following configuration is enough for achieving basic HSRP configuration, the configuration on Router2 is as follow:
Standby 1, 1 is the HSRP group number. This group number can be any number between 0 and 255 in HSRP version 1 and the only requirement is that you must use the same number across devices in the same HSRP group. So now we can verify the HSRP configuration using the “show standby” command.
The two figures below illustrate the output of the show standby command on Router2 and Router3. You can see the virtual IP address 192.168.10.1 on both router HSRP configuration, which is the default gateway for all the hosts in the network 192.168.10.0/24. You can also see the virtual MAC address for the virtual router.
You can see that Router3 is in the Active state while Router2 is in the standby state. Currently, we have not configured the priority, and both routers are configured with default priority 100.
So, with the same priority, the router with the highest IP address will be elected as the active router. However, we can control the configuration of the active router by configuring the priority that will be also discussed in this article.
Now the entire host will be configured with the default gateway address 192.168.10.1 and the Router3 which is currently active will receive traffic destined for the address 192.168.10.1. We have not advertised the network 192.168.10.0/24 in any routing protocol because Routes are not replicated between HSRP routers.
This means that Router1 and Router2 must individually know how to reach the 172.31.10.1 network used in our example. We have configured the default route on both routers to reach the 172.16.10.0/24 network, suppose it is the internet server, or it is your ISP. So, now if router3 is failed for any reason Router2 will start act as the active router.
HSRP Priority Configuration
HSRP the priority value can control the Active Router election. We can change the default priority value which is 100. For example, what if we wanted Router2 to be the Active router instead of Router3? To force a particular router to be the active router in an HSRP group you will need to use the priority command.
The higher priority determines the active router. If both routers are set to the same priority, the first router to come up will be the active router otherwise router with the highest IP address will be active. Let’s configure the Router priority higher then Router3, so Router2 will ever active when it is power up.
Router2>enable
Router2#config terminal
Router2(config)# interface gigabitEthernet 0/1
Router2(config-if)#standby 1 priority 110
Router2(config-if)#exit
Router2(config)#do wr
We have changed and increased the priority value of the Router2 but, it will remain in the standby mode because preemption is disabled.
HSRP Preempt
If Rouer3 fails, Router2 will become active as we have seen. But, if Router3 restores and returns to service, Router2 will continue to stay active. There are times when you may always want Router3 to be in an active state in the HSRP group.
In our case, we want Router2 as an active router ever for which we increase the priority of the HRSP on the Router2. But it not changes into active mode.
Cisco provides a method for users to control this by using the preempt command. Preempt to ensure a router to be active after recovering from a failure.
So we want Router2 to take over the active function when it recovers from a failure, we can change our configuration on Router2 to include the standby 1 preempt command.
Router2>enable
Router2#config terminal
Router2(config)# interface gigabitEthernet 0/1
Router2(config-if)#standby 1 preempt
Router2(config-if)#
%HSRP-6-STATECHANGE: GigabitEthernet0/1 Grp 1 state Standby -> Active
Router2(config-if)#exit
Router2(config)#do wr
Advanced HSRP Configuration – Load Balancing
Load Balancing is an important aspect of any network. In the above topology, one router will ever standby. This is not a good practice.
To solve this problem, we can configure HSRP load balancing between routers. The load balancing is not possible in the single HSRP group, but for multiple HSRP groups, we can extend the load and have each HSRP group be active on different routers.
For our example, let’s add Laptop0 and Laptop1 to another group (Group-2). Router2 will be active for Group1 while Router3 will be active for Group2. This means that R2 will be standby for Group2 while Router3 will be standby for Group1. The HRSP load balancing configuration is following for both routers.
The full configuration on Router2 is as follows:
Router2>enable
Router2#config terminal
Router2(config)# interface gigabitEthernet 0/1
Router2(config-if)# ip address 192.168.10.2 255.255.255.0
Router2(config-if)# standby 1 ip 192.168.10.1
Router2(config-if)#standby 1 priority 110
Router2(config-if)#standby 1 preempt
Router2(config-if)#standby 1 name Group1
Router2(config-if)#standby 2 ip 192.168.1.250
Router2(config-if)#standby 2 name Group2
Router2(config-if)#exit
Router2(config-)#exit
Router2#wr
The full configuration on Router3 is as follows:
Router3>enable
Router3#config terminal
Router3(config)# interface gigabitEthernet 0/1
Router3(config-if)# ip address 192.168.10.3 255.255.255.0
Router3(config-if)# standby 1 ip 192.168.10.1
Router3(config-if)#standby 1 name Group1
Router3(config-if)#standby 2 ip 192.168.1.250
Router3(config-if)#standby 2 priority 110
Router3(config-if)#standby 2 preempt
Router3(config-if)#standby 2 name Group2
Router3(config-if)#exit
Router3(config-)#exit
Router3#wr
This configuration allows and puts both routers in working mode. We have also configured the HSRP group name to help better describe each HSRP group. This is helpful in the case of many HSRP groups.
To test this configuration, we can use the traceroute command to 172.16.10.1 from both Groups. Remember that Laptop0 and Laptop1 are in Group2 and the default gateway for these hosts is 192.168.10.250 and the other two hosts on Group1 use the previous Default Gateway 192.168.10.1.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.