Documente Academic
Documente Profesional
Documente Cultură
Contents
The Basics
HSRP is Cisco's Hot Standby Router Protocol and provides a highly-available virtual IP address for use as a gateway. This virtual IP address is configured on multiple routers, and a silent election is held to determine which router should answer for that IP. This elected router, called the active member, begins answering for that IP address, and, if something should happen to it (like it catches on fire in the rack), the remaining standby members repeat the election.
Basic Configuration
Enabling HSRP
The basic configuration of HSRP is very simple.
Router(config-if)#standby ip 192.0.2.1
You can also add a group number to the configuration if you want to run more than one instance on the same interface. If you don't give a group number, the router will assume you are using group 0.
Router(config-if)#standby 1 ip 192.0.2.1
Popular Tweaks
You can skew the election of the active member by configuring a priority on the standby group. The higher the priority, the more preferred it will be during the election. Valid values are 0 - 255; default is 100.
Even if you change the priority to something high, the router won't take over unless you have preemption enabled.
Router(config-if)#standby 1 preempt
You can "secure" the HSRP group with a authentication password. However, the password is transmitted in plain text and can be captured.
You can have HSRP track objects and decrement priority if that object were to fail. You can track interfaces or tracking objects that have already been defined. You can also dictate how much to decrement the priority; the default decrement value is 10. To track interface Serial0/0 and decrement the priority by 15 if if fails, you can do this.
To track a track object that you've already defined and decrement 20 if it fails, you can do this.
Each standby group has a name that is used to allow technologies like NAT to move around with the HSRP active member. The default name is a combination of interface name and standby group, but you can define one that is more meaningful.
Physical IP Address
10.10.10.252 10.10.10.253
100 denotes the HSRP process number as "hot standby group 100". You can have multiple HSRP standby groups on the same interface. The timers command sets the interval to 3 seconds between HELLO messages, and waits 10 seconds before the other router is declared down.
standby 100 priority 200 preempt
Defines the priority of this router. The highest priority number will win the election. "Preempt" allows the router to take over control even if there is not an election in process if it comes on line with the highest priority.
standby 100 authentication fnord
Optional - Authentication [word] creates an unencrypted authentication process for each HSRP packet.
standby 100 ip 10.10.10.251
Establishes 10.10.10.251 as the virtual interface. This IP address should be the same on both HSRP routers.
standby 100 track fa0/0
Physical IP Address
10.10.10.252 10.10.10.253
100 denotes the HSRP process number as "hot standby group 100". You can have multiple HSRP standby groups on the same interface. The timers command sets the interval to 3 seconds between HELLO messages, and waits 10 seconds before the other router is declared down.
standby 100 priority 200 preempt
Defines the priority of this router. The highest priority number will win the election. "Preempt" allows the router to take over control even if there is not an election in process if it comes on line with the highest priority.
standby 100 authentication fnord
Optional - Authentication [word] creates an unencrypted authentication process for each HSRP packet.
standby 100 ip 10.10.10.251
Establishes 10.10.10.251 as the virtual interface. This IP address should be the same on both HSRP routers.
standby 100 track fa0/0