HSRP is a Cisco proprietary redundancy protocol. The protocol establishes a framework between network devices in order to achieve default gateway fail-over if the primary gateway should become inaccessible. In HSRP only one device is active as a gateway while other is in standby state. If the active gateway goes down then other standby device take over. This can be useful for dual branch routers each with a single serial link back to the head end.
For HSRP configuration in gns3 I use a simple topology of three switches. For all switch i use the 3640 router IOS with NM-16ESW module(use a switch in gns3). Switch S-A and S-B are belong to HSRP standby group 1 with IP 10.1.1.10. In HSRP one device is active as a gateway for access devices while other is in standby. The device which have high HSRP priority become active, by default all devices have priority of 100. In our topology I have set a high priority for S-A therefore it is active. Standby group 1 is responsible for changing status of devices as active and standby.
Thanks...
For HSRP configuration in gns3 I use a simple topology of three switches. For all switch i use the 3640 router IOS with NM-16ESW module(use a switch in gns3). Switch S-A and S-B are belong to HSRP standby group 1 with IP 10.1.1.10. In HSRP one device is active as a gateway for access devices while other is in standby. The device which have high HSRP priority become active, by default all devices have priority of 100. In our topology I have set a high priority for S-A therefore it is active. Standby group 1 is responsible for changing status of devices as active and standby.
Switch S-A-configuration:
S-A>en
S-A#configure t
S-A(config)#line vty 0 4
S-A(config-line)#password cisco
S-A(config)#int f0/0
S-A(config-if)#switchport mode trunk
S-A(config)#interface vlan 70
S-A(config-if)#ip address 10.1.1.1 255.255.255.0
S-A(config-if)#no shut
S-A(config-if)#standby 1 ip 10.1.1.10
S-A(config-if)#standby 1 priority 150
Switch S-B-configuration:
S-B(config)#line vty 0 4
S-B(config-line)#password cisco
S-B(config)#int f0/0
S-B(config-if)#switchport mode trunk
S-B(config-if)#no shu
S-B(config)#int f0/1
S-B(config-if)#switchport mode trunk
S-B(config-if)#switchport mode trunk
S-B(config-if)#ex
S-B(config)#interface vlan 70
S-B(config-if)#ip address 10.1.1.2 255.255.255.0
S-B(config-if)#no shut
S-B(config-if)#standby 1 ip 10.1.1.10
S-B#wr
Building configuration...
[OK]
R-C configuration
R-C#vlan database
R-C(vlan)#vlan 70
R-C(vlan)#exit
R-C#config t
R-C(config)#int f0/0
R-C(config-if-range)#switchport access vlan 70
R-C(config-if-range)#switchport mode access
R-C(config)#int f0/2
R-C(config-if-range)#switchport mode trunk
R-C(config)#int f0/3
R-C(config-if-range)#switchport mode trunk
Qemu1 Configuration
tc@box:$ sudo su
root@box:$ Ifconfig eth0 10.1.1.200 netmask 255.255.255.0
root@box:$ Ifconfig eth0 10.1.1.200 netmask 255.255.255.0
root@box:$ Route add default gw 10.1.1.2 eth0
Verification:
- Telnet 10.1.1.10 for qemu1, 10.1.1.10 is standby group 1 IP address and is belong to active device. Since S-A have high priority therefore S-A is gateway for qemu1 even we hard coded qemu1 GW 10.1.1.2 which is S-B. Result: Telnet 10.1.1.10 login into S-A.
- Now to verify that standby device become active on fail-over stop the S-A and after 30s telnet 10.1.1.10 you should be in S-B.
Thanks...
May I know the IOS version and sw / router module that is being used in order to configure VRRP and HSRP ? So far I am not able to use "standby" command and "vrrp" commands. I used "c3640-jk9o3s-mz.124-16a" IOS and using "NM-16ESW" , "NM-1FE-TX". But still cannot use "standby" and "vrrp"commands. Pls. advise.
ReplyDeletehello,
Deleteyou cannot configure HSRP on serial interface...
thanks ... i followed your lab and it works... great help to learn hsrp. Keep up the good work
ReplyDeleteThx mite. Usefull.
ReplyDeleteNow we can fire the world.
I cant ping the routers neither from the switch or the PC...
ReplyDeletecan u ping from router to switches???
Deletethanks it is solved some missing config
Deletewhat was your missing config i have the same issue
DeleteCharan : Great help ...Thanks
ReplyDeleteThanks, Great!!
ReplyDeleteI have one Router 3700 and two SW L3, I use three vlan 20, 30, 40 then how's configuration HSRP??? Thanks
ReplyDeleteL3 SW -----
|Router 3700
L3 SW------|
yeah u can ping switches from ur router , give ip address to switch on interface vlan 70 in same subnet .
ReplyDeleteThis page awesome thank you
ReplyDeleteThanks Awesome page
ReplyDeletepls help me!
ReplyDeleteBefore rebooting L3 Switch, HSRP is working well and then i saved config files . After rebooting switches , HSRP was not running at all.Why???
here is a complete config
ReplyDeletehostname S-A
vlan database
vlan 70
interface FastEthernet0/0
switchport trunk native vlan 70
switchport mode trunk
no ip address
!
interface FastEthernet0/1
switchport trunk native vlan 70
switchport mode trunk
no ip address
!
!
interface Vlan70
ip address 10.1.1.1 255.255.255.0
standby 1 ip 10.1.1.10
standby 1 priority 150
hostname S-B
vlan database
vlan 70
interface FastEthernet0/0
switchport trunk native vlan 70
switchport mode trunk
no ip address
!
interface FastEthernet0/1
switchport trunk native vlan 70
switchport mode trunk
no ip address
!
!
interface Vlan70
ip address 10.1.1.2 255.255.255.0
standby 1 ip 10.1.1.10
standby 1 priority 150
hostname S-C
!
vlan database
vlan 70
!
interface FastEthernet0/0
switchport access vlan 70
no ip address
!
interface FastEthernet0/2
switchport trunk native vlan 70
switchport mode trunk
no ip address
!
interface FastEthernet0/3
switchport trunk native vlan 70
switchport mode trunk
no ip address
useful post thanks
ReplyDelete