Pcornel
H3 · Practical network exams · Cisco IOS / IOS XE

HSRPv2 (IPv4/IPv6) · Finals

Configuration first, verification second, theory third. Reference templates require task-specific adaptation.

Content version 1.1-draft

Keyboard shortcuts

/ Finals search · Ctrl K global command palette · Alt E Exam Mode · Alt G Golden Scripts · Alt T Exam Topics · Alt V Verify · Esc close dialog.

Case Skills Exam

Quick explanation

HSRP provides redundant default gateways using active and standby roles. Version 2 supports IPv4 and IPv6; the IPv6 virtual gateway uses a link-local address.

Configuration

Replace highlighted placeholders. Configure only the variants required by the task.

Prerequisites and dependency links
  • Configure unique real interface addresses in the same segment.
  • Match the group, virtual address and compatible timers; create tracked objects first.
IPv4 HSRPv2 Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: hsrpv2-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
interface [INTERFACE]
 standby version 2
 standby [HSRP-GROUP] ip [VIRTUAL-IP]
 standby [HSRP-GROUP] priority [PRIORITY]
 standby [HSRP-GROUP] preempt
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[HSRP-GROUP]
Shared HSRPv2 group number; use an appropriate unused group.
[VIRTUAL-IP]
Shared HSRP virtual IPv4 address.
[PRIORITY]
Local HSRP priority.
Peer configuration — Standby peer

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: HSRP-GROUP, VIRTUAL-IP

enable
configure terminal
interface [INTERFACE]
 standby version 2
 standby [HSRP-GROUP] ip [VIRTUAL-IP]
 standby [HSRP-GROUP] priority [PEER-PRIORITY]
 standby [HSRP-GROUP] preempt
 exit
end
IPv6 HSRPv2 autoconfig Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: hsrpv2-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Ensure a real IPv6 interface address or appropriate IPv6 enabling is present before configuring HSRP.
enable
configure terminal
ipv6 unicast-routing
interface [INTERFACE]
 standby version 2
 standby [HSRP-GROUP] ipv6 autoconfig
 standby [HSRP-GROUP] priority [PRIORITY]
 standby [HSRP-GROUP] preempt
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[HSRP-GROUP]
Shared HSRPv2 group number; use an appropriate unused group.
[PRIORITY]
Local HSRP priority.
Peer configuration — Standby peer

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: HSRP-GROUP

enable
configure terminal
ipv6 unicast-routing
interface [INTERFACE]
 standby version 2
 standby [HSRP-GROUP] ipv6 autoconfig
 standby [HSRP-GROUP] priority [PEER-PRIORITY]
 standby [HSRP-GROUP] preempt
 exit
end
IPv6 HSRPv2 manual virtual link-local Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: hsrpv2-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Ensure a real IPv6 interface address or appropriate IPv6 enabling is present before configuring HSRP.
enable
configure terminal
ipv6 unicast-routing
interface [INTERFACE]
 standby version 2
 standby [HSRP-GROUP] ipv6 [VIRTUAL-LINK-LOCAL]
 standby [HSRP-GROUP] priority [PRIORITY]
 standby [HSRP-GROUP] preempt
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[HSRP-GROUP]
Shared HSRPv2 group number; use an appropriate unused group.
[VIRTUAL-LINK-LOCAL]
Shared HSRP virtual IPv6 link-local address.
[PRIORITY]
Local HSRP priority.
Peer configuration — Standby peer

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: HSRP-GROUP, VIRTUAL-LINK-LOCAL

enable
configure terminal
ipv6 unicast-routing
interface [INTERFACE]
 standby version 2
 standby [HSRP-GROUP] ipv6 [VIRTUAL-LINK-LOCAL]
 standby [HSRP-GROUP] priority [PEER-PRIORITY]
 standby [HSRP-GROUP] preempt
 exit
end
HSRP object tracking Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: hsrpv2-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
interface [INTERFACE]
 standby [HSRP-GROUP] track [TRACK-ID] decrement [DECREMENT]
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[HSRP-GROUP]
Shared HSRPv2 group number; use an appropriate unused group.
[TRACK-ID]
Local tracking object identifier.
[DECREMENT]
Amount to reduce HSRP priority when tracking fails.
Custom HSRP timers Optional when requested
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: hsrpv2-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Match on both peers.
enable
configure terminal
interface [INTERFACE]
 standby [HSRP-GROUP] timers [HELLO-SECONDS] [HOLD-SECONDS]
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[HSRP-GROUP]
Shared HSRPv2 group number; use an appropriate unused group.
[HELLO-SECONDS]
HSRP hello interval in seconds.
[HOLD-SECONDS]
HSRP hold time in seconds.

Show / Verify

Primary verification Section link
show standby brief
Example output
Vl10  10  110  P  Active  local  192.0.2.3  192.0.2.254

Confirm one active and one standby, the intended priority and virtual address.

Detailed verification Section link
show standby
Example output
State is Active
Virtual IP address is 192.0.2.254

Inspect detailed group state, timers and tracking.

Detailed verification Section link
show track
Example output
Reachability is Up

Check the tracking condition before a controlled failover test.

Connectivity verification

IPv4 reachability

Check success rate; use source or VRF context if required.

ping [DESTINATION-IP]
IPv6 reachability

Check IPv6 path and return routing.

ping ipv6 [DESTINATION-IPV6]
Source-specific IPv4

Verify from the intended source network.

ping [DESTINATION-IP] source [SOURCE-IP]
HSRP failover (disruptive)

Only when requested, deliberately fail the intended path in a controlled lab, check transition and restore it. Do not include shutdown commands in Verify All.

show standby brief
show track
ping [DESTINATION-IP]

Common mistakes

  • HSRP groups or virtual addresses differ.
  • Missing preempt when required.
  • Tracking decrement is too small to change the election.
  • IPv6 virtual address is not link-local.

Quick reference and default values

HSRP states and defaults
State or valueMeaning
ActiveCurrent virtual gateway
StandbyCandidate to take over
Listen / SpeakParticipating state/election
Priority 100Default priority
Hello 3 s / Hold 10 sCommon default timers
PreemptNot enabled by default
Remove configuration — separate, potentially disruptive actions

Remove IPv4 virtual address

Removes IPv4 HSRP on the selected group; affects redundant gateway service.

enable
configure terminal
interface [INTERFACE]
 no standby [HSRP-GROUP] ip [VIRTUAL-IP]
 exit
end

Remove tracking from group

Changes failover response.

enable
configure terminal
interface [INTERFACE]
 no standby [HSRP-GROUP] track [TRACK-ID]
 exit
end

Related reference

Networking technical reference · Interface types · Connectivity verification
Documentation references consulted

Reset checklist?

Command block

Back to Top

Confirmation

Confirm action

Continue?