Tuesday, May 7, 2013

Configuring HSRP in Cisco 6500 Switches


Configuring HSRP in Cisco 6500 Switches

Here is a sample configuration for HSRP in Cisco 6500 Series switches for high availability and for VLAN redundancy.

In this example we have two Cisco 6513 Switches with SUP 720 with IOS 12.2.17d- SXB11. Switch A is active state of HSRP and Switch B is in standby state. A VLAN created VLAN 101. The group IP address is 10.2.0.1, 10.2.0.2 is assigned to Switch A & 10.2.0.3 Switch B.

For Switch 1
1) Create VLAN 100 & assign the IP address
2) Configure the standby IP address.
3) Configure standby preempt. (With preempt, Switch 1 will be active switch as long as it’s available.
4) Configure standby timer for HSRP update

For Switch 2
1) Create VLAN 100 & assign the IP address
2) Configure the standby IP address.
3) Configure standby priority less than 100.( In this case 50)
4) Configure standby timer for HSRP update

Now let’s look at the configuration

Switch01#sho run interface vlan 101
Building configuration...
Current configuration : 255 bytes
interface Vlan101
ip address 10.2.0.2 255.255.254.0
ip helper-address 10.0.1.100
ip helper-address 10.0.1.101
standby 2 ip 10.2.0.1
standby 2 timers 5 15
standby 2 preempt
end
Switch01#

Switch02#sho run interface vlan 101
Building configuration...
Current configuration : 278 bytes
interface Vlan101
ip address 10.2.0.3 255.255.254.0
ip helper-address 10.0.1.100
ip helper-address 10.0.1.101
standby 2 ip 10.2.0.1
standby 2 timers 5 15
standby 2 priority 50
standby 2 preempt
end
Switch02#

You can use the show standby command when in Privileged Mode to check the status of HSRP. This command tells you which Switch is active and which is standby, as well as a number of other statistics.

Switch01#sho standby vlan 101
Vlan101 - Group 2
Local state is Active, priority 100, may preempt
Hellotime 5 sec, holdtime 15 sec
Next hello sent in 0.908
Virtual IP address is 10.2.0.1 configured
Active router is local
Standby router is 10.2.0.3 expires in 12.676
Virtual mac address is 0000.0c07.ac02
2 state changes, last state change 22w0d
IP redundancy name is "hsrp-Vl101-2" (default)
Switch01#

Swicth2#sho standby vlan 101
Vlan101 - Group 2
Local state is Standby, priority 50, may preempt
Hellotime 5 sec, holdtime 15 sec
Next hello sent in 4.185
Virtual IP address is 10.2.0.1 configured
Active router is 10.2.0.2, priority 100 expires in 12.296
Standby router is local
1 state changes, last state change 12w2d
IP redundancy name is "hsrp-Vl101-2" (default)
Swicth2#

On the PC, the default IP address should point to 10.2.0.1 —not either of the Switches. This way, if one of the switches goes down, the other will take over.

HSRP is a valuable tool for ensuring high availability and router redundancy.

No comments: