Hot Standby Router Protocol HSRP configuration on GNS3:

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.  



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:$ Route add default gw 10.1.1.2 eth0

 Verification:
  1.  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.
  2. 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.
Useful link: VRRP configuration on GNS3
Thanks...
UA-23728446-1