![]() |
First Hop Redundancy Protocols Configuration Guide, Cisco IOS Release 15M&T
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Configuring HSRP
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents
Configuring HSRPLast Updated: December 4, 2012
The Hot Standby Router Protocol (HSRP) is a First Hop Redundancy Protocol (FHRP) designed to allow for transparent failover of the first-hop IP device. HSRP provides high network availability by providing first-hop routing redundancy for IP hosts on networks configured with a default gateway IP address. HSRP is used in a group of routers for selecting an active device and a standby device. In a group of device interfaces, the active device is the device of choice for routing packets; the standby device is the device that takes over when the active device fails or when preset conditions are met. Finding Feature InformationYour 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. Information About HSRP
HSRP OperationMost IP hosts have an IP address of a single device configured as the default gateway. When HSRP is used, the HSRP virtual IP address is configured as the host's default gateway instead of the IP address of the device. HSRP is useful for hosts that do not support a discovery protocol (such as ICMP Router Discovery Protocol [IRDP]) 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 device. The active device receives and routes packets destined for the MAC address of the group. For n devices running HSRP, n+ 1 IP and MAC addresses are assigned. HSRP detects when the designated active device fails, at which point a selected standby device assumes control of the MAC and IP addresses of the Hot Standby group. A new standby device is also selected at that time. HSRP uses a priority mechanism to determine which HSRP configured device is to be the default active device. To configure a device as the active device, 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 active device. Devices that are running HSRP send and receive multicast UDP-based hello messages to detect device failure and to designate active and standby devices. When the active device fails to send a hello message within a configurable period of time, the standby device with the highest priority becomes the active device. 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. The figure below shows a network configured for HSRP. By sharing a virtual MAC address and IP address, two or more devices can act as a single virtual router. The virtual device does not physically exist but represents the common default gateway for devices that are configured to provide backup to each other. You do not need to configure the hosts on the LAN with the IP address of the active device. Instead, you configure them with the IP address (virtual IP address) of the virtual device as their default gateway. If the active device fails to send a hello message within the configurable period of time, the standby device takes over and responds to the virtual addresses and becomes the active device, assuming the active device duties. HSRP Version 2 DesignHSRP version 2 is designed to address the following restrictions in HSRP version 1:
Version 1 is the default version of HSRP. HSRP version 2 uses the new IP multicast address 224.0.0.102 to send hello packets instead of the multicast address of 224.0.0.2, used by HSRP version 1. This new multicast address allows CGMP leave processing to be enabled at the same time as HSRP. HSRP version 2 permits an expanded group number range, 0 to 4095, and consequently uses a new MAC address range 0000.0C9F.F000 to 0000.0C9F.FFFF. The increased group number range does not imply that an interface can, or should, support that many HSRP groups. The expanded group number range was changed to allow the group number to match the VLAN number on subinterfaces. When the HSRP version is changed, each group will reinitialize because it now has a new virtual MAC address. HSRP version 2 has a different packet format than HSRP version 1. The packet format uses a type-length-value (TLV) format. HSRP version 2 packets received by an HSRP version 1 router will have the type field mapped to the version field by HSRP version 1 and subsequently ignored. The Gateway Load Balancing Protocol (GLBP) also addresses the same restrictions relative to HSRP version 1 that HSRP version 2 does. See the Configuring GLBP document for more information on GLBP. HSRP Configuration ChangesWith CSCsv12265, an HSRP group may be configured with a virtual IP address that matches the subnet of an IP address of a secondary interface. When the virtual IP address of an HSRP group is configured with the same network ID as a secondary interface IP address, the source address of HSRP messages is automatically set to the most appropriate interface address. This configuration change allows the following configuration: interface Ethernet1/0 ip address 192.168.1.1 255.255.255.0 ip address 192.168.2.1 255.255.255.0 secondary standby 1 ip 192.168.1.254 standby 1 priority 105 standby 1 preempt standby 2 ip 192.168.2.254 !Same network ID as secondary interface Prior to CSCsv12265, an HSRP group remained in INIT state unless the HSRP virtual IP address had the same network ID as the primary interface address. In addition, the following warning message is displayed if an HSRP group address is configured when no interface addresses are configured: % Warning: address is not within a subnet on this interface HSRP BenefitsRedundancyHSRP employs a redundancy scheme that is time proven and deployed extensively in large networks. HSRP Groups and Group AttributesYou can use the CLI to apply group attributes to:
HSRP PreemptionWhen a newly reloaded device becomes HSRP active, and there is already an HSRP active device on the network, HSRP preemption may appear to not function. HSRP preemption may appear not function correctly because the new HSRP active device did not receive any hello packets from the current HSRP active device, and the preemption configuration never factored into the new device's decision making. HSRP may appear to not function on some larger hardware platforms where there can be a delay in an interface receiving packets. In general, we recommend that all HSRP devices have the following configuration: standby delay minimum 30 reload 60 The standby delay minimum reload interface configuration command delays HSRP groups from initializing for the specified time after the interface comes up. This is a different command than the standby preempt delay interface configuration command, which enables HSRP preemption delay. HSRP Priority and PreemptionPreemption enables the HSRP router with the highest priority to immediately become the active router. Priority is determined first by the configured priority value, and then by the IP address. In case of ties, the primary IP addresses are compared, and the higher IP address has priority. In each case, a higher value is of greater priority. If you do not use the standby preempt interface configuration command in the configuration for a router, that router will not become the active router, even if its priority is higher than all other routers. A standby router with equal priority but a higher IP address will not preempt the active router. When a router first comes up, it does not have a complete routing table. You can set a preemption delay that allows preemption to be delayed for a configurable time period. This delay period allows the router to populate its routing table before becoming the active router. If preemption is not enabled, then a router may appear to preempt the active router if it does not receive any Hello messages from the active router. How Object Tracking Affects the Priority of an HSRP DeviceThe priority of a device can change dynamically if it has been configured for object tracking and the object that is being tracked goes down. The tracking process periodically polls the tracked objects and notes any change of value. The changes in the tracked object are communicated to HSRP, either immediately or after a specified delay. The object values are reported as either up or down. Examples of objects that can be tracked are the line protocol state of an interface or the reachability of an IP route. If the specified object goes down, the HSRP priority is reduced. The HSRP device with the higher priority can become the active device if it has the standby preempt command configured. HSRP AddressingHSRP devices communicate between each other by exchanging HSRP hello packets. These packets are sent to the destination IP multicast address 224.0.0.2 (reserved multicast address used to communicate to all devices) on UDP port 1985. The active device sources hello packets from its configured IP address and the HSRP virtual MAC address while the standby device sources hellos from its configured IP address and the interface MAC address, which may or may not be the burned-in MAC address (BIA). Because hosts are configured with their default gateway as the HSRP virtual IP address, hosts must communicate with the MAC address associated with the HSRP virtual IP address. This MAC address will be a virtual MAC address in the format of 0000.0C07.ACxy, where xy is the HSRP group number in hexadecimal based on the respective interface. For example, HSRP group one will use the HSRP virtual MAC address of 0000.0C07.AC01. Hosts on the adjoining LAN segment use the normal Address Resolution Protocol (ARP) process to resolve the associated MAC addresses. HSRP version 2 uses the new IP multicast address 224.0.0.102 to send hello packets instead of the multicast address of 224.0.0.2, which is used by version 1. This new multicast address allows Cisco Group Management Protocol (CGMP) leave processing to be enabled at the same time as HSRP. HSRP version 2 permits an expanded group number range, 0 to 4095, and consequently uses a new MAC address range 0000.0C9F.F000 to 0000.0C9F.FFFF. HSRP Virtual MAC Addresses and BIA MAC AddressesA device automatically generates a virtual MAC address for each HSRP device. However, some network implementations, such as Advanced Peer-to-Peer Networking (APPN), use the MAC address to identify the first hop for routing purposes. In this case, specify the virtual MAC address by using the standby mac-address command in the group; the virtual IP address is unimportant for these protocols. The standby use-bia command was implemented to overcome the limitations of using a functional address for the HSRP MAC address on Token Ring interfaces. This command allows HSRP groups to use the burned-in MAC address of an interface instead of the HSRP virtual MAC address. When HSRP runs on a multiple-ring, source-routed bridging environment and the HSRP devices reside on different rings, configuring the standby use-bia command can prevent confusion about the routing information field (RFI). The standby use-bia command is used for an interface and the standby mac-address command is used for an HSRP group. HSRP TimersEach HSRP device maintains three timers that are used for timing hello messages: an active timer, a standby timer, and a hello timer. When a timer expires, the device changes to a new HSRP state. Devices for which timer values are not configured can learn timer values from the active or standby device. The timers configured on the active device always override any other timer settings. All devices in a Hot Standby group should use the same timer values. For HSRP version 1, nonactive devices learn timer values from the active device, unless millisecond timer values are being used. If millisecond timer values are being used, all devices must be configured with the millisecond timer values. This rule applies if either the hello time or the hold time is specified in milliseconds. This configuration is necessary because the HSRP hello packets advertise the timer values in seconds. HSRP version 2 does not have this limitation; it advertises the timer values in milliseconds. HSRP MAC Refresh IntervalWhen HSRP runs over FDDI, you can change the interval at which a packet is sent to refresh the MAC cache on learning bridges and switches. HSRP hello packets on FDDI interfaces use the burned-in address (BIA) instead of the MAC virtual address. Refresh packets keep the MAC cache on switches and learning bridges current. Refresh packets are also used for HSRP groups configured as multigroup slaves because these do not send regular Hello messages. You can change the refresh interval on FDDI rings to a longer or shorter interval, thereby using bandwidth more efficiently. You can prevent the sending of any MAC refresh packets if you do not need them (if you have FDDI but do not have a learning bridge or switch). HSRP Text AuthenticationHSRP ignores unauthenticated HSRP protocol messages. The default authentication type is text authentication. HSRP authentication protects against false HSRP hello packets causing a denial-of-service attack. For example, Device A has a priority of 120 and is the active device. If a host sends spoof HSRP hello packets with a priority of 130, then Device A stops being the active device. If Device A has authentication configured such that the spoof HSRP hello packets are ignored, Device A will remain the active device HSRP packets will be rejected in any of the following cases: HSRP MD5 AuthenticationBefore the introduction of HSRP MD5 authentication, HSRP authenticated protocol packets with a simple plain text string. HSRP MD5 authentication is an enhancement to generate an MD5 digest for the HSRP portion of the multicast HSRP protocol packet. This functionality provides added security and protects against the threat from HSRP-spoofing software. MD5 authentication provides greater security than the alternative plain text authentication scheme. MD5 authentication allows each HSRP group member to use a secret key to generate a keyed MD5 hash that is part of the outgoing packet. A keyed hash of an incoming packet is generated and if the hash within the incoming packet does not match the generated hash, the packet is ignored. The key for the MD5 hash can be either given directly in the configuration using a key string or supplied indirectly through a key chain. HSRP has two authentication schemes: HSRP authentication protects against false HSRP hello packets causing a denial-of-service attack. For example, Device A has a priority of 120 and is the active device. If a host sends spoof HSRP hello packets with a priority of 130, then Device A stops being the active device. If Device A has authentication configured such that the spoof HSRP hello packets are ignored, Device A will remain the active device. HSRP packets will be rejected in any of the following cases: HSRP Support for IPv6Most IPv4 hosts have a single router's IP address configured as the default gateway. When HSRP is used, then the HSRP virtual IP address is configured as the host's default gateway instead of the router's IP address. Simple load sharing may be achieved by using two HSRP groups and configuring half the hosts with one virtual IP address and half the hosts with the other virtual IP address. In contrast, IPv6 hosts learn of available IPv6 routers through IPv6 neighbor discovery Router Advertisement (RA) messages. These are multicast periodically, or may be solicited by hosts. HSRP is designed to provide only a virtual first hop for IPv6 hosts. An HSRP IPv6 group has a virtual MAC address that is derived from the HSRP group number, and a virtual IPv6 link-local address that is, by default, derived from the HSRP virtual MAC address. HSRP IPv6 uses the MAC address range 0005.73A0.0000 to 0005.73A0.0FFF. Periodic RAs are sent for the HSRP virtual IPv6 link-local address when the HSRP group is active. These RAs stop after a final RA is sent when the group leaves the active state. Periodic RAs for the interface link-local address stop after a final RA is sent while at least one virtual IPv6 link-local address is configured on the interface. No restrictions occur for the interface IPv6 link-local address other than that mentioned for the RAs. Other protocols continue to receive and send packets to this address. HSRP uses a priority mechanism to determine which HSRP configured router is to be the default active router. To configure a router as the active router, you assign it a priority that is higher than the priority of all the other HSRP-configured routers. The default priority is 100, so if you configure just one router to have a higher priority, that router will be the default active router. For more information see the "Configuring First Hop Redundancy Protocols in IPv6" chapter of the Cisco IOS IPv6 Configuration Guide. HSRP Messages and StatesDevices configured with HSRP exchange three types of multicast messages:
At any time, a device configured with HSRP is in one of the following states:
HSRP uses logging Level 5 for syslog messages related to HSRP state changes to allow logging of an event without filling up the syslog buffer on the device with low-priority Level 6 messaging. HSRP Group Linking to IP Redundancy ClientsHSRP provides stateless redundancy for IP routing. HSRP by itself is limited to maintaining its own state. Linking an IP redundancy client to an HSRP group provides a mechanism that allows HSRP to provide a service to client applications so they can implement stateful failover. IP redundancy clients are other Cisco IOS processes or applications that use HSRP to provide or withhold a service or resource dependent upon the state of the group. HSRP groups have a default name of hsrp-interface-group so specifying a group name is optional. For example, Group 1 on Ethernet0/0 has a default group name of "hsrp-Et0/0-1." HSRP and ARPHSRP works when the hosts are configured for proxy ARP. When the active HSRP device receives an ARP request for a host that is not on the local LAN, the device replies with the MAC address of the virtual router. If the active device becomes unavailable or its connection to the remote LAN goes down, the device that becomes the active device receives packets addressed to the virtual router and transfers them accordingly. If the Hot Standby state of the interface is not active, proxy ARP responses are suppressed. HSRP Gratuitous ARPThe HSRP Gratuitous ARP feature configures HSRP to check that the entries in the ARP cache are correct and to send periodic gratuitous ARP packets from one or more HSRP active groups. By default, HSRP sends out three gratuitous ARP packets from an HSRP group when the group state changes to Active. HSRP sends the first gratuitous ARP packet when the group becomes active. The second two gratuitous ARP packets are sent 2 and 4 seconds later. The HSRP Gratuitous ARP feature enhances the capability of HSRP so that the number and frequency of gratuitous ARP packets sent by an active HSRP group are configurable. Use the standby arp gratuitous command in interface configuration mode to configure a specific number of gratuitous ARP packets to be sent at a specified interval. Use the standby send arp command in EXEC mode to configure HSRP to send a single gratuitous ARP packet for each active group. When the standby send arp command is configured, HSRP checks that the entries in the ARP cache are correct prior to sending a gratuitous ARP packet. If an ARP entry is incorrect, HSRP will try to readd it. Static or alias ARP entries cannot be overwritten by HSRP. Configuring the standby send arp command ensures that a host ARP cache is updated prior to heavy CPU-usage processes or configurations are started. When CPU usage is above 50 percent due to heavy ARP traffic combined with moderate software switched IP traffic, ARP refresh requests could fail, causing some application servers to lose their default gateway ARP entries and fail to communicate with the rest of the network. In some scenarios, operations such as enabling a large access list can cause ARP requests from hosts to be delayed, causing the host to have no default gateway for a short time. A periodic gratuitous ARP packet sent from the HSRP active device refreshes the host ARP cache before it expires. HSRP Object TrackingObject tracking separates the tracking mechanism from HSRP and creates a separate standalone tracking process that can be used by any other process as well as HSRP. The priority of a device can change dynamically when it has been configured for object tracking and the object that is being tracked goes down. Examples of objects that can be tracked are the line protocol state of an interface or the reachability of an IP route. If the specified object goes down, the HSRP priority is reduced. A client process such as HSRP, Virtual Router Redundancy Protocol (VRRP), or Gateway Load Balancing Protocol (GLBP) can register its interest in tracking objects and then be notified when the tracked object changes state. For more information about object tracking, see the "Configuring Enhanced Object Tracking" document. HSRP Group ShutdownThe FHRP--HSRP Group Shutdown feature enables you to configure an HSRP group to become disabled (its state changed to Init) instead of having its priority decremented when a tracked object goes down. Use the standby track command with the shutdown keyword to configure HSRP group shutdown. If an object is already being tracked by an HSRP group, you cannot change the configuration to use the HSRP Group Shutdown feature. You must first remove the tracking configuration using the no standby track command and then reconfigure it using the standby track command with the shutdown keyword. HSRP Support for ICMP Redirect MessagesBy default, HSRP filtering of Internet Control Message Protocol (ICMP) redirect messages is enabled on devices running HSRP. ICMP is a network layer Internet protocol that provides message packets to report errors and other information relevant to IP processing. ICMP can send error packets to a host and can send redirect packets to a host. When HSRP is running, preventing hosts from discovering the interface (or real) IP addresses of devices in the HSRP group is important. If a host is redirected by ICMP to the real IP address of a device, and that device later fails, then packets from the host will be lost. ICMP redirect messages are automatically enabled on interfaces configured with HSRP. This functionality works by filtering outgoing ICMP redirect messages through HSRP, where the next hop IP address may be changed to an HSRP virtual IP address. ICMP Redirects to Active HSRP DevicesThe next-hop IP address is compared to the list of active HSRP devices on that network; if a match is found, then the real next-hop IP address is replaced with a corresponding virtual IP address and the redirect message is allowed to continue. If no match is found, then the ICMP redirect message is sent only if the device corresponding to the new next hop IP address is not running HSRP. Redirects to passive HSRP devices are not allowed (a passive HSRP device is a device running HSRP, but which contains no active HSRP groups on the interface). For optimal operation, every device in a network that is running HSRP should contain at least one active HSRP group on an interface to that network. Every HSRP device need not be a member of the same group. Each HSRP device will snoop on all HSRP packets on the network to maintain a list of active devices (virtual IP addresses versus real IP addresses). Consider the network shown in the figure below, which supports the HSRP ICMP redirection filter. If the host wants to send a packet to another host on Net D, then it first sends it to its default gateway, the virtual IP address of HSRP group 1. The following is the packet received from the host: dest MAC = HSRP group 1 virtual MAC source MAC = Host MAC dest IP = host-on-netD IP source IP = Host IP Device R1 receives this packet and determines that device R4 can provide a better path to Net D, so it prepares to send a redirect message that will redirect the host to the real IP address of device R4 (because only real IP addresses are in its routing table). The following is the initial ICMP redirect message sent by device R1: dest MAC = Host MAC source MAC = router R1 MAC dest IP = Host IP source IP = router R1 IP gateway to use = router R4 IP Before this redirect occurs, the HSRP process of device R1 determines that device R4 is the active HSRP device for group 3, so it changes the next hop in the redirect message from the real IP address of device R4 to the virtual IP address of group 3. Furthermore, it determines from the destination MAC address of the packet that triggered the redirect message that the host used the virtual IP address of group 1 as its gateway, so it changes the source IP address of the redirect message to the virtual IP address of group 1. The modified ICMP redirect message showing the two modified fields (*) is as follows: dest MAC = Host MAC source MAC = router R1 MAC dest IP = Host IP source IP* = HSRP group 1 virtual IP gateway to use* = HSRP group 3 virtual IP This second modification is necessary because hosts compare the source IP address of the ICMP redirect message with their default gateway. If these addresses do not match, the ICMP redirect message is ignored. The routing table of the host now consists of the default gateway, virtual IP address of group 1, and a route to Net D through the virtual IP address of group 3. ICMP Redirects to Passive HSRP DevicesICMP redirects to passive HSRP devices are not permitted. Redundancy may be lost if hosts learn the real IP addresses of HSRP devices. In the "Network Supporting the HSRP ICMP Redirection Filter" figure, redirection to device R8 is not allowed because R8 is a passive HSRP device. In this case, packets from the host to Net D will first go to device R1 and then be forwarded to device R4; that is, they will traverse the network twice. A network configuration with passive HSRP devices is considered a misconfiguration. For HSRP ICMP redirection to operate optimally, every device on the network that is running HSRP should contain at least one active HSRP group. ICMP Redirects to Non-HSRP DevicesICMP redirects to devices not running HSRP on their local interface are permitted. No redundancy is lost if hosts learn the real IP address of non-HSRP devices. In the "Network Supporting the HSRP ICMP Redirection Filter" figure, redirection to device R7 is allowed because R7 is not running HSRP. In this case, the next hop IP address is unchanged. The source IP address is changed dependent upon the destination MAC address of the original packet. You can specify the no standby redirect unknown command to stop these redirects from being sent. Passive HSRP Advertisement MessagesPassive HSRP devices send out HSRP advertisement messages both periodically and when entering or leaving the passive state. Thus, all HSRP devices can determine the HSRP group state of any HSRP device on the network. These advertisements inform other HSRP devices on the network of the HSRP interface state, as follows:
You can adjust the advertisement interval and hold-down time using the standby redirect timers command. ICMP Redirects Not SentIf the HSRP device cannot uniquely determine the IP address used by the host when it sends the packet that caused the redirect, the redirect message will not be sent. The device uses the destination MAC address in the original packet to make this determination. In certain configurations, such as the use of the standby use-bia interface configuration command specified on an interface, redirects cannot be sent. In this case, the HSRP groups use the interface MAC address as their virtual MAC address. The device now cannot determine if the default gateway of the host is the real IP address or one of the HSRP virtual IP addresses that are active on the interface. The IP source address of an ICMP packet must match the gateway address used by the host in the packet that triggered the ICMP packet, otherwise the host will reject the ICMP redirect packet. An HSRP device uses the destination MAC address to determine the gateway IP address of the host. If the HSRP device is using the same MAC address for multiple IP addresses, uniquely determining the gateway IP address of the host is not possible, and the redirect message is not sent. The following is sample output from the debug standby events icmp EXEC command if HSRP could not uniquely determine the gateway used by the host: 10:43:08: HSRP: ICMP redirect not sent to 10.0.0.4 for dest 10.0.1.2 10:43:08: HSRP: could not uniquely determine IP address for mac 00d0.bbd3.bc22 HSRP Support for MPLS VPNsHSRP support for a Multiprotocol Label Switching (MPLS) VPN interface is useful when an Ethernet LAN is connected between two provider edge (PE) devices with either of the following conditions:
Each VPN is associated with one or more VPN routing and forwarding (VRF) instances. A VRF consists of the following elements:
VPN routing information is stored in the IP routing table and the Cisco Express Forwarding table for each VRF. A separate set of routing and Cisco Express Forwarding tables is maintained for each VRF. These tables prevent information from being forwarded outside a VPN and also prevent packets that are outside a VPN from being forwarded to a device within the VPN. HSRP adds ARP entries and IP hash table entries (aliases) using the default routing table instance. However, a different routing table instance is used when VRF forwarding is configured on an interface, causing ARP and ICMP echo requests for the HSRP virtual IP address to fail. HSRP support for MPLS VPNs ensures that the HSRP virtual IP address is added to the correct IP routing table and not to the default routing table. HSRP Multiple Group OptimizationThe 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. HSRP--ISSUThe In Service Software Upgrade (ISSU) process allows Cisco software to be updated or otherwise modified while packet forwarding continues. In most networks, planned software upgrades are a significant cause of downtime. ISSU allows Cisco software to be modified while packet forwarding continues, which increases network availability and reduces downtime caused by planned software upgrades. For detailed information about ISSU, see the Cisco IOS In Service Software Upgrade Process document in the High Availability Configuration Guide. SSO HSRPSSO HSRP alters the behavior of HSRP when a device with redundant Route Processors (RPs) is configured for stateful switchover (SSO) redundancy mode. When an RP is active and the other RP is standby, SSO enables the standby RP to take over if the active RP fails. With this functionality, HSRP SSO information is synchronized to the standby RP, allowing traffic that is sent using the HSRP virtual IP address to be continuously forwarded during a switchover without a loss of data or a path change. Additionally, if both RPs fail on the active HSRP device, then the standby HSRP device takes over as the active HSRP device. The feature is enabled by default when the redundancy mode of operation is set to SSO. SSO Dual-Route Processors and Cisco Nonstop ForwardingSSO functions in networking devices (usually edge devices) that support dual RPs. SSO provides RP redundancy by establishing one of the RPs as the active processor and the other RP as the standby processor. SSO also synchronizes critical state information between the RPs so that network state information is dynamically maintained between RPs. SSO is generally used with Cisco nonstop forwarding (NSF). Cisco NSF enables forwarding of data packets to continue along known routes while the routing protocol information is being restored following a switchover. With NSF, users are less likely to experience service outages. HSRP and SSO Working TogetherThe SSO HSRP feature enables the Cisco IOS HSRP subsystem software to detect that a standby RP is installed and the system is configured in SSO redundancy mode. Further, if the active RP fails, no change occurs to the HSRP group itself and traffic continues to be forwarded through the current active gateway device. Prior to introduction of the SSO HSRP feature, when the primary RP of the active device failed, it would stop participating in the HSRP group and trigger another switch in the group to take over as the active HSRP switch. SSO HSRP is required to preserve the forwarding path for traffic destined to the HSRP virtual IP address through an RP switchover. Configuring SSO on the edge device enables the traffic on the Ethernet links to continue during an RP failover without the Ethernet traffic switching over to an HSRP standby device (and then back, if preemption is enabled). HSRP BFD PeeringThe HSRP BFD Peering feature introduces Bidirectional Forwarding Detection (BFD) in the Hot Standby Router Protocol (HSRP) group member health monitoring system. HSRP supports BFD as a part of the HSRP group member health monitoring system. Without BFD, HSRP runs as a process in a multiprocess system and cannot be guaranteed to be scheduled in time to service large numbers of groups with hello and hold timers, in milliseconds. BFD runs as a pseudopreemptive process and can therefore be guaranteed to run when required. Only one BFD session between two devices can provide early failover notification for multiple HSRP groups. This feature is enabled by default. The HSRP standby device learns the real IP address of the HSRP active device from the HSRP hello messages. The standby device registers as a BFD client and asks to be notified if the active device becomes unavailable. BFD provides a low-overhead, short-duration method of detecting failures in the forwarding path between two adjacent devices, including the interfaces, data links, and forwarding planes. BFD is a detection protocol that you enable at the interface and routing protocol levels. Cisco supports the BFD asynchronous mode, which depends on the sending of BFD control packets between two systems to activate and maintain BFD neighbor sessions between devices. Therefore, to create a BFD session, you must configure BFD on both systems (or BFD peers). When BFD is enabled on the interfaces and at the device level for HSRP, a BFD session is created, BFD timers are negotiated, and the BFD peers will begin to send BFD control packets to each other at the negotiated interval. BFD provides fast BFD peer failure detection times independently of all media types, encapsulations, topologies, and routing protocols such as, Border Gateway Protocol (BGP), Enhanced Interior Gateway Routing Protocol (EIGRP), Hot Standby Router Protocol (HSRP), Intermediate System To Intermediate System (IS-IS), and Open Shortest Path First (OSPF). By sending rapid failure detection notices to the routing protocols in the local device to initiate the routing table recalculation process, BFD contributes to greatly reduce overall network convergence time. The figure below shows a simple network with two devices running HSRP and BFD. For more information about BFD, see the IP Routing: BFD Configuration Guide. HSRP MIB TrapsHSRP MIB supports Simple Network Management Protocol (SNMP) Get operations, to allow network devices to get reports about HSRP groups in a network from the network management station. Enabling HSRP MIB trap support is performed through the CLI, and the MIB is used for getting the reports. A trap notifies the network management station when a device leaves or enters the active or standby state. When an entry is configured from the CLI, the RowStatus for that group in the MIB immediately goes to the active state. Cisco software supports a read-only version of the MIB, and set operations are not supported. This functionality supports four MIB tables, as follows:
The cHsrpGrpEntry table consists of all the group information defined in RFC 2281, Cisco Hot Standby Router Protocol; the other tables consist of the Cisco extensions to RFC 2281, which are defined in CISCO-HSRP-EXT-MIB.my. How to Configure HSRP
Enabling HSRPPerform this task to enable HSRP. The standby ip interface configuration command activates HSRP on the configured interface. If an IP address is specified, that address is used as the virtual IP address for the Hot Standby group. For HSRP to elect a designated device, you must configure the virtual IP address for at least one of the devices in the group; it can be learned on the other devices in the group. Before You Begin
SUMMARY STEPS
You can configure many attributes in HSRP such as authentication, timers, priority, and preemption. You should configure the attributes before enabling the HSRP group. This practice avoids authentication error messages and unexpected state changes in other routers that can occur if the group is enabled first and then there is a long enough delay (one or two hold times) before the other attribues are configured. We recommend that you always specify an HSRP IP address. DETAILED STEPS Delaying the Initialization of HSRP on an InterfaceThe standby delay command is used to delay HSRP initialization either after a reload and/or after an interface comes up. This configuration allows the interface and device time to settle down after the interface up event and helps prevent HSRP state flapping. We recommend that you use the standby minimum reload command if the standby timers command is configured in milliseconds or if HSRP is configured on a VLAN interface. DETAILED STEPS Configuring HSRP Priority and PreemptionSUMMARY STEPS
DETAILED STEPS
Configuring HSRP Object TrackingPerform this task to configure HSRP to track an object and change the HSRP priority based on the state of the object. Each tracked object is identified by a unique number that is specified on the tracking CLI. Client processes use this number to track a specific object. DETAILED STEPS
Configuring HSRP MD5 Authentication Using a Key String
DETAILED STEPS
Configuring HSRP MD5 Authentication Using a Key ChainPerform this task to configure HSRP MD5 authentication using a key chain. Key chains allow a different key string to be used at different times according to the key chain configuration. HSRP will query the appropriate key chain to obtain the current live key and key ID for the specified key chain. DETAILED STEPS
Troubleshooting HSRP MD5 Authentication
SUMMARY STEPS
DETAILED STEPS
ExamplesIn the following example, Device A has MD5 text string authentication configured, but Device B has the default text authentication:
Device# debug standby errors
A:Jun 16 12:14:50.337:HSRP:Et0/1 Grp 0 Auth failed for Hello pkt from 10.21.0.5, MD5 confgd but no tlv
B:Jun 16 12:16:34.287:HSRP:Et0/1 Grp 0 Auth failed for Hello pkt from 10.21.0.4, Text auth failed
In the following example, both Device A and Device B have different MD5 authentication strings:
Device# debug standby errors
A:Jun 16 12:19:26.335:HSRP:Et0/1 Grp 0 Auth failed for Hello pkt from 10.21.0.5, MD5 auth failed
B:Jun 16 12:18:46.280:HSRP:Et0/1 Grp 0 Auth failed for Hello pkt from 10.21.0.4, MD5 auth failed
Configuring HSRP Text AuthenticationSUMMARY STEPS
DETAILED STEPS
Configuring HSRP Timers
You can use the standby delay command to allow the interface to come up completely before HSRP initializes. DETAILED STEPS
Configuring an HSRP MAC Refresh IntervalSUMMARY STEPS
DETAILED STEPS
Configuring Multiple HSRP Groups for Load BalancingPerform 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. DETAILED STEPS
Improving CPU and Network Performance with HSRP Multiple Group OptimizationPerform 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.
Before You Begin
SUMMARY STEPS
Configure the HSRP master group using the steps in the Configuring Multiple HSRP Groups for Load Balancing section. DETAILED STEPS
Enabling HSRP Support for ICMP Redirect MessagesBy default, HSRP filtering of ICMP redirect messages is enabled on devices running HSRP. Perform this task to reenable this feature on your device if it is disabled. DETAILED STEPS
Configuring HSRP Virtual MAC Addresses or BIA MAC Addresses
DETAILED STEPS
Linking IP Redundancy Clients to HSRP GroupsBefore You Begin
SUMMARY STEPS
Within the client application, you must first specify the same name as configured in the standby name command. DETAILED STEPS
Changing to HSRP Version 2HSRP version 2 was introduced to prepare for further enhancements and to expand the capabilities beyond what is possible with HSRP version 1. HSRP version 2 has a different packet format than HSRP version 1.
DETAILED STEPS
Enabling SSO Aware HSRPThe SSO aware HSRP is enabled by default when the redundancy mode is set to SSO. Perform this task to reenable HSRP to be SSO aware if it has been disabled.
DETAILED STEPS
Verifying SSO Aware HSRP
SUMMARY STEPS
DETAILED STEPS
Enabling HSRP MIB TrapsSUMMARY STEPS
DETAILED STEPS
Configuring BFD Session Parameters on an InterfacePerform this task to configure Bidirectional Forwarding Detection (BFD) on an interface by setting the baseline BFD session parameters on the interface. Repeat the steps in this task for each interface on which you want to run BFD sessions to BFD neighbors. DETAILED STEPS
Configuring HSRP BFD PeeringPerform this task to enable Hot Standby Router Protocol (HSRP) Bidirectional Forwarding Detection (BFD) peering. Repeat the steps in this task for each interface over which you want to run BFD sessions to HSRP peers. HSRP supports BFD peering by default. If HSRP BFD peering is disabled, you can reenable it at the device level to enable BFD support globally for all interfaces or you can reenable it on a per-interface basis at the interface level. DETAILED STEPS
Verifying HSRP BFD PeeringTo verify Hot Standby Router Protocol (HSRP) Bidirectional Forwarding Detection (BFD) peering, use any of the following optional commands. DETAILED STEPS
Configuring HSRP Gratuitous ARPPerform this task to configure HSRP to check that the entries in the ARP cache are correct and to send periodic gratuitous ARP packets from one or more HSRP active groups. By default, HSRP sends out three gratuitous ARP packets from an HSRP group when the group state changes to Active. HSRP sends the first gratuitous ARP packet when the group becomes active. The second two gratuitous ARP packets are sent 2 and 4 seconds later. DETAILED STEPS
Configuration Examples for HSRP
Example: Configuring HSRP Priority and PreemptionIn the following example, Device A is configured to be the active device for group 1 because it has the higher priority and standby device for group 2. Device B is configured to be the active device for group 2 and standby device for group 1. Device A ConfigurationDevice(config)# interface GigabitEthernet 0/0/0 Device(config-if)# ip address 10.1.0.21 255.255.0.0 Device(config-if)# standby 1 priority 110 Device(config-if)# standby 1 preempt Device(config-if)# standby 1 ip 10.1.0.1 Device(config-if)# standby 2 priority 95 Device(config-if)# standby 2 preempt Device(config-if)# standby 2 ip 10.1.0.2 Device B ConfigurationDevice(config)# interface GigabitEthernet 0/0/0 Device(config-if)# ip address 10.1.0.22 255.255.0.0 Device(config-if)# standby 1 preempt Device(config-if)# standby 1 priority 105 Device(config-if)# standby 1 ip 10.1.0.1 Device(config-if)# standby 2 priority 110 Device(config-if)# standby 2 preempt Device(config-if)# standby 2 ip 10.1.0.2 Example: Configuring HSRP Object TrackingIn the following example, the tracking process is configured to track the IP-routing capability of serial interface 1/0. HSRP on Gigabit Ethernet interface 0/0/0 then registers with the tracking process to be informed of any changes to the IP-routing state of serial interface 1/0. If the IP state on serial interface 1/0 goes down, the priority of the HSRP group is reduced by 10. If both serial interfaces are operational, Device A will be the HSRP active device because it has the higher priority. However, if IP routing on serial interface 1/0 in Device A fails, the HSRP group priority will be reduced and Device B will take over as the active device, thus maintaining a default virtual gateway service to hosts on the 10.1.0.0 subnet. Device A ConfigurationDevice(config)# track 100 interface serial 1/0/0 ip routing ! Device(config)# interface GigabitEthernet 0/0/0 Device(config-if)# ip address 10.1.0.21 255.255.0.0 Device(config-if)# standby 1 preempt Device(config-if)# standby 1 priority 110 Device(config-if)# standby 1 track 100 decrement 10 Device(config-if)# standby 1 ip 10.1.0.1 Device B ConfigurationDevice(config)# track 100 interface serial 1/0/0 ip routing ! Device(config)# interface GigabitEthernet 0/0/0 Device(config-if)# ip address 10.1.0.22 255.255.0.0 Device(config-if)# standby 1 preempt Device(config-if)# standby 1 priority 105 Device(config-if)# standby 1 track 100 decrement 10 Device(config-if)# standby 1 ip 10.1.0.1 Example: Configuring HSRP Group ShutdownIn the following example, the tracking process is configured to track the IP-routing capability of Gigabit Ethernet interface 0/0/0. HSRP on Gigabit Ethernet interface 0/0/1 then registers with the tracking process to be informed of any changes to the IP-routing state of Gigabit Ethernet interface 0/0/0. If the IP state on Gigabit Ethernet interface 0/0/0 goes down, the HSRP group is disabled. If both Gigabit Ethernet interfaces are operational, Device A will be the HSRP active device because it has the higher priority. However, if IP routing on Gigabit Ethernet interface 0/0/0 in Device A fails, the HSRP group will be disabled and Device B will take over as the active device, thus maintaining a default virtual gateway service to hosts on the 10.1.0.0 subnet. Device A ConfigurationDevice(config)# track 100 interface GigabitEthernet 0/0/0 ip routing ! Device(config)# interface GigabitEthernet 0/0/1 Device(config-if)# ip address 10.1.0.21 255.255.0.0 Device(config-if)# standby 1 ip 10.1.0.1 Device(config-if)# standby 1 preempt Device(config-if)# standby 1 priority 110 Device(config-if)# standby 1 track 100 shutdown Device B ConfigurationDevice(config)# track 100 interface GigabitEthernet 0/0/0 ip routing ! Device(config)# interface GigabitEthernet 0/0/1 Device(config-if)# ip address 10.1.0.22 255.255.0.0 Device(config-if)# standby 1 ip 10.1.0.1 Device(config-if)# standby 1 preempt Device(config-if)# standby 1 priority 105 Device(config-if)# standby 1 track 100 shutdown If an object is already being tracked by an HSRP group, you cannot change the configuration to use the HSRP Group Shutdown feature. You must first remove the tracking configuration using the no standby track command and then reconfigure it using the standby track command with the shutdown keyword. The following example shows how to change the configuration of a tracked object to include the HSRP Group Shutdown feature: Device(config)# no standby 1 track 100 decrement 10 Device(config)# standby 1 track 100 shutdown Example: Configuring HSRP MD5 Authentication Using Key ChainsIn the following example, HSRP queries the key chain "hsrp1" to obtain the current live key and key ID for the specified key chain: Device(config)# key chain hsrp1 Device(config-keychain)# key 1 Device(config-keychain-key)# key-string 54321098452103ab Device(config-keychain-key)# exit Device(config)# interface GigabitEthernet 0/0/0 Device(config-if)# standby 1 priority 110 Device(config-if)# standby 1 preempt Device(config-if)# standby 1 authentication md5 key-chain hsrp1 Device(config-if)# standby 1 ip 10.21.0.10 Example: Configuring HSRP MD5 Authentication Using Key Strings and Key ChainsThe key ID for key-string authentication is always zero. If a key chain is configured with a key ID of zero, then the following configuration will work: Device 1Device(config)# key chain hsrp1 Device(config-keychain)# key 0 Device(config-keychain-key)# key-string 54321098452103ab Device(config-keychain-key)# exit Device(config)# interface GigabitEthernet 0/0/0 Device(config-if)# standby 1 authentication md5 key-chain hsrp1 Device(config-if)# standby 1 ip 10.21.0.10 Example: Configuring Multiple HSRP Groups for Load BalancingYou 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. 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 ConfigurationRouter(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 ConfigurationRouter(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 OptimizationThe 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 Example: Configuring HSRP Support for ICMP Redirect MessagesDevice A Configuration--Active for Group 1 and Standby for Group 2Device(config)# interface GigabitEthernet 0/0/0 Device(config-if)# ip address 10.0.0.10 255.0.0.0 Device(config-if)# standby redirect Device(config-if)# standby 1 priority 120 Device(config-if)# standby 1 preempt delay minimum 20 Device(config-if)# standby 1 ip 10.0.0.1 Device(config-if)# standby 2 priority 105 Device(config-if)# standby 2 preempt delay minimum 20 Device(config-if)# standby 2 ip 10.0.0.2 Device B Configuration--Standby for Group 1 and Active for Group 2Device(config)# interface GigabitEthernet 0/0/0 Device(config-if)# ip address 10.0.0.11 255.0.0.0 Device(config-if)# standby redirect Device(config-if)# standby 1 priority 105 Device(config-if)# standby 1 preempt delay minimum 20 Device(config-if)# standby 1 ip 10.0.0.1 Device(config-if)# standby 2 priority 120 Device(config-if)# standby 2 preempt delay minimum 20 Device(config-if)# standby 2 ip 10.0.0.2 Example: Configuring HSRP Virtual MAC Addresses and BIA MAC AddressIn an Advanced Peer-to-Peer Networking (APPN) network, an end node is typically configured with the MAC address of the adjacent network node. In the following example, if the end nodes are configured to use 4000.1000.1060, HSRP group 1 is configured to use the same MAC address: Device(config)# interface GigabitEthernet 0/0/0 Device(config-if)# ip address 10.0.0.1 Device(config-if)# standby 1 mac-address 4000.1000.1060 Device(config-if)# standby 1 ip 10.0.0.11 In the following example, the burned-in address of Token Ring interface 3/0 will be the virtual MAC address mapped to the virtual IP address: Device(config)# interface token 3/0 Device(config-if)# standby use-bia
Example: Linking IP Redundancy Clients to HSRP GroupsThe following example shows HSRP support for a static Network Address Translation (NAT) configuration. The NAT client application is linked to HSRP via the correlation between the name specified by the standby name command. Two devices are acting as HSRP active and standby, and the NAT inside interfaces are HSRP enabled and configured to belong to the group named "group1." Active Device ConfigurationDevice(config)# interface BVI 10 Device(config-if)# ip address 192.168.5.54 255.255.255.255.0 Device(config-if)# no ip redirects Device(config-if)# ip nat inside Device(config-if)# standby 10 ip 192.168.5.30 Device(config-if)# standby 10 priority 110 Device(config-if)# standby 10 preempt Device(config-if)# standby 10 name group1 Device(config-if)# standby 10 track Ethernet 2/1 ! ! Device(config)# ip default-gateway 10.0.18.126 Device(config)# ip nat inside source static 192.168.5.33 10.10.10.5 redundancy group1 Device(config)# ip classless Device(config)# ip route 10.10.10.0 255.255.255.0 Ethernet 2/1 Device(config)# ip route 172.22.33.0 255.255.255.0 Ethernet 2/1 Device(config)# no ip http server Standby Device ConfigurationDevice(config)# interface BVI 10 Device(config-if)# ip address 192.168.5.56 255.255.255.255.0 Device(config-if)# no ip redirects Device(config-if)# ip nat inside Device(config-if)# standby 10 priority 95 Device(config-if)# standby 10 preempt Device(config-if)# standby 10 name group1 Device(config-if)# standby 10 ip 192.168.5.30 Device(config-if)# standby 10 track Ethernet 3/1 Device(config-if)# exit Device(config)# ip default-gateway 10.0.18.126 Device(config)# ip nat inside source static 192.168.5.33 3.3.3.5 redundancy group1 Device(config)# ip classless Device(config)# ip route 10.0.32.231 255.255.255 Ethernet 3/1 Device(config)# ip route 10.10.10.0 255.255.255.0 Ethernet 3/1 Device(config)# no ip http server Example: Configuring HSRP Version 2The following example shows how to configure HSRP version 2 on an interface with a group number of 350: Device(config)# interface vlan 350 Device(config-if)# standby version 2 Device(config-if)# standby 350 priority 110 Device(config-if)# standby 350 preempt Device(config-if)# standby 350 timers 5 15 Device(config-if)# standby 350 ip 172.20.100.10 Example: Enabling SSO-Aware HSRPThe following example shows how to set the redundancy mode to SSO. HSRP is automatically SSO-aware when this mode is enabled. Device(config)# redundancy Device(config-red)# mode sso If SSO HSRP is disabled using the no standby sso command, you can reenable it as shown in the following example: Device(config)# interface GigabitEthernet 1/0/0 Device(config-if)# ip address 10.1.1.1 255.255.0.0 Device(config-if)# standby priority 200 Device(config-if)# standby preempt Device(config-if)# standby sso Example: Enabling HSRP MIB TrapsThe following examples show how to configure HSRP on two devices and enable the HSRP MIB trap support functionality. As in many environments, one device is preferred as the active one. To configure a device's preference as the active device, configure the device at a higher priority level and enable preemption. In the following example, the active device is referred to as the primary device. The second device is referred to as the backup device: Device ADevice(config)# interface GigabitEthernet 0/0/0 Device(config-if)# ip address 10.1.1.1 255.255.0.0 Device(config-if)# standby priority 200 Device(config-if)# standby preempt Device(config-if)# standby ip 10.1.1.3 Device(config-if)# exit Device(config)# snmp-server enable traps hsrp Device(config)# snmp-server host yourhost.cisco.com public hsrp Device BDevice(config)#interface GigabitEthernet 1/0/0 Device(config-if)# ip address 10.1.1.2 255.255.0.0 Device(config-if)# standby priority 101 Device(config-if)# standby ip 10.1.1.3 Device(config-if)# exit Device(config)# snmp-server enable traps hsrp Device(config)# snmp-server host myhost.cisco.com public hsrp Example: HSRP BFD PeeringHot Standby Router Protocol (HSRP) supports Bidirectional Forwarding Detection (BFD) as a part of the HSRP group member health monitoring system. Without BFD, HSRP runs as a process in a multiprocess system and cannot be guaranteed to be scheduled in time to service large numbers of groups with millisecond hello and hold timers. BFD runs as a pseudo-preemptive process and can therefore, be guaranteed to run when required. Only one BFD session between two devices can provide early failover notification for multiple HSRP groups. In the following example, the standby bfd and the standby bfd all-interfaces commands are not displayed. HSRP support for BFD is enabled by default when BFD is configured on a device or an interface by using the bfd interval command. The standby bfd and standby bfd all-interfaces commands are needed only if BFD has been manually disabled on a device or an interface. Device ADeviceA(config)# ip cef DeviceA(config)# interface FastEthernet2/0 DeviceA(config-if)# no shutdown DeviceA(config-if)# ip address 10.0.0.2 255.0.0.0 DeviceA(config-if)# ip router-cache cef DeviceA(config-if)# bfd interval 200 min_rx 200 multiplier 3 DeviceA(config-if)# standby 1 ip 10.0.0.11 DeviceA(config-if)# standby 1 preempt DeviceA(config-if)# standby 1 priority 110 DeviceA(config-if)# standby 2 ip 10.0.0.12 DeviceA(config-if)# standby 2 preempt DeviceA(config-if)# standby 2 priority 110 Device BDeviceB(config)# interface FastEthernet2/0 DeviceB(config-if)# ip address 10.1.0.22 255.255.0.0 DeviceB(config-if)# no shutdown DeviceB(config-if)# bfd interval 200 min_rx 200 multiplier 3 DeviceB(config-if)# standby 1 ip 10.0.0.11 DeviceB(config-if)# standby 1 preempt DeviceB(config-if)# standby 1 priority 90 DeviceB(config-if)# standby 2 ip 10.0.0.12 DeviceB(config-if)# standby 2 preempt DeviceB(config-if)# standby 2 priority 80 Example: Configuring HSRP Gratuitous ARPThe following example shows how to configure HSRP to check that the entries in the ARP cache are correct and to send three gratuitous ARP packets at 4-second intervals when an HSRP group on the interface changes to active state: Device> enable Device# standby send arp Ethernet 1/1 1 Device# configure terminal Device(config)# interface Ethernet 1/1 Device(config-if)# standby arp gratuitous count 3 interval 4 Device(config-if)# end Device# show standby arp gratuitous ethernet 1/1 HSRP Gratuitous ARP Interface Interval Count Ethernet1/1 4 3 Additional ReferencesRelated DocumentsMIBsTechnical Assistance
Feature Information for HSRPThe 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.
GlossaryARP--Address Resolution Protocol (ARP). ARP performs a required function in IP routing. ARP finds the hardware address, also known as Media Access Control (MAC) address, of a host from its known IP address. ARP maintains a cache (table) in which MAC addresses are mapped to IP addresses. ARP is part of all Cisco IOS systems running IP. active device--The primary device in an HSRP group that is currently forwarding packets for the virtual device. active RP--The active RP that controls the system, provides network services, runs the routing protocols, and presents the system management interface. client group--An HSRP group that is created on a subinterface and linked to the master group via the group name. HSRP--Hot Standby Router Protocol. Protocol that provides high network availability and transparent network-topology changes. HSRP creates a router group with a lead device that services all packets sent to the HSRP address. The lead device is monitored by other devices in the group, and if it fails, one of these standby HSRP devices inherits the lead position and the HSRP group address. ISSU--In Service Software Upgrade. A process that allows Cisco IOS software to be updated or otherwise modified while packet forwarding continues. In most networks, planned software upgrades are a significant cause of downtime. ISSU allows Cisco IOS software to be modified while packet forwarding continues, which increases network availability and reduces downtime caused by planned software upgrades. master group--An HSRP group that is required on a physical interface for the purposes of electing active and standby devices. RF--Redundancy Facility. A structured, functional interface used to notify its clients of active and standby state progressions and events. RP--Route Processor. A generic term for the centralized control unit in a chassis. RPR--Route Processor Redundancy. RPR provides an alternative to the High System Availability (HSA) feature. HSA enables a system to reset and use a standby Route Processor (RP) if the active RP fails. Using RPR, you can reduce unplanned downtime because RPR enables a quicker switchover between an active and standby RP if the active RP experiences a fatal error. RPR+--An enhancement to RPR in which the standby RP is fully initialized. standby group--The set of devices participating in HSRP that jointly emulate a virtual device. standby device--The backup device in an HSRP group. standby RP--The backup RP. switchover--An event in which system control and routing protocol execution are transferred from the active RP to the standby RP. Switchover may be a manual operation or may be induced by a hardware or software fault. Switchover may include transfer of the packet forwarding function in systems that combine system control and packet forwarding in an indivisible unit. virtual IP address--The default gateway IP address configured for an HSRP group. virtual MAC address--For Ethernet and FDDI, the automatically generated MAC address when HSRP is configured. The standard virtual MAC address used is: 0000.0C07.ACxy, where xy is the group number in hexadecimal. The functional address is used for Token Ring. The virtual MAC address is different for HSRP version 2. 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.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|