HSRP Aware PIM

HSRP Aware PIM

Last Updated: July 13, 2012

This module describes how to configure the HSRP Aware PIM feature for enabling multicast traffic to be forwarded through the Hot Standby Router Protocol (HSRP) active router (AR), allowing Protocol Independent Multicast (PIM) to leverage HSRP redundancy, avoid potential duplicate traffic, and enable failover.

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 at the end of this module.

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.

Restrictions for HSRP Aware PIM

  • HSRP IPv6 is not supported.
  • Stateful failover is not supported. During PIM stateless failover, the HSRP group's virtual IP address transfers to the standby router but no mrouting sate information is transferred. PIM listens and responds to state change events and creates mroute states upon failover.
  • The maximum number of HSRP groups that can be tracked by PIM on each interface is 16.
  • The redundancy priority for a PIM DR must be greater than the configured or default value (1) of the PIM DR priority on any device for which the same HSRP group is enabled or the HSRP Active will fail to win the DR election.

Information About HSRP Aware PIM

HSRP

Hot Standby Router Protocol (HSRP) is a Cisco proprietary redundancy protocol for establishing a fault-tolerant default gateway.

The protocol establishes a framework between network devices in order to achieve default gateway failover if the primary gateway becomes inaccessible. By sharing an IP address and a MAC (Layer 2) address, two or more devices can act as a single virtual router. The members of a virtual router group continually exchange status messages and one device can assume the routing responsibility of another, should it go out of commission for either planned or unplanned reasons. Hosts continue to forward IP packets to a consistent IP and MAC addres,s and the changeover of devices doing the routing is transparent.

HSRP is useful for hosts that do not support a router discovery protocol and cannot switch to a new device when their selected device reloads or loses power. Because existing TCP sessions can survive the failover, this protocol also provides a more transparent recovery for hosts that dynamically choose a next hop for routing IP traffic.

When HSRP is configured on a network segment, it provides a virtual MAC address and an IP address that is shared among a group of devices running HSRP. The address of this HSRP group is referred to as the virtual IP address. One of these devices is selected by the protocol to be the active router (AR). The AR receives and routes packets destined for the MAC address of the group.

HSRP uses a priority mechanism to determine which HSRP configured device is to be the default AR. To configure a device as the AR, you assign it a priority that is higher than the priority of all the other HSRP-configured devices. The default priority is 100, so if you configure just one device to have a higher priority, that device will be the default AR.

Devices that are running HSRP send and receive multicast User Datagram Protocol (UDP)-based hello messages to detect device failure and to designate active and standby devices. When the AR fails to send a hello message within a configurable period of time, the standby device with the highest priority becomes the AR. The transition of packet forwarding functions between devices is completely transparent to all hosts on the network.

You can configure multiple Hot Standby groups on an interface, thereby making fuller use of redundant devices and load sharing.

HSRP is not a routing protocol as it does not advertise IP routes or affect the routing table in any way.

HSRP has the ability to trigger a failover if one or more interfaces on the device fail. This can be useful for dual branch devices each with a single serial link back to the head end. If the serial link of the primary device goes down, the backup device takes over the primary functionality and thus retains connectivity to the head end.

HSRP Aware PIM

Protocol Independent Multicast (PIM) has no inherent redundancy capabilities and its operation is completely independent of Hot Standby Router Protocol (HSRP) group states. As a result, IP multicast traffic is forwarded not necessarily by the same device as is elected by HSRP. The HSRP Aware PIM feature provides consistent IP multicast forwarding in a redundant network with virtual routing groups enabled.

HSRP Aware PIM enables multicast traffic to be forwarded through the HSRP active router (AR), allowing PIM to leverage HSRP redundancy, avoid potential duplicate traffic, and enable failover, depending on the HSRP states in the device. The PIM designated router (DR) runs on the same gateway as the HSRP AR and maintains mroute states.

In a multiaccess segment (such as LAN), PIM DR election is unaware of the redundancy configuration, and the elected DR and HSRP AR may not be the same router. In order to ensure that the PIM DR is always able to forward PIM Join/Prune message towards RP or FHR, the HSRP AR becomes the PIM DR (if there is only one HSRP group). PIM is responsible for adjusting DR priority based on the group state. When a failover occurs, multicast states are created on the new AR elected by the HSRP group and the AR assumes responsibility for the routing and forwarding of all the traffic addressed to the HSRP virtual IP address.

With HSRP Aware PIM enabled, PIM sends an additional PIM Hello message using the HSRP virtual IP addresses as the source address for each active HSRP group when a device becomes HSRP Active. The PIM Hello will carry a new GenID in order to trigger other routers to respond to the failover. When a downstream device receives this PIM Hello, it will add the virtual address to its PIM neighbor list. The new GenID carried in the PIM Hello will trigger downstream routers to resend PIM Join messages towards the virtual address. Upstream routers will process PIM Join/Prunes (J/P) based on HSRP group state.

If the J/P destination matches the HSRP group virtual address and if the destination device is in HSRP active state, the new AR processes the PIM Join because it is now the acting PIM DR. This allows all PIM Join/Prunes to reach the HSRP group virtual address and minimizes changes and configurations at the downstream routers side.

