2

When using 4 port switching module where each port is configured to switchport access vlan ##, for HRSP should I track the vlan interface or the FastEthernet interface?

interface FastEthernet0/0/0
 switchport access vlan 10

interface Vlan10
 ip address 12.12.12.1 255.255.255.0

int FastEthernet0/1
 ip address 192.168.1.2 255.255.255.0
 standyby ip 192.168.128.1
 standby track ?? ! FastEthernet 0/0/0 or Vlan 10?
Kyle Brandt
  • 85,693

2 Answers2

3

For basic HSRP functionality, you don't have to do any tracking. HSRP failover checks IP (layer 3) reachability of the other router(s). Tracking can allow you to affect HSRP priority for more specialized circumstances such as lowering the HSRP priority when a WAN link on the same router goes down.

A basic HSRP setup could include two routers with layer 3 interfaces on the same ip network. The router with the higher HSRP priority will become 'active' and answer for the standby IP. If that router were to go offline, the other router will become active and start responding to packets sent to the standby IP.

You can set up HSRP on most types of layer 3 LAN interfaces, including physical interfaces and VLAN interfaces. You can also have independent instances of HSRP running on multiple layer 3 interfaces if you want. If there is something specific you're trying to accomplish with tracking, please elaborate.

MT.
  • 321
  • 2
  • 8
3

If you are attempting to track the WAN link and you are receiving an Ethernet hand-off from your provider, I would suggest tracking the ICMP reachability of an IP address within your service provider's network. Physical interface tracking will not help you in the case where there is an L2 failure beyond the handoff interface between you and your provider.

The first option would be to track the first hop router (I'm guessing 12.12.12.2 from your example?); a better solution would be to ask your ISP for the IP of one of their DNS servers or similar.

The way to do this is to create an IP SLA monitor operation, and create an object that tracks the state of the operation. The tracker object can then be used to decrement the HSRP priority of the LAN interface when the WAN interface goes down. This will vary depending on the code version you are running, but sample config below:

ip sla monitor 1
 type echo protocol ipIcmpEcho 12.12.12.2
 timeout 10
 frequency 5
!

ip sla schedule 1 life forever start-time now

track 123 rtr 1 state

interface FastEthernet0/1
 ip address 192.168.1.2 255.255.255.0
 standby 1 ip 192.168.128.1
 standby 1 priority 105
 standby 1 preempt
 standby 1 track 123 decrement 10
!

In summary, this:

  • Creates an IP SLA operation that performs an ICMP echo targeted at 12.12.12.2, with a timeout of 10 milliseconds, with an interval of 5 seconds between probes.
  • Schedules the IP SLA operation to run forever.
  • Creates a tracking object which tracks the state of the IP SLA operation.
  • Configures interface Fa0/1 with an HSRP address; configures HSRP to preempt; and configures HSRP to decrement its priority by 10 should the tracking object associated with the ICMP IP SLA monitor enter a down state.

This is very rough config based on referring to CCO; I will see if I can find something a little more polished in my notes.

Murali Suriar
  • 10,406