CCNA : HSRP
HSRP (Hot Standby Router Protocol), is a networking protocol used to provide high availability and redundancy for routers in a network.
HSRP is a Cisco proprietary protocol which has similar features to non proprietary protocol #VRRP.
Imagine you have a network with multiple routers that are connected to the internet. These routers are responsible for directing traffic between different devices in the network and the internet. Now, if one of these routers fails or experiences a problem, it can cause disruption in the network, leading to downtime and loss of connectivity.
To prevent such disruptions, HSRP comes into play. #HSRP allows you to set up a group of routers, where one router is designated as the primary router, and the others are standby routers. The primary router handles all the network traffic as long as it's functioning properly. However, if the primary router fails or experiences an issue, one of the standby routers will automatically take over its responsibilities and start forwarding traffic.
The standby routers continuously monitor the primary router's status using a heartbeat mechanism. If they detect that the primary router is no longer active, one of them will be elected as the new primary router, ensuring that the network remains up and running. This failover process happens seamlessly and transparently to the devices connected to the network, so they don't experience any interruption in their connectivity.
HSRP also provides a virtual IP address, which is shared among the routers in the group. This virtual IP address acts as the default gateway for devices in the network, allowing them to send and receive data. So, even if the active router changes due to a failure or other issues, the virtual IP address remains constant, and devices can continue communicating without needing to update their settings.
HSRP = Hot Standby Router Protocol = redundancy protocol for establishing a fault-tolerant default gateway. Cisco proprietary. Deployed in active/standby pair. (most common)
VRRP = Virtual Router Redundancy Protocol : Open standard. Deployed in active/standby pair. Very similar to HSRP.
GLBP = Gateway Load Balancing Protocol : Cisco propriety. Supports active/active load balancing across multiple routers.
HSRP Operations
R1(config)#int g0/0/0
R1(config-if)# ip address 192.168.100 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)#standby 1 ip 192.168.1.1
R1(config-if)#standby 1 name HSRP_Test
R1(config-if)#standby 1 priority 110
R1(config-if)#standby 1 preempt
R2(config)#int g0/0/0
R2(config-if)# ip address 192.168.1.50 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)#standby 1 ip 192.168.1.1
R2(config-if)#standby 1 name HSRP_Test
!!No priority setting as default is 100 – this makes R1 the priority, but if R1 goes down it R2 will take over despite having a lower priority.?
Shutting down G0/0/0/0 (Below) interface brings R2 up as redundant router.
-?????????Each router send each other hello/keep alive messages to check if the other is still up, if not then the alive router will take ownership of 192.168.1.1
Summary
HSRP helps ensure that your network remains operational even if one of the routers fails. It provides redundancy and high availability by automatically switching over to standby routers when needed, keeping the network running smoothly.