FHRP - HSRP Multiple Group Optimization

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.

Information About FHRP - Multiple Group Optimization

HSRP Multiple Group Optimization

The configuration of many hundreds of subinterfaces on the same physical interface, with each subinterface having its own HSRP group, can cause the processes of negotiation and maintenance of multiple HSRP groups to have a detrimental impact on network traffic and CPU utilization.

Only one HSRP group is required on a physical interface for the purposes of electing active and standby devices. This group is known as the master group. Other HSRP groups may be created on each subinterface and linked to the master group via the group name. These linked HSRP groups are known as client or slave groups.

The HSRP group state of the client groups follows that of the master group. Client groups do not participate in any sort of device election mechanism.

Client groups send periodic messages in order to refresh their virtual MAC addresses in switches and learning bridges. The refresh message may be sent at a much lower frequency compared with the protocol election messages sent by the master group.

How to configure FHRP - Multiple Group Optimization

Configuring Multiple HSRP Groups for Load Balancing

Perform this task to configure multiple HSRP groups for load balancing.

Multiple HSRP groups enable redundancy and load-sharing within networks and allow redundant devices to be more fully utilized. A device actively forwarding traffic for one HSRP group can be in standby or in the listen state for another group.

If two devices are used, then Device A would be configured as active for group 1 and standby for group 2. Device B would be standby for group 1 and active for group 2. Fifty percent of the hosts on the LAN would be configured with the virtual IP address of group 1 and the remaining hosts would be configured with the virtual IP address of group 2. See the Example: Multiple HSRP for Load Balancing section for a diagram and configuration example.

SUMMARY STEPS

    1.    enable

    2.    configure terminal

    3.    interface type number

    4.    ip address ip-address mask [secondary]

    5.    standby [group-number] priority priority

    6.    standby [group-number] preempt [delay {minimum | reload | sync} delay]

    7.    standby [group-number] ip [ip-address] secondary]

    8.    On the same device, repeat Steps 5 through 7 to configure the device attributes for different standby groups.

    9.    exit

    10.    Repeat Steps 3 through 9 on another device.


