Você está na página 1de 2

IOS Configuration: HSRP

Contents The Basics Basic Configuration Enabling HSRP Popular Tweaks

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 Router(config-if)#standby 150 ip 192.0.2.150

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. Router(config-if)#standby 1 priority 110 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. Router(config-if)#standby 1 authentication PASSWORD 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. Router(config-if)#standby 1 track s0/0 15 To track a track object that you've already defined and decrement 20 if it fails, you can do this.

http://packetlife.net/wiki/ios-configuration-hsrp/

Page 1

Router(config-if)#standby 1 track 100 decrement 20 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. Router(config-if)#standby 1 name GATEWAY

http://packetlife.net/wiki/ios-configuration-hsrp/

Page 2

Você também pode gostar