Key differences between HSRP v1 &v2
HSRP v1 & v2 share a lot of similarities, like the core functions of HSRP, but HSRP v2 brings some protocol improvements you need to be aware as a network engeneer :
- Millisecond timer values, which were not advertised by HSRP v1. In HSRP v2,the value is adverdised to make sure that the timer configuration is consistent accross the members of a standby group.
- Group numbers range, which has been increaed to 4096 groups (0 to 4095) in HSRP v2.
- Multicast address : HSRP v1 uses 224.0.0.2 whereas HSRP v2 now uses 224.0.0.102. The multicast address has been changed because of a conflict with CGMP (Cisco Group Management Protocol) which helps to direct multicast traffic but also uses 224.0.0.2 multicast address
HSRP configuration in Cisco Packet Tracer 8.2
HSRP feature has been introduced in Packet Tracer 6.0. This protocol can be configured on every Cisco router available in Packet Tracer as well as on Cisco Catalyst 3560 layer 3 switch. HSRP preemption and interface tracking are supported in Packet Tracer 8.2
The following IOS commands are available :
- standby <0-4095> ip : Enable HSRP and set the virtual IP address
- standby <0-4095> preempt : Overthrow lower priority Active routers
- standby <0-4095> priority :Priority level
- standby <0-4095> timers :Hello and hold timers
- standby <0-4095> track :Priority Tracking
- standby version <1-2> :HSRP version
HSRP configuration using Cisco 2911 ISR routers
Lab network topology
Two subnets are configured for this tutorial :
- Subnet 192.168.1.0/24
- Router0 : 192.168.1.2 (GigabitEthernet 0/0)
- Router1 : 192.168.1.3 (GigabitEthernet 0/0)
- Subnet 192.168.2.0/24
- Router0 : 192.168.2.2 (GigabitEthernet 0/1)
- Router1 : 192.168.2.3 (GigabitEthernet 0/1)
Two HSRP groups are configured in the ISR routers :
- HSRP Group 1 :
- IP address : 192.168.1.1
- Router0 with priority 120 (preemption enabled)
- Router1 with HSRP default priority (100)
- HSRP Group 2 :
- IP address : 192.168.2.1
- Router0 with priority 120 (preemption enabled)
- Router1 with HSRP default priority (100)
HSRP configuration of the two ISR routers
Router0 configuration | Router1 configuration |
interface GigabitEthernet0/0 ip address 192.168.1.2 255.255.255.0 duplex auto speed auto standby version 2 standby 1 ip 192.168.1.1 standby 1 priority 120 standby 1 preempt ! interface GigabitEthernet0/1 ip address 192.168.2.2 255.255.255.0 duplex auto speed auto standby version 2 standby 2 ip 192.168.2.1 standby 2 priority 120 standby 2 preempt | interface GigabitEthernet0/0 ip address 192.168.1.3 255.255.255.0 duplex auto speed auto standby version 2 standby 1 ip 192.168.1.1 ! interface GigabitEthernet0/1 ip address 192.168.2.3 255.255.255.0 duplex auto speed auto standby version 2 standby 2 ip 192.168.2.1 |
Preemption is configured on Router0 using the standby X preempt HSRP commands. This router will always assume HSRP active state when it's online and if it has the highest HSRP priority in the network. The same configuration without the standby x priority 120 configuration on Router0 does not work and Router1 assumes the active state because it has a higher IP address configured.
Testing the HSRP configuration
Router0 is active for both HSRP groups. Both routers detected each other correctly but the priority seems to be wrong (Standby router is 192.168.1.3, priority 120 should be Standby router is 192.168.1.3, priority 100 on Router0)
Ping, traceroute and arp commands issued on Laptop0 confirms that the configuration is working. The IP packets are transiting through Router0 (192.168.1.2)
HSRP configuration using Cisco catalyst 3560 and 3650 switches
HSRP can be configured in the same way in Cisco catalyst 3560 and 3650 multilayer switch vlan interfaces using Cisco Packet Tracer.
The standby version command is now emulated in Catalyst layer 3 switches in Cisco Packet Tracer 7.2.1
interface Vlan100
ip address 192.168.1.2 255.255.255.0
standby 1 ip 192.168.1.1
standby 1 preempt
standby version 2
!
interface Vlan200
ip address 192.168.2.2 255.255.255.0
standby 2 ip 192.168.2.1
standby 2 preempt
standby version 2