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 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#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
S-A(config-if)#no shut
S-A(config-if)#standby 1 ip
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)#interface vlan 70
S-B(config-if)#ip address
S-B(config-if)#no shut
S-B(config-if)#standby 1 ip
Building configuration...
R-C configuration

R-C#vlan database
R-C(vlan)#vlan 70
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 netmask
root@box:$ Route add default gw eth0

  1.  Telnet for qemu1, 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 which is S-B. Result: Telnet login into S-A.
  2. Now to verify that standby device become active on fail-over stop the S-A and after 30s telnet you should be in S-B.
Useful link: VRRP configuration on GNS3