5 Replies Latest reply: Apr 17, 2012 4:59 AM by Mohit Kansal CCIE RS RSS

    HSRP - Sub Interface




      I've a router which is configured with HSRP.


      Gi0/0 - HSRP Configured

      Gi0/1 - Sub Interface Created, Configured HSRP for each sub interface.


      Only when i switch off this router, Router 2 is becoming active.


      Because, Lets say Gi0/0 is shutdown, When you give show standy, it'll show as State is Init (interface down) for Gi0/0 in Router 1 & for all the sub interfaces it'll be active, but Router 2 will be active for Gi0/0, & gi0/1 will be standby for all the sub interfaces because, Router 1 subinterfaces are still active.


      The only way we can fix this is to track the gi0/0, so that gi0/0 for LAN RTR1 becomes standby, so that it allows router 2 to become active.


      I tried giving the track interface command in the subinterface, but it didnt work.


      Any assistance would really of good help.



        • 1. Re: HSRP - Sub Interface

          Hi Uday,

          What HSRP configuration are you using on the sub-interface and what are you tracking?



          • 2. Re: HSRP - Sub Interface

            Hi Matt,


            Thanks for your reply. Here is the sample config for Router 1. It's the same config for Router 2 also.


            interface GigabitEthernet0/0
            ip address x.x.x.x x.x.x.x
            no ip unreachables
            no ip proxy-arp
            standby 10 ip x.x.x.x
            standby 10 timers 3 5
            standby 10 priority 120
            standby 10 preempt
            duplex full
            speed 1000
            media-type rj45
            interface GigabitEthernet0/1
            no ip address
            duplex auto
            speed auto
            interface GigabitEthernet0/1.1
            encapsulation dot1Q 501
            ip address x.x.x.x x.x.x.x
            no ip redirects
            no ip unreachables
            no ip proxy-arp
            standby 20 ip x.x.x.x
            standby 20 timers 3 5
            standby 20 priority 120
            standby 20 preempt

            interface GigabitEthernet0/1.2
            description vlan-502-user VLAN
            encapsulation dot1Q 502
            ip address x.x.x.x x.x.x.x
            no ip redirects
            no ip unreachables
            no ip proxy-arp
            standby 30 ip x.x.x.x
            standby 30 timers 3 5
            standby 30 priority 120
            standby 30 preempt

            • 3. Re: HSRP - Sub Interface

              Try configuring IP SLA to decrement the sub interfaces HSRP priority if the G0/0 interface goes down.

              I think something along these lines should work...


              ip sla 10

                   icmp-echo <g0/0 ip address>

              ip sla schedule 10 start-time now life forever

              track 100 rtr 10 state


              int g0/1.1

              standby 20 track 100 decrement 50


              You can do something similar for the other sub-interface then.

              Let me know how you get on.




              • 4. Re: HSRP - Sub Interface
                Scott Morris - CCDE/4xCCIE/2xJNCIE

                The SLA tracking as noted gives you the granularity that you want other than something locally attached.


                But either way, the mechanism is to track something and then decrement your priority based on that information.


                But any one interface going down, if it doesn't directly affect the communications of each other link, then HSRP won't change by itself. 



                • 5. Re: HSRP - Sub Interface
                  Mohit Kansal  CCIE RS

                  Hi Uday,


                  I am not sure which IOS you are using. It works on sub interface.


                  interface FastEthernet2/0.1

                  encapsulation dot1Q 1 native

                  ip address

                  standby 1 track FastEthernet3/0



                  Mohit Kansal