HSRP: CONCEPT: GENERAL


TOPICS:

ACTIVE AND STANDBY

PREEMPT

TRACKING

HSRP STATES

HSRP MECHANISM

 

Scenario:

general

 

ACTIVE AND STANDBY CONCEPT

In a group, one router is active and one router is standby.

Active is router with higher priority and Standby is router with lower priority

Default priority is 100

Active router carries traffic of VLAN or subnet.

Standby simply wait and watch.

Default behavior of HSRP

When R1 goes down, R2 becomes Active and there is no standby

When R1 comes up again, R1 still act as standby (even R1 is having higher priority). But, comparison will not take place until the Active router goes down

When R2 goes down, then priority compared and R1 again becomes Active

Conclusion:

Initially, One router becomes Active and One becomes Standby

After that in any scenario, comparison takes place only when Active router goes down

 

PREEMPT

Key Point: At any point of time, Router with higher priority becomes active

Compare with above scenario,

When R1 goes down, R2 becomes Active and there is no standby

When R1 comes up again, R1 immediately becomes Active again (R1 will not wait for R2 to go down)

 

TRACKING

Till now, HSRP behavior works fine if the Device goes down.

Catch is:

When R1 interface connecting to Internet goes down.

Here, both the routers, R1 and R2 are up. So, they keep on exchanging Hello messages and will remain showing default behavior of HSRP

Now, Traffic from host will go to R1 (acting as Active) and will get dropped

Solution is Tracking

Here, Tracking means tracking the interface of devices. So, when connected interface goes down

Priority of R1 gets decreased

What is the effect of decreasing priority of R1?

By default, priority gets decreased by value of 10 per interface

After decrement, priority of R1 becomes 100. So, it is a tie between R1 and R2

Solution is to configure priority decrement to be 20/interface

So, now priority got decreased by 20

After decrement, priority of R1 is 90

Now, we got the solution. Priority of R1 is less than R2. R2 becomes Active as required

 

HSRP STATES

  1. Initial

This is the starting state and indicates that HSRP is not running. This state is entered via a configuration change or when an

Interface first comes up.

  1. Learn

The router has not determined the virtual IP address, and not yet Seen an authenticated Hello message from the active router. In

This state the router is still waiting to hear from the active Router.

  1. Listen

The router knows the virtual IP address, but is neither the active. Router nor the standby router.  It listens for Hello messages from

Those routers.

  1. Speak

The router sends periodic Hello messages and is actively participating in the election of the active and/or standby router.

A router cannot enter Speak state unless it has the virtual IP address.

  1. Standby

The router is a candidate to become the next active router and sends periodic Hello messages.  Excluding transient conditions,

there MUST be at most one router in the group in Standby state.

  1. Active

The router is currently forwarding packets that are sent to the group’s virtual MAC address.  The router sends periodic Hello

messages.  Excluding transient conditions, there MUST be at most one router in Active state in the group.

 

HSRP MECHANISM

Standby group or Virtual router is created using configuration “Standby  <group number>  ip  <virtual ip>”

When a host sends traffic for a destination, This first goes to the Virual router.

Then, this virtual router depending on the concerned VLAN send ARP request futher to the Active router and

get the MAC address of Active router and respond back with the MAC address of Active router

Now, traffic from host goes to the Active router

Note: For each group, there is one virtual IP address and one virtual MAC

 

Mechanism In Case Of Failure

Two Scenarios:

HSRP mechanism triggers Standby to Active if,

  1. Active  Device goes down: Then, simply device going down do not participate in Active /Standby election. There is no change in priority

  2. If interface of Active device connecting further to uplink goes down. Then, Using Tracking concept priority gets decreased.

By comparision of priority, Active is re-elected

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s