Even though HSRP seems simple, you need to know a lot about it to pass the CCNP exams. Chris Bryant, CCIE #12933, will teach you how to get started with HSRP.
RFC 2281 says that HSRP is a Cisco-only protocol that puts routers into a HSRP router group. HSRP is considered a high-availability network service, along with dynamic routing protocols and STP, because when the primary path isn't available, all three switch almost immediately to a secondary path.
One of the routers will be chosen as the primary (called "Active" by HSRP), and it will handle routing while the other routers are in "standby," ready to take over if the primary router goes down. In this way, HSRP makes sure that the network is always up, since it doesn't depend on a single router to route IP traffic.
The hosts that use HSRP as a gateway don't know the real IP or MAC addresses of the routers in the group. They are talking to a "virtual router" made by the HSRP configuration, which is called a "pseudorouter." This virtual router will also have a virtual MAC address and virtual IP address.
Even so, the standby routers won't just be sitting there! HSRP load balancing can be done by setting up more than one HSRP group on a single interface.
Before we move on to the more complicated HSRP configuration, we should start with a simple one. Here, we'll use a topology with two routers. Remember that one or both of these routers could also be multilayer switches. So that it's easier to read, I'll just call them "routers."
Both R2 and R3 will be set up to be part of standby group 5. The IP address of the virtual router will be 172.12.23.10 /24. This address should be the default gateway for all hosts in VLAN 100.
#interface ethernet0 R2(config)
R2(config-if)#standby 5 ip 172.12.23.10
#interface ethernet0 R3(config)
R3(config-if)#standby 5 ip 172.12.23.10
The first thing you should do when setting up or troubleshooting HSRP is to run the show standby command. Let's try it out on both routers and see what happens.
R2#standby
Group 5 of Ethernet0
Local state is "Standby," and priority 100
Hello for 3 seconds, hold for 10 seconds.
The next "hello" came in 0.776
The virtual IP address is set to 172.12.23.10.
The active router is 172.12.23.3, and priority 100 will end in 9.568 seconds.
Local standby router
1 changes of state, and the last one was at 00:00:22.
R3 standby show
Group 5 of Ethernet0
Local state is Active, and priority 100
Hello for 3 seconds, hold for 10 seconds.
The next greeting came in 2.592
The virtual IP address is set to 172.12.23.10.
The local active router is
Standby router's IP address is 172.12.23.2, and it will expire in 8.020.
Virtual mac address is 0000.0c07.ac05
2 changes of state, the last one at 00:02:08
We can see that R3 has been chosen as the Active router ("local state is Active"). The IP address of the virtual router is 172.12.23.10, and R2 is the standby router.
Some HSRP values will need to be changed every now and then. What if we'd rather have R2 be the Active router? Can we change the virtual router's MAC address? In the next part of this HSRP tutorial, I'll explain how to do those things.