Tuesday, September 20, 2016


HSRP Operation

HSRP which stand for ‘Hot Standby Router Protocol” is considered to be a “First Hop Redundancy Protocol” or FHRP.
Notice here PC1 on Picture, it has an ip address of, and it has default gateway of, what is that default gateway. Well that default gateway is typically the ip address of a router. A Router that’s gonna get PC1 of its local subnet may be out of the internet, and that information that PC1 may have learned via DHCP. Do you see that default gateway that router could become a single point of failure? If that router went down suddenly, the PC is limited to communicating to its local subnet. It cannot go beyond its local subnet.                           
                        That’s where the FHRP like HSRP can help us out. HSRP is a Cisco Proprietary FHRP. That default gateway that the PC is pointing to is, But as we examined the IP addresses on these Multilayer switches. We don’t see

                 In multiplayer switch SW2 fast Ethernet 0/3 is a routed interface and its ip address is, fastEthernet 0/3 is also routed interface on multilayer switch SW3 and its ip address Who servicing packet that destined for, Notice on picture I got a Virtual Router.
This “Virtual or Phantom Router” is the Router that the PC is logically using, and HSRP allows one router which is currently SW2 to service the Active Router, and it’s gonna be able to service packets that are destined for and route them where they need to go.
                        We talk about FHRP, we typically referred to the devices that are running those protocol as router. But in Today Modern networks many time are default gateway to which our PC’s pointing are switches.
Those type of switches would be multilayers or Layer3 Switches.SW2 and SW3, they Multilayer Switch, they acting as Router.
                           Right now, if a packet is destined for this virtual ip address of, is gonna be handled by switch SW2. And we were to take a look that frame coming from that PC1, it’s not just destined for ip address of, also corresponding to mac-address. That’s the PC is learned via an ARP by sending out an Address Resolution Protocol query to say “Hey somebody tell me the mac-address for”, the PC learned that and it stored in that ARP Cache”.
                               So switch SW2 is not only acting like, it’s also acting if it has that mac-address that correspond to, and of course the main point of a FHRP is to make that first Hop that default gateway redundant.

Let’s say that something happens to switch SW2.It goes down, suddenly it’s no longer active Router.
              SW3 transition from its standby state into Active State.
It can start servicing packets that destined for, and not just that ip address. But the mac-address corresponding to that ip address. That’s the magic of HSRP
                            But the question comes up how that switch SW3 know that Switch SW2 is no longer available. Well with HSRP Hello Messages exchanged.
                               And the default time for that is every 3 seconds.
We gonna send a hello message, and if switch SW3 knowing that it was the Standby Router did not here from the Active Router for certain period of time called Hold Time.
it can conclude that switch SW2 is no longer available and switch SW3 then transition to the Active State. And it starts acting as that virtual Router and I said that the default hello interval was 3 seconds, and the hold timer by default is 10 seconds. We can change it manually if needed.
                Another Scenario, Let’s say that SW2 is up but the link between SW2 and internet goes down.
If that happens, can SW2 still send Hello Message to SW3.It sure can, and is result SW3 might remain in the standby state.
                        Well clearly SW2 is not is the best path to get off to our local subnet. Fortunately, HSRP has a feature called interface tracking.
                    It can monitor the state of an interface in this case It would be interface fastEthernet 0/1, and if that interface went down. HSRP could dynamically change the priority on that switch.
                     By default, the Router, the Multilayer switch that becomes the Active Router, is the router that has the highest “HSRP Priority” the default priority value is “100” and we can change it manually for became the “Active Router”.
                                With interface tracking we can have “if that interface goes down” then “decrement/reduce the priority by a certain value” in HSRP single group.
                          Let’s take step further, let’s imagine that SW2 reestablish connectivity with the internet, somebody goes in, they repaired that link, SW2 is back and action now. Is it going to regain its active role? Interestingly by default the answer in no. Even though that interfaces backup, even though the priority wins back to its original higher value. It still gonna be in the standby state. That’s the default behavior. That often not what we want to do however. A feature that allows us to overwrite the default behavior it’s called the “Preempt option”.
The “Preempt option” essentially says “that if this router, stop becoming Active Router and it has reason to become the active router again, maybe we rebooted it, may be link was repaired”. The preempt option say “I want to have my old job back, and it’s going to regain that Active Role”. It’s going to send a message over to Switch SW3 saying that “I am taking back control, I am becoming the Active Router again”.
                One another Scenario, we just said that if Switch SW2 lost physically connectivity with the internet, another word interface fast Ethernet 0/1 went down. Then it could decrement its Priority.
                  What if, its connection to the internet was compromised but not because that interface went down, may be the ISP which it was connected had issue, may be the metric to get to a particular route became less desirable? We can do use a feature called “Enhanced Object Tracking”.
We can get really advanced with “Object Tracking”. We can say things like “if this route no longer appears in the Routing Table, then decrement the Priority”, or we can say “if the Metric gets me to this route, exceed the certain value then decrement the Priority”.
                  Now we talk about Theory of HSRP Operation. Join me our Next Topic and we gonna take a look in Configuration of HSRP.
If You Like the Post. Don’t forget to “Subscribe/Share/Comment”. Thank You.