Cisco tutorial: How to optimize HSRP

This is the continue about the article called: "Implementing and Explain High Availability with HSRP." HSRP are detailed also on RFC 2281
Some situations need a specific setup, requiring the use of priority, track, preempt, and other terms, such as:

  • When the router's priority is greater than all other HSRP-configured routers in this Hot Standby group, the standby preempt interface configuration command permits it to become the active router. This instruction is included in the setups of both routers so that one router may act as a backup router for the other. If you don't include the standby preempt command in a router's setup, it won't be able to become the active router.
  • The HSRP priority of the router is set via the standby priority interface configuration command (the default priority is 100).
  • The standby timers interface configuration command sets the hello time (the interval between hello messages) to five seconds and the hold time (the amount of time a router waits before declaring the active router to be down) to eight seconds. (Three and ten seconds, respectively, are the defaults.) If you change the default settings, be sure that each router has the same hello time and hold time.
  • To change the HSRP priority for a specific group, use the standby track command to specify another interface on the router for the HSRP process to watch. The HSRP priority is decreased if the specified interface's line protocol is down. If a router has standby preempt enabled, another HSRP router with a higher priority might become the active router.
  • The setup command for the standby authentication interface creates an authentication string whose value is an unencrypted eight-character string that is included in each HSRP multicast message. This command is not required. If you use it, make sure that each HSRP-configured router in the group uses the same string so that it can authenticate the source of the HSRP messages it receives.


HSRP lab, Assume the following physical configuration:

9.3.3 Packet Tracer – HSRP Configuration Guide – Instructions Answer

Ciscozine 1 layer3 switch setup in part:

Ciscozine_1#

ip routing
interface FastEthernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk

interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk

interface FastEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk

interface FastEthernet0/3
switchport trunk encapsulation dot1q
switchport mode trunk

interface Vlan101
ip address 172.16.101.2 255.255.255.0
standby 1 ip 172.16.101.1
standby 1 priority 150
standby 1 preempt
standby 1 track FastEthernet0/3 55
standby 1 authentication C3s_101
no shutdown

interface Vlan102
ip address 172.16.102.2 255.255.255.0
standby 2 ip 172.16.102.1
standby 2 preempt
standby 2 track FastEthernet0/3
standby 2 authentication C3s_102
no shutdown

interface Vlan103
ip address 172.16.103.2 255.255.255.0
standby 3 ip 172.16.103.1
standby 3 priority 150
standby 3 preempt
standby 3 track FastEthernet0/3 50
standby 3 authentication C3s_103
no shutdown

Ciscozine 2 layer3 switch setup in part:

Ciscozine_2#

ip routing
interface FastEthernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk

interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk

interface FastEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk

interface FastEthernet0/3
switchport trunk encapsulation dot1q
switchport mode trunk

interface Vlan101
ip address 172.16.101.3 255.255.255.0
standby 1 ip 172.16.101.1
standby 1 preempt
standby 1 track FastEthernet0/3
standby 1 authentication C3s_101
no shutdown

interface Vlan102
ip address 172.16.102.3 255.255.255.0
standby 2 ip 172.16.102.1
standby 2 priority 150
standby 2 preempt
standby 2 track FastEthernet0/3 60
standby 2 authentication C3s_102
no shutdown

interface Vlan103
ip address 172.16.103.3 255.255.255.0
standby 3 ip 172.16.103.1
standby 3 preempt
standby 3 track FastEthernet0/3
standby 3 authentication C3s_103
no shutdown

The commands

switchport trunk encapsulation dot1q
switchport mode trunk
enable the dot1q trunk between the switches.

The commands

ip routing
enable the routing on the layer3 switches.

Ciscozine_1 layer3 switch is the primary device for VLAN 101 and VLAN 103 and the backup device for VLAN 102; Ciscozine_2 layer3 switch is the primary device for VLAN 102 and the backup device for VLAN101 and VLAN 103. This type of configuration permits to balance the network load.

If FastEthernet 0/3 on the main device fails, the backup device becomes the new primary device, until FastEthernet 0/3 on the backup device fails as well or the main device's FastEthernet 0/3 becomes active again. This behaviour is shown in the diagram below.

Concept of First Hop Redundancy Protocol | Engineering Education (EngEd)  Program | Section

If the Ciscozine 1 FastEthernet0/3 fails, the Ciscozine 2 becomes the active router for VLAN 101 and 103.

If Ciscozine 1 FastEthernet0/3 and Ciscozine 2 FastEthernet0/3 are unavailable, Ciscozine 1 will be the active router for VLAN 101 and VLAN 103.

Take a look at this set-up:

Now look at this configuration:

Ciscozine_1Ciscozine_2
interface Vlan103interface Vlan103
ip address 172.16.103.2 255.255.255.0ip address 172.16.103.3 255.255.255.0
standby 3 ip 172.16.103.11standby 3 ip 172.16.103.1
standby 3 priority 1502
standby 3 preempt3standby 3 preempt
standby 3 track FastEthernet0/3 504standby 3 track FastEthernet0/3
standby 3 authentication Cés_1035standby 3 authentication Cés_103

In this instance:

  • The backup IP address is 172.16.103.1, and HSRP favours the router with the greater priority, or the higher IP address if they are equal. Because it has a priority of 150, Ciscozine 1 is the active router, whereas Ciscozine 2 has a priority of 100.
  • When the priority of a bofh switch is greater than the priority of all other HSRP-configured routers in this Hot Standby group, it takes precedence to become the active router.
  • Interface tracking allows a standby group router's priority to be altered automatically depending on the availability of the router's interfaces. When a tracked interface goes unavailable, the router's HSRP priority is reduced. The HSRP tracking functionality guarantees that a router with an unavailable key interface relinquishes the active router role when correctly configured. If the Ciscozine 1 FastEthernet0/3 fails, the HSRP priority is reduced by 50, resulting in a priority of 100. (150-50). The HSRP priority of the Bofh router will be 100, and the Ciscozine 2 will be the active router since it has the higher IP address. If Ciscozine 2 FastEthernet 0/3 is unavailable, the priority of Ciscozine 2 will be reduced by 10 (the default value), resulting in a priority of 90. (100-10). The active router will then be Ciscozine 1 once again!
  • C3s 103 is the authentication key, and it is transmitted in plain text. Remember that starting with IOS 12.3(2)T, you may deliver the hashed key using MD5.


VLAN 101 and VLAN 102 follow the same pattern.

HSRP Cisco Configuration | HSRP Configuration on Cisco IOS ⋆ IpCisco
https://www.techguruhub.net/2021/06/15/cisco-tutorial-how-to-optimize-hsrp/?feed_id=1166&_unique_id=621d476408d5a

Comments

Popular posts from this blog

Need an Hosting for Wordpress? The Best WordPress Hosting Sites Providers in 2022

Need an Hosting for Wordpress? The Best WordPress Hosting Sites Providers in 2022

Getting Started with Open Shortest Path First (OSPF)