DETAILED STEPS
     Command or ActionPurpose
    Step 1 enable


    Example:
    Device> enable
     

    Enables privileged EXEC mode.

    • Enter your password if prompted.

     
    Step 2 configure terminal


    Example:
    Device# configure terminal
     

    Enters global configuration mode.

     
    Step 3 interface type number


    Example:
    Device(config)# interface GigabitEthernet 0/0/0
     

    Configures an interface type and enters interface configuration mode.

     
    Step 4 ip address ip-address mask [secondary]


    Example:
    Device(config-if)# ip address 10.0.0.1 255.255.255.0
     

    Specifies a primary or secondary IP address for an interface.

     
    Step 5 standby [group-number] priority priority


    Example:
    Device(config-if)# standby 1 priority 110
     

    Configures HSRP priority.

     
    Step 6 standby [group-number] preempt [delay {minimum | reload | sync} delay]


    Example:
    Device(config-if)# standby 1 preempt 
     

    Configures HSRP preemption.

     
    Step 7 standby [group-number] ip [ip-address] secondary]


    Example:
    Device(config-if)# standby 1 ip 10.0.0.3
     

    Activates HSRP.

     
    Step 8 On the same device, repeat Steps 5 through 7 to configure the device attributes for different standby groups.  

    For example, Device A can be configured as an active device for group 1 and be configured as an active or standby device for another HSRP group with different priority and preemption values.

     
    Step 9 exit


    Example:
    Device(config-if)# exit
     

    Exits to global configuration mode.

     
    Step 10 Repeat Steps 3 through 9 on another device.  

    Configures multiple HSRP and enables load balancing on another device.

     

    Improving CPU and Network Performance with HSRP Multiple Group Optimization

    Perform this task to configure multiple HSRP client groups.

    The standby follow command configures an HSRP group to become a slave of another HSRP group.

    HSRP client groups follow the master HSRP with a slight, random delay so that all client groups do not change at the same time.

    Use the standby mac-refresh seconds command to directly change the HSRP client group refresh interval. The default interval is 10 seconds and can be configured to as much as 255 seconds.


    Note


    • Client or slave groups must be on the same physical interface as the master group.
    • A client group takes its state from the group it is following. Therefore, the client group does not use its timer, priority, or preemption settings. A warning is displayed if these settings are configured on a client group:
    Device(config-if)# standby 1 priority 110
    %Warning: This setting has no effect while following another group.
    Device(config-if)# standby 1 timers 5 15
        % Warning: This setting has no effect while following another group.
    Device(config-if)# standby 1 preempt delay minimum 300
        % Warning: This setting has no effect while following another group.

    Before You Begin

    Configure the HSRP master group using the steps in the Configuring Multiple HSRP Groups for Load Balancing section.

    SUMMARY STEPS

      1.    enable

      2.    configure terminal

      3.    interface type number

      4.    ip address ip-address mask [secondary]

      5.    standby mac-refresh seconds

      6.    standby group-number follow group-name

      7.    exit

      8.    Repeat Steps 3 through 6 to configure additional HSRP client groups.


    DETAILED STEPS
       Command or ActionPurpose
      Step 1 enable


      Example:
      Device> enable
       

      Enables privileged EXEC mode.

      • Enter your password if prompted.

       
      Step 2 configure terminal


      Example:
      Device# configure terminal
       

      Enters global configuration mode.

       
      Step 3 interface type number


      Example:
      Device(config)# interface GigabitEthernet 0/0/0
       

      Configures an interface type and enters interface configuration mode.

       
      Step 4 ip address ip-address mask [secondary]


      Example:
      Device(config-if)# ip address 10.0.0.1 255.255.255.0
       

      Specifies a primary or secondary IP address for an interface.

       
      Step 5 standby mac-refresh seconds


      Example:
      Device(config-if)# standby mac-refresh 30
       

      Configures the HSRP client group refresh interval.

       
      Step 6 standby group-number follow group-name


      Example:
      Device(config-if)# standby 1 follow HSRP1
       

      Configures an HSRP group as a client group.

       
      Step 7 exit


      Example:
      Device(config-if)# exit
       

      Exits to global configuration mode.

       
      Step 8 Repeat Steps 3 through 6 to configure additional HSRP client groups.  

      Configures multiple HSRP client groups.

       

      Configuration Examples for FHRP - Multiple Group Optimization

      Example: Configuring Multiple HSRP Groups for Load Balancing

      You can use HSRP or multiple HSRP groups when you configure load sharing. In the figure below, half of the clients are configured for Router A, and half of the clients are configured for Router B. Together, the configuration for Routers A and B establish two Hot Standby groups. For group 1, Router A is the default active router because it has the assigned highest priority, and Router B is the standby router. For group 2, Router B is the default active router because it has the assigned highest priority, and Router A is the standby router. During normal operation, the two routers share the IP traffic load. When either router becomes unavailable, the other router becomes active and assumes the packet-transfer functions of the router that is unavailable. The standby preempt interface configuration command is necessary so that if a router goes down and then comes back up, preemption occurs and restores load sharing.

      Figure 1. HSRP Load Sharing Example

      The following example shows Router A configured as the active router for group 1 with a priority of 110 and Router B configured as the active router for group 2 with a priority of 110. The default priority level is 100. Group 1 uses a virtual IP address of 10.0.0.3 and Group 2 uses a virtual IP address of 10.0.0.4.

      Router A Configuration

      Router(config)# hostname RouterA
      !
      Router(config)# interface GigabitEthernet 0/0/0
      Router(config-if)# ip address 10.0.0.1 255.255.255.0
      Router(config-if)# standby 1 priority 110
      Router(config-if)# standby 1 preempt
      Router(config-if)# standby 1 ip 10.0.0.3
      Router(config-if)# standby 2 preempt
      Router(config-if)# standby 2 ip 10.0.0.4
      

      Router B Configuration

      Router(config)# hostname RouterB
      !
      Router(config)# interface GigabitEthernet 0/0/0
      Router(config-if)# ip address 10.0.0.2 255.255.255.0
      Router(config-if)# standby 1 preempt
      Router(config-if)# standby 1 ip 10.0.0.3
      Router(config-if)# standby 2 priority 110
      Router(config-if)# standby 2 preempt
      Router(config-if)# standby 2 ip 10.0.0.4
      

      Example: Improving CPU and Network Performance with HSRP Multiple Group Optimization

      The following example shows how to configure an HSRP client and master group:

      Device(config)# interface GigabitEthernet 0/0/0
      Device(config-if)# no shutdown
      Device(config-if)# standby mac-refresh 30  
      ! Client Hello message interval
      !
      Device(config)# interface GigabitEthernet 0/0/1
      Device(config-if)# no shutdown
      Device(config-if)# ip vrf forwarding VRF2
      Device(config-if)# ip address 10.0.0.100 255.255.0.0
      Device(config-if)# standby 1 ip 10.0.0.254
      Device(config-if)# standby 1 priority 110
      Device(config-if)# standby 1 preempt
      Device(config-if)# standby 1 name HSRP1   
      !Server group
      !
      Device(config)# interface GigabitEthernet 0/0/2
      Device(config-if)# no shutdown
      Device(config-if)# ip vrf forwarding VRF3
      Device(config-if)# ip address 10.0.0.100 255.255.0.0
      Device(config-if)# standby 2 ip 10.0.0.254
      Device(config-if)# standby 2 follow HSRP1   
      ! Client group
      !
      Device(config)# interface GigabitEthernet 0/0/3
      Device(config-if)# no shutdown
      Device(config-if)# ip vrf forwarding VRF4
      Device(config-if)# ip address 10.0.0.100 255.255.0.0
      Device(config-if)# standby 2 ip 10.0.0.254
      Device(config-if)# standby 2 follow HSRP1   
      ! Client group

      Additional References

      Related Documents

      Related Topic

      Document Title

      Cisco IOS commands

      Cisco IOS Master Commands List, All Releases

      HSRP commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples

      Cisco IOS First Hop redundancy Protocols Command Reference

      HSRP for IPv6

      “HSRP for IPv6” module

      Troubleshooting HSRP

      Hot Standby Router Protocol: Frequently Asked Questions

      Standards

      Standards

      Title

      No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.

      --

      MIBs

      MIBs

      MIBs Link

      CISCO-HSRP-MIB CISCO-HSRP-EXT-MIB

      To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL:

      http:/​/​www.cisco.com/​go/​mibs

      RFCs

      RFCs

      Title

      RFC 792

      Internet Control Message Protocol

      RFC 1828

      IP Authentication Using Keyed MD5

      RFC 2281

      Cisco Hot Standby Router Protocol

      Technical Assistance

      Description

      Link

      The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

      http:/​/​www.cisco.com/​cisco/​web/​support/​index.html

      Feature Information for FHRP - HSRP Multiple Group Optimization

      The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

      Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.
      Table 1 Feature Information for FHRP—HSRP Multiple Group Optimization

      Feature Name

      Releases

      Feature Information

      FHRP—HSRP Multiple Group Optimization

      12.4(6)T

      12.2(33)SRB

      12.2(33)SXI

      12.2(50)SY

      15.0(1)S

      15.0(1)SY

      Cisco IOS XE Release 2.1

      FHRP—HSRP Multiple Group Optimization feature improves the negotiation and maintenance of multiple HSRP groups configured on a subinterface. Only one HSRP group is required on a physical interface for the purposes of electing active and standby devices. This group is known as the master group. Other HSRP groups may be created on each subinterface and linked to the master group via the group name. These linked HSRP groups are known as client or slave groups.

      The following commands were introduced or modified by this feature: standby follow, show standby.