The IP routing service utilizes the existing virtual routing protocol to provide basic stateless failover services to client applications, such as PIM. Changes in the local HSRP group state and standby router responsibility are communicated to interested client applications. Client applications may build on top of IRS to provide stateful or stateless failover. PIM, as an HSRP client, listens to the state change notifications from HSRP and automatically adjusts the priority of the PIM DR based on the HSRP state. The PIM client also triggers communication between upstream and downstream devices upon failover in order to create an mroute state on the new AR.

How to Configure HSRP Aware PIM

Configuring an HSRP Group on an Interface

Before You Begin
  • IP multicast must already be configured on the device.
  • PIM must already be configured on the interface.

SUMMARY STEPS

1.    enable

2.    configure terminal

3.    interface type number [name-tag]

4.   ip address ip-address mask

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

6.   standby [group-number] timers [msec] hellotime [msec] holdtime

7.   standby [group-number] priority priority

8.   standby [group-number] name group-name

9.   end

10.   show standby [type number [group]] [all | brief]


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 [name-tag]


Example:

Device(config)# interface ethernet 0/0

 

Specifies an interface to be configured and enters interface configuration mode.

 
Step 4
ip address ip-address mask


Example:

Device(config-if)# ip address 10.0.0.2 255.255.255.0

 
Sets a primary or secondary IP address for an interface.  
Step 5
standby [group-number] ip [ip-address [secondary]]


Example:

Device(config-if)# standby 1 ip 192.0.2.99

 
Activates HSRP and defines an HRSP group.  
Step 6
standby [group-number] timers [msec] hellotime [msec] holdtime


Example:

Device(config-if)# standby 1 timers 5 15

 
(Optional) Configures the time between hello packets and the time before other devices declare an HSRP active or standby router to be down.  
Step 7
standby [group-number] priority priority


Example:

Device(config-if)# standby 1 priority 120

 
(Optional) Assigns the HSRP priority to be used to help select the HSRP active and standby routers.  
Step 8
standby [group-number] name group-name


Example:

Device(config-if)# standby 1 name HSRP1

 
(Optional) Defines a name for the HSRP group.
Note   We recommend that you always configure the standby ip name command when configuring an HSRP group to be used for HSRP Aware PIM.
 
Step 9
end


Example:

Device(config-if)# end

 
Returns to privileged EXEC mode.  
Step 10
show standby [type number [group]] [all | brief]


Example:

Device# show standby

 
Displays HSRP group information for verifying the configuration.  

Configuring PIM Redundancy

Before You Begin

The HSRP group must already be configured on the interface. See the "Configuring an HSRP Group on an Interface" section.


SUMMARY STEPS

1.    enable

2.    configure terminal

3.    interface type number [name-tag]

4.   ip address ip-address mask

5.   ip pim redundancy group dr-priority priority

6.   end


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 [name-tag]


Example:

Device(config)# interface ethernet 0/0

 

Specifies an interface to be configured and enters interface configuration mode.

 
Step 4
ip address ip-address mask


Example:

Device(config-if)# ip address 10.0.0.2 255.255.255.0

 
Sets a primary or secondary IP address for an interface.  
Step 5
ip pim redundancy group dr-priority priority


Example:

Device(config-if)# ip pim redundancy HSRP1 dr-priority 60

 
Enables PIM redundancy and assigns a redundancy priority value to the active PIM designated router (DR).
  • Because HSRP group names are case sensitive, the value of the group argument must match the group name configured by using the standby ip name command.
  • The redundancy priority for a PIM DR must be greater than the configured or default value (1) of the PIM DR priority on any device for which the same HSRP group is enabled.
 
Step 6
end


Example:

Device(config-if)# end

 
Returns to privileged EXEC mode.  

Configuration Examples for HSRP Aware PIM

Example: HSRP Aware PIM

        
      

Additional References for HSRP Aware PIM

Related Documents

Related Topic Document Title

Cisco IOS commands

Cisco IOS Master Commands List, All Releases

IP multicast commands

Cisco IOS IP Multicast Command Reference

HSRP commands

First Hop Redundancy Protocol Command Reference

Standards and RFCs

Standard/RFC Title

RFC 2281

Cisco Hot Standby Router Protocol (HSRP)

MIBs

MIB MIBs Link

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

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

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 HSRP Aware PIM

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 1Feature Information for HSRP Aware PIM
Feature Name Releases Feature Information

HSRP Aware PIM

15.2(4)S

Cisco IOS XE Release 3.7S

The HSRP Aware PIM feature provides consistent IP multicast forwarding in a redundant network with virtual routing groups by enabling multicast traffic to be forwarded through a Hot Standby Router Protocol (HSRP) active router, allowing PIM to leverage HSRP redundancy, avoid potential duplicate traffic, and enable failover, depending on the HSRP states in the device.

The following commands were introduced or modified: ip pim redundancy.

Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

© 2012 Cisco Systems, Inc. All rights reserved.