Guest

IP Application Services

Load Sharing with HSRP

Cisco - Load Sharing with HSRP

Document ID: 13781

Updated: Aug 10, 2005

   Print

Introduction

This document gives an example of how to configure Hot Standby Router Protocol (HSRP) in order to take advantage of multiple paths to a given destination.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

This document is not restricted to specific software and hardware versions.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Background Theory

HSRP is often used to improve resiliency in networks, but this can cause a decrease in network efficiency. The example in this document has two paths from the host network to the server network. For redundancy, HSRP runs between R1 and R2, either of which can become the active router and take "ownership" of the HSRP virtual IP address. The second router becomes the standby router, and only becomes the active router if the current active router goes down. For more information about active and standby routers, refer to How to Use the standby preempt and standby track Commands.

The hosts' default gateway address is assigned as their HSRP virtual IP address. When the hosts need to send packets to the server network, they send them to their default gateway, or to whichever router is active. Because only one router is active, packets from the hosts to the servers traverse only one of the two available paths.

Note: Dependent upon on how you configure R3, packets that return from the servers to the hosts might or might not utilize both return paths. Also, packets that return from the servers to the hosts do not need to go through the active router.

In order to utilize both paths from the host network to the server network, you can configure Multigroup HSRP (MHSRP) between R1 and R2. Essentially, R1 is configured with two HSRP groups (for example, group 1 and group 2) and R2 is also configured with the same HSRP groups. For group 1, R1 is the active router and R2 is the standby router. For group 2, R2 is the active router and R1 is the standby router. Then you configure half of the hosts' default gateways with the HSRP group 1 virtual IP address, and the other half of the hosts' default gateways with the HSRP group 2 virtual IP address.

Conventions

Refer to Cisco Technical Tips Conventions for more information on document conventions.

Configure

In this section, you are presented with the information to configure the features described in this document.

Note: Use the Command Lookup Tool (registered customers only) to find more information on the commands used in this document.

Network Diagram

This document uses this network setup:

7a.gif

Configurations

This document uses these configurations:

R1 MHSRP Configuration
Current configuration:

interface Ethernet0
        ip address 171.16.6.5 255.255.255.0

        standby 1 preempt
        standby 1 ip 171.16.6.100
        standby 1 track Serial0
        standby 2 preempt
        standby 2 ip 171.16.6.200
        standby 2 track serial 0
        standby 2 priority 95

R2 MHSRP Configuration
Current configuration:

interface Ethernet0
       ip address 171.16.6.6 255.255.255.0
       standby 1 preempt
       standby 1 ip 171.16.6.100
       standby 1 track Serial0
       standby 1 priority 95
       standby 2 preempt
       standby 2 ip 171.16.6.200
       standby 2 track serial 0

Notice from the configurations that when the two routers first begin to run HSRP, R1 has a default priority of 100 for group 1 and a priority of 95 for group 2. R2 has a default priority of 100 for group 2 and a priority of 95 for group 1. Therefore, R1 is the active router for group 1 and R2 is the active router for group 2. This example shows that you can accomplish load-sharing with MHSRP. However, you need to use HSRP priority and preempt in order to accomplish this. HSRP has no effect on return traffic. The path taken by the return traffic depends on the routing protocol configured on the router.

Note: When the standby priority value and standby preempt commands are configured, it is mandatory to explicitly mention the group number. If not mentioned, then the value is 0 by default. The default group number is 0.

Important Note

Several Ethernet (Lance and QUICC) controllers in low-end products can only have a single unicast Media Access Control (MAC) address in their address filter. These platforms only permit a single HSRP group, and they change the interface address to the HSRP virtual MAC address when the group becomes active. Load sharing on platforms with this limitation is not possible with HSRP. The use-bia command was introduced to work around issues that occur when you run HSRP on the low-end products as mentioned. For example, if you run HSRP and DECnet on the same interfaces, problems occur because DECnet and HSRP try to modify the MAC address. With the use-bia command, you can configure HSRP to use the MAC address created by the DECnet process. However, you should be aware that there are some disadvantages if you use the use-bia command, such as:

  • When a router becomes active the virtual IP address is moved to a different MAC address. The newly active router sends a gratuitous Address Resolution Protocol (ARP) response, but not all host implementations handle the gratuitous ARP correctly.

  • The use-bia configuration breaks proxy ARP. A standby router cannot cover for the lost proxy ARP database of the failed router.

Verify

There is currently no verification procedure available for this configuration.

Troubleshoot

There is currently no specific troubleshooting information available for this configuration.

Related Information

Updated: Aug 10, 2005
Document ID: 13781