Tracking default route with HSRP

I have been pulling my hair out trying to figure how I can successfully track a default route when trying to tie that feature to HSRP.

When doing a show ip route, I can see the default route is in the routing table but when I set up the following configuration on my 3560 switches, the HSRP and Track feature report the default route is not reachable. What am I doing wrong and is there a better way to be doing this?

track 1 ip route 0.0.0.0 0.0.0.0 reachability
!
interface vlan 10
standby 1 ip 10.1.1.1
standby 1 preempt
standby 1 track 1
standby 1 priority 105
standby 1 decrement 10

when showing hsrp "show standby", the tracked object "track 1" shows failed or not reachable. Any thoughts how I can successfully track the default route in my routing table? I know this scenaro works if I try other subnets or even an interface. Just no luck with the default-route.

Comments

  •  If you want to use the reachability, you would track the next hop ip.  So you would use

    #ip route 0.0.0.0 0.0.0.0 [next-hop-ip] track 1

    #track 1 ip route [next-hop-ip] reachability

     

  • when showing hsrp "show standby", the tracked object "track 1" shows failed or not reachable. Any thoughts how I can successfully track the default route in my routing table? I know this scenaro works if I try other subnets or even an interface. Just no luck with the default-route.

    I assume that the default route is being learnt via a dynamic routing protocol?

    I have done a similar configuration traffic the default route with HSRP on a router with no problems - so maybe try moving to a different device.  The other way to do this in the real world would be to use an IP SLA and apply this to a track.  Then apply the track to a dummy static route, and finally track it's reachability via a different tracked object.

  • You are correct, the default route is being learned dynamically via OSPF. I just tried the same scenario on a topology with several 3800 routers and I still can't seem to get the track to work right with HSRP when tracking the default route.

    To confirm, I just have track 1 track 1 ip route 0.0.0.0 0.0.0.0 reachability command but I do not have anthing additional (such as an SLA).

    Should I also configure an IP SLA to make this work? If so, what would such example look like if I needed to track the default route being learned via OSPF?

  • hi ,

    i just tried this on my rack and it works fine ..

     

    R3 - R2 - SW2 ...

     

    R3 has the follwoing config 


    !

    router ospf 1

     log-adjacency-changes

     default-information originate always



    SW2 sees the default from R3 , via R2



    Rack1SW2#sh ip route

    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPF external type 2

           i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidate default, U - per-user static route

           o - ODR, P - periodic downloaded static route


    Gateway of last resort is 1.1.1.2 to network 0.0.0.0


         1.0.0.0/24 is subnetted, 1 subnets

    C       1.1.1.0 is directly connected, Vlan10

         10.0.0.0/24 is subnetted, 1 subnets

    O       10.10.10.0 [110/65] via 1.1.1.2, 00:03:19, Vlan10

    O*E2 0.0.0.0/0 [110/1] via 1.1.1.2, 00:03:19, Vlan10

    Rack1SW2#




    SW2 config 




    track 1 ip route 0.0.0.0 0.0.0.0 reachability



    interface Vlan10

     ip address 1.1.1.9 255.255.255.0

     ip ospf 1 area 0

     standby 1 ip 1.1.1.254

     standby 1 preempt

     standby 1 track 1





    Rack1SW2#sh stand

    Vlan10 - Group 1

      State is Active

        2 state changes, last state change 00:03:00

      Virtual IP address is 1.1.1.254

      Active virtual MAC address is 0000.0c07.ac01

        Local virtual MAC address is 0000.0c07.ac01 (v1 default)

      Hello time 3 sec, hold time 10 sec

        Next hello sent in 2.732 secs

      Preemption enabled

      Active router is local

      Standby router is unknown

      Priority 100 (default 100)

        Track object 1 state Up decrement 10

      IP redundancy name is "hsrp-Vl10-1" (default)


    you say your running this on 3800`s ,  are you running HSRP on the routers or on some switches


    i am using 


    Cisco IOS Software, 3700 Software (C3725-ADVIPSERVICESK9-M), Version 12.4(6)T, R                  



    Rack1R2#conf t

    Enter configuration commands, one per line.  End with CNTL/Z.

    Rack1R2(config)#int vlan 20

                         ^

    % Invalid input detected at '^' marker.


    Rack1R2(config)#



    HTH 






  • To confirm, I just have track 1 track 1 ip route 0.0.0.0 0.0.0.0 reachability command but I do not have anthing additional (such as an SLA).

    No you shouldn't anything else this command simply look at the routing table for the relevant route.  If it exists the track will be up other it will be down.  I have used your particular scenario in production.  In one case tracking the default route installed by when a PPPoA session is up, on the other tracking a core prefix which was installed in the routing table via BGP.  In fairness both of these cases are in version 15 code running on 887 and 2900 routers.

    One thing you could try is seeing if it works for a different route. You could also try debug track to see if this shows anything?

    The option would be to see what happens if you install a static default route and then remove it?

  • Thank you for confirming that you were able to get it to work. Perhaps I will try a different set up over the weekend to see if I can get successful results.

  • Thank you for confirming that you were able to get it to work. Perhaps I will try a different set up over the weekend to see if I can get successful results.

    hi ciscoquad

     I faced the exact same issue on a Catalyst 3560 running IOS 12.2(44)SE6
     Tracking routes is always down.

     I did not search for Cisco bugID but I consider this is an IOS issue as the exact same configuration is working well on 3560 with 12.2(46) IOS
     If you use the same IOS version, you should consider an upgrade

  • Exactly the same here... 

    I have tried in:

    Cisco IOS Software, C3750 Software (C3750-ADVIPSERVICESK9-M), Version 12.2(44)SE2, RELEASE SOFTWARE (fc2)

    Cisco IOS Software, C3550 Software (C3550-IPSERVICESK9-M), Version 12.2(44)SE2, RELEASE SOFTWARE (fc2)

    Maybe something related to the catalyst plattform?

     

    Regards. 

  • I just try on router (GNS3) and everything is fine.


    ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

    track 1 ip route 0.0.0.0 0.0.0.0 reachability



    S*   0.0.0.0/0 is directly connected, FastEthernet0/0


     standby 1 track 1 decrement 100


    Track 1

      IP route 0.0.0.0 0.0.0.0 reachability

      Reachability is Up (static)

        1 change, last change 00:00:57

      First-hop interface is FastEthernet0/0

      Tracked by:

        HSRP FastEthernet0/0 1




    Maybe is because of the switch. Did u try on routers?

  • I tried on routers and work fine, even in 3560. It seems there's an issue related to am IOS version in particular.

    Best regards for my paisano. I am also from Sevilla, but living gin Madrid currently. 

  • I think this is because of switch. I know how to track a phone number by this.

Sign In or Register to comment.