Saturday, December 6, 2014

Notes: Configuring HSRP

Configuring HSRP on Catalyst 3560 IOS Software Release 12.2(52)SE.

HSRP Versions


HSRPv1 - Version 1 is the default version of HSRP. It has the following features:
  • The HSRP group number range is from 0 to 255.
  • HSRPv1 uses the multicast IP address 224.0.0.2.
  • HSRPv1 and CGMP are mutually exclusive.

HSRPv2 - Version 2 has these features:
  • extends the group number range to 0-4095 (group number can match all VLAN IDs)
  • virtual MAC address from 0000.0C9F.F000 to 0000.0C9F.FFFF
  • uses the multicast IP address 224.0.0.102
  • HSRPv2 and CGMP are not mutually exclusive, both can be enabled at the same time
  • HSRPv2 has different packet format than HSRPv1

Default HSRP Configuration

  • HSRP version: Version 1
  • HSRP groups: None configured
  • Standby group number: 0
  • Standby MAC address: System assigned as 0000.0C07.ACxx, where xx is the HSRP group number
  • Standby priority: 100
  • Standby delay: 0 (no delay)
  • Standby track interface priority: 10
  • Standby Hellotime: 3 seconds
  • Standby Holdtime: 10 seconds

HSRP Configuration Guidelines

  • HSRP for IPv4 and HSRP for IPv6 are mutually exclusive, both cannot be enabled simultaneously.
  • HSRPv1 and HSRPv2 are mutually exclusive. HSRPv2 is not interoperable with HSRPv1 on an interface and the reverse.
  • Support up to 32 instances of HSRP groups.
  • The interface must be a Layer 3 interface, either a router port or an SVI.
  • All Layer 3 interfaces must have IP addresses assigned.
  • Configure only on instance of an FHRP.
  • The HSRP version can be changed from HSRPv2 to HSRPv1 only if the group number is less than 256.
  • For HSRPv2 and HSRP for IPv6, group numbers that are multiples of 256 must be used; valid ranges are 0 to 255, 512 to 767, 3840 to 4095, and so on.
  • If the HSRP version is changed on an interface, each HSRP group resets because it now has a new virtual MAC address.


Enabling HSRP


standby version {1 | 2}
  • (Optional) Configures the HSRP version on the interface.
  • 1 for HSRPv1, 2 for HSRPv2.
  • If not specified, the interface runs HSRPv1 by default.

standby [gp-num] ip [ip-add]
  • (Optional) [gp-num] specifies the group number for which HSRP is enabled.
  • (Optional on all but one interface) [ip-add] sets the virtual IP address for the HSRP group. Must be set on at least one interface, can be learned by other interfaces.

Example
standby version 1
standby 47 ip 10.0.47.1



Configuring HSRP Priority

  • The standby priority, standby preempt, and standby track commands are used to set characteristics for finding the active and standby routers.
  • Assigning a priority allows allows the active and standby routers to be manually defined.
  • If preemption is enabled, the router with the highest priority becomes the active router.
  • If priorities are equal, the current active router does not change.
  • The highest numerical value (1 to 255) represents the highest priority (most likely to become the active router).
  • The priority can change dynamically if an interface is tracked, and the status goes down.
  • By default, the priority is decreased by 10.
  • If an interface is not tracked, its state change does not affect the priority.
  • When multiple tracked interfaces are down, the configured priority decerements are cumulative.
  • If tracked interface were not configured with a decrement priority, the default decrement is 10, and it is non-cumulative.
  • When routing is first enabled for the interface, it does not have a complete routing table. If it is configured to preempt, it becomes the active router, even though it is unable to provide adequate routing services. To solve this problem, configure a delay time to allow the router to update its routing table.

standby [gp-num] priority [value] preempt
  • Sets a priority value used in choosing the active router.
  • (Optional) [value] The range is 1 to 255 (100 by default), the highest number represents the highest priority.
  • (Optional) preempt, so that when the local router has a higher priority than the active router, it assumes control as the active router.

standby [gp-num] track [int-num] [int-prio]
  • Configures an interface to track another interface so that if it goes down, the priority is lowered.
  • [int-num] is the interface identifier of the tracked interface.
  • (Optional) [int-prio] specifies the amount by which the priority is decremented, when the interface goes down (10 by default).

Example
standby 47 priority 150 preempt
standby 47 track GigabitEthernet0/0 60



Configuring HSRP Authentication and Timers

  • The authentication string is sent unencrypted in all HSRP messages.
  • The same authentication string must be configured on all routers.
  • Authentication mismatch prevents a device from learning the virtual IP address, and timer values from other routers.
  • Routers on which timer values are not configured can learn timer values from the active or standby router.
  • The timers configured on an active router always override any other timer settings.
  • All routers in an HSRP group should use the same timer values.
  • Normally, the Holdtime is greater than or equal to 3 times the Hellotime.

standby [gp-num] authentication [string]
  • (Optional) [string] sets the authentication string to be carried in all HSRP messages, up to eight characters in length (the default is cisco).

standby [gp-num] timers [Hello] [Hold]
  • Configures the time between Hello packets and the time before other routers declare the active router to be down.
  • [Hello] sets the Hello interval in seconds, the range is from 1 to 255 (3 by default).
  • [Hold] sets the time in seconds before th active or standby router is declared to be down, the range is from 1 to 255 (10 by default).

Example
standby 47 authentication hsrpstring
standby 47 timers 5 15



Verification


Applied the following configuration.

SW01#
interface Vlan47
 ip address 10.0.47.101 255.255.255.0
 standby version 2
 standby 47 ip 10.0.47.1
 standby 47 priority 150
 standby 47 preempt

SW02#
interface Vlan47
 ip address 10.0.47.102 255.255.255.0
 standby version 2
 standby 47 ip 10.0.47.1



Verying the configuration.

SW01#show standby brief
                     P indicates configured to preempt.
                    
Interface   Grp  Pri P State    Active          Standby         Virtual IP
Vl4         47   150 P Active   local           10.0.47.102     10.0.47.1  

SW02#show standby brief
                     P indicates configured to preempt.
                    
Interface   Grp  Pri P State    Active          Standby         Virtual IP
Vl4         47   100   Standby  10.0.47.101     local           10.0.47.1 


SW01#show standby
Vlan47 - Group 47 (version 2)
  State is Active
    5 state changes, last state change 00:04:48
  Virtual IP address is 10.0.47.1
  Active virtual MAC address is 0000.0C9F.F02F
    Local virtual MAC address is 0000.0C9F.F02F (v2 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.086 secs
  Preemption enabled
  Active router is local
  Standby router is 10.0.47.102
  Priority 150 (configured 150)
  Group name is hsrp-Vl4-47 (default)

SW02#show standby
Vlan47 - Group 47 (version 2)
  State is Standby
    3 state changes, last state change 00:07:06
  Virtual IP address is 10.0.47.1
  Active virtual MAC address is unknown
    Local virtual MAC address is 0000.0C9F.F02F (v2 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.739 secs
  Preemption disabled
  Active router is 10.0.47.101

  Standby router is local
  Priority 100 (default 100)
  Group name is hsrp-Vl4-47 (default)


As a bonus, proof that the HSRPv2 devices are communicating using the multicast IP address 224.0.0.102.

SW01#debug ip packet
IP: s=10.0.47.102 (Vlan47), d=224.0.0.102 len 29, rcvd 2

SW01#
IP: s=10.0.47.101 (local), d=224.0.0.102 (Vlan47), len 29, sending broad/multicast


References

Configuring HSRP

No comments:

Post a Comment