Friday, December 4, 2015

HSRP

HSRP
Hot Standby Router Protocol is cisco proprietary protocol known as First hop Redundancy Protocol
one router or multi-layer switch that actively forwards traffic out of a subnet which called an active-router. If the active router becomes unavailable the second router can detect the absence of an active router and it becomes the active router which called the standby router (Backup router).

HSRP Operation
Clients configured with default gateway that is neither active or standby configured with, which means there is a virtual gateway ip address that clients point to along with virtual MAC address
Virtual Router which often called phantom router that have the actual gateway ip address clients point to.

How HSRP functions
Hello messages used to elect an active router and to inform the standby router that the active router is still available.
Hello messages sent out every 3 seconds, there is also Holdertime Timer (a time after which the standby router becomes that active router (default of 10 senconds)
HSRP ver 2 Holdtimer can be configured in milliseconds, that is how standby router can determine an active router has gone down.

Active Router Election 
The router or multi-layer switch with the highest priority is elected as the active router (default priority is 100)

Tracking option
Allows an HSRP router to monitor a network condition such as interface status, and decrements its priority based on that condition.

Preeampt Option
HSRP's preempt option allows a router that was previously the active router to reclaim its rule active router, if it goes down and comes a backup.


Configuring HSRP

R1(config-if)#stan
R1(config-if)#standby 10 ip 10.1.1.1
R1(config-if)#
*Dec  4 19:35:18.983: %HSRP-5-STATECHANGE: FastEthernet0/1 Grp 10 state Standby -> Active

R2(config-if)#standby 10 ip 10.1.1.1
R2(config-if)#
*Dec  4 20:16:50.203: %HSRP-5-STATECHANGE: FastEthernet0/1 Grp 10 state Speak -> Standby




R2(config-if)#standby 1 ip 10.1.1.1
R2(config-if)#
*Mar  1 00:05:32.695: HSRP: Fa0/1 Grp 1 Disabled -> Init
*Mar  1 00:05:32.695: HSRP: Fa0/1 Grp 1 Redundancy "hsrp-Fa0/1-1" state Disabled -> Init

R2(config-if)#
*Mar  1 00:05:42.699: HSRP: Fa0/1 Grp 1 Active router is 10.1.1.2
*Mar  1 00:05:42.699: HSRP: Fa0/1 Interface up
*Mar  1 00:05:42.699: HSRP: Fa0/1 Starting minimum interface delay (1 secs)
*Mar  1 00:05:43.699: HSRP: Fa0/1 Interface min delay expired
*Mar  1 00:05:43.699: HSRP: Fa0/1 Grp 1 Init: a/HSRP enabled
*Mar  1 00:05:43.699: HSRP: Fa0/1 Grp 1 Init -> Listen
*Mar  1 00:05:43.699: HSRP: Fa0/1 Grp 1 Redundancy "hsrp-Fa0/1-1" state Init -> Backup
*Mar  1 00:05:53.699: HSRP: Fa0/1 Grp 1 Listen: d/Standby timer expired (unknown)
*Mar  1 00:05:53.699: HSRP: Fa0/1 Grp 1 Listen -> Speak
*Mar  1 00:05:53.699: HSRP: Fa0/1 Grp 1 Redundancy "hsrp-Fa0/1-1" state Backup -> Speak
*Mar  1 00:06:03.775: HSRP: Fa0/1 Grp 1 Speak: d/Standby timer expired (unknown)
*Mar  1 00:06:03.775: HSRP: Fa0/1 Grp 1 Standby router is local
*Mar  1 00:06:03.775: HSRP: Fa0/1 Grp 1 Speak -> Standby
*Mar  1 00:06:03.775: HSRP: Fa0/1 Grp 1 Redundancy "hsrp-Fa0/1-1" state Speak -> Standby
R2(config-if)#

Standby Content Help
R2(config-if)#standby ?
  <0-255>         group number
  authentication  Authentication
  delay           HSRP initialisation delay
  ip              Enable HSRP and set the virtual IP address
  mac-address     Virtual MAC address
  name            Redundancy name string
  preempt         Overthrow lower priority Active routers
  priority        Priority level
  redirects       Configure sending of ICMP Redirect messages with an HSRP
                  virtual IP address as the gateway IP address
  timers          Hello and hold timers
  track           Priority tracking
  use-bia         HSRP uses interface's burned in address

R2(config-if)#standby 1 ?
  authentication  Authentication
  ip              Enable HSRP and set the virtual IP address
  mac-address     Virtual MAC address
  name            Redundancy name string
  preempt         Overthrow lower priority Active routers
  priority        Priority level
  timers          Hello and hold timers
  track           Priority tracking

R1#show standby brief 
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP  
Fa0/1       1   100    Active   local           10.1.1.3        10.1.1.1    
R1#

R2#show standby brief 
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP  
Fa0/1       1   100    Standby  10.1.1.2        local           10.1.1.1    
R2#


R2(config-if)#
*Mar  1 00:39:03.035: HSRP: Fa0/1 Grp 1 Coup   in  10.1.1.2 Standby pri 110 vIP 10.1.1.1
*Mar  1 00:39:03.035: HSRP: Fa0/1 Grp 1 Active: j/Coup rcvd from higher pri router (110/10.1.1.2)
*Mar  1 00:39:03.035: HSRP: Fa0/1 Grp 1 Active router is 10.1.1.2, was local
*Mar  1 00:39:03.035: HSRP: Fa0/1 Grp 1 Standby router is unknown, was 10.1.1.2
*Mar  1 00:39:03.039: HSRP: Fa0/1 Grp 1 Active -> Speak
*Mar  1 00:39:03.039: %HSRP-6-STATECHANGE: FastEthernet0/1 Grp 1 state Active -> Speak
R2(config-if)#
*Mar  1 00:39:03.039: HSRP: Fa0/1 Grp 1 Redundancy "hsrp-Fa0/1-1" state Active -> Speak
R2(config-if)#
*Mar  1 00:39:13.035: HSRP: Fa0/1 Grp 1 Speak: d/Standby timer expired (unknown)
*Mar  1 00:39:13.035: HSRP: Fa0/1 Grp 1 Standby router is local
*Mar  1 00:39:13.035: HSRP: Fa0/1 Grp 1 Speak -> Standby
*Mar  1 00:39:13.035: HSRP: Fa0/1 Grp 1 Redundancy "hsrp-Fa0/1-1" state Speak -> Standby
R2(config-if)#
*Mar  1 00:39:26.131: HSRP: Fa0/1 Grp 1 Standby: h/Hello rcvd from lower pri Active router (80/10.1.1.2)
*Mar  1 00:39:26.131: HSRP: Fa0/1 Grp 1 Active router is local, was 10.1.1.2
*Mar  1 00:39:26.131: HSRP: Fa0/1 Grp 1 Standby router is unknown, was local
*Mar  1 00:39:26.135: HSRP: Fa0/1 Grp 1 Coup   out 10.1.1.3 Standby pri 100 vIP 10.1.1.1
*Mar  1 00:39:26.135: HSRP: Fa0/1 Grp 1 Standby -> Active
*Mar  1 00:39:26.135: %HSRP-6-STATECHANGE: FastEthernet0/1 Grp 1 state Standby -> Active
R2(config-if)#
*Mar  1 00:39:26.135: HSRP: Fa0/1 Grp 1 Redundancy "hsrp-Fa0/1-1" state Standby -> Active
*Mar  1 00:39:26.243: HSRP: Fa0/1 Grp 1 Resign in  10.1.1.2 Speak   pri 80 vIP 10.1.1.1
*Mar  1 00:39:26.243: HSRP: Fa0/1 Grp 1 Active: i/Resign rcvd (80/10.1.1.2)
*Mar  1 00:39:26.243: HSRP: Fa0/1 Grp 1 Coup   out 10.1.1.3 Active  pri 100 vIP 10.1.1.1
R2(config-if)#
*Mar  1 00:39:29.247: HSRP: Fa0/1 Grp 1 Redundancy group hsrp-Fa0/1-1 state Active -> Active
R2(config-if)#
*Mar  1 00:39:32.247: HSRP: Fa0/1 Grp 1 Redundancy group hsrp-Fa0/1-1 state Active -> Active
R2(config-if)#
*Mar  1 00:39:37.895: HSRP: Fa0/1 Grp 1 Standby router is 10.1.1.2


R1#show standby
FastEthernet0/1 - Group 1
  State is Active
    14 state changes, last state change 00:00:41
  Virtual IP address is 10.1.1.1
  Active virtual MAC address is 0000.0c07.ac01
                  Cisco Vender Code HSRP Ver 1.0 Group#<0-255>     group number
                                                    0000.0c9f.f001
                  Cisco Vender Code HSRP Ver 2.0 Group#  <0-4095> group number
    Local virtual MAC address is 0000.0c07.ac01 (default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.468 secs
  Preemption enabled
  Active router is local
  Standby router is 10.1.1.3, priority 100 (expires in 9.804 sec)
  Priority 110 (configured 110)
    Track interface FastEthernet0/0 state Up decrement 30
  IP redundancy name is "hsrp-Fa0/1-1" (default)

R2#show ip arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  10.1.1.3                -   c002.1640.0001  ARPA   FastEthernet0/1
Internet  10.1.1.1                -   0000.0c07.ac01  ARPA   FastEthernet0/1
Internet  192.168.14.2            0   0050.56e8.e3c1  ARPA   FastEthernet0/0
Internet  10.1.1.100             44   0050.7966.6800  ARPA   FastEthernet0/1
Internet  192.168.14.254         32   0050.56fd.eee2  ARPA   FastEthernet0/0
Internet  192.168.14.141          -   c002.1640.0000  ARPA   FastEthernet0/0

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.