The so-called Hot Standby Routing Protocol (HSRP) mainly provides us with such a mechanism, and its design purpose is mainly to support uninterrupted service in the case of IP transmission failure. Specifically, this protocol is used to prevent the failure of the first-hop route when the source host cannot dynamically learn the IP address of the first-hop router. It is mainly used for multi-access, multicast, and broadcast local area networks (for example Ethernet). go now
1. Purpose of HSRP
The purpose of the Hot Standby Routing Protocol (HSRP) is to make the host appear to be using only one router and maintain routing connectivity even if the first-hop router it is currently using fails.
2. Knowledge points involved in HSRP
Virtual router – The multiple routers involved in this protocol is mapped as virtual routers. This protocol guarantees that there is one and only one router at the same time sending packets on behalf of the virtual router. The terminal sends the data packet to the virtual router. The router that forwards the packet is called the active router. If the active router fails for some reason at some point, the backup router will be chosen to replace the original active router.
This protocol provides a mechanism for the definition of active routers and backup routers. The IP address is used on the router designed by the protocol. If the active router fails, the backup router will immediately replace the active router without causing a major interruption to the connectivity to the host.
Backup Group – When using HSRP, the work of a set of routers will consistently behave as the work of a virtual router on the LAN to the host. This group of routers is called an HSRP group, or backup group. A router in this group will be selected to be responsible for forwarding packets sent by the host to the virtual router. This router is the so-called live router. Another router will be selected as the backup router. When the active router fails, the backup router will assume the packet forwarding function of the active router. Even though you can arbitrarily specify the number of routers running HSRP, only live routers can forward packets destined for virtual routers.
Priority, Preemption – The HSRP protocol uses a priority scheme to determine which router configured with the HSRP protocol becomes the default active router. Configure the priority on the port with the higher priority.
3. The working principle of HSRP
The HSRP protocol utilizes a priority scheme to determine which router configured with HSRP becomes the default active router. A router becomes an active router if its priority is set higher than that of all other routers. The default priority of a router is 100, so if only one router is set with a priority higher than 100, and the port with the higher priority is configured to take precedence, the router will become the active router. When the active router cannot send hello messages within a preset period of time, the standby router with the highest priority becomes the active router and complete the task of forwarding data. continue reading this