Fault Tolerance of IP routing using HSRP (1)

Source: Internet
Author: User

For an IP network, Cisco's Hot backup Routing Protocol (HSRP, Hot Standby Routing Protocol) allows another router in the network to automatically take over the failed router when one router fails to work, so as to realize IP routing fault tolerance. The HSRP Protocol also allows two or more Routers configured with the HSRP protocol to use the MAC address and IP address of a vro.
A vro does not exist physically. It indicates a public router object that can provide them with backup fault tolerance. Figure 1 shows the Beijing CIDR Block in the WAN configured with the HSRP protocol. Each physical router is configured with the MAC address and IP address of the virtual router.
In Figure 1, the MAC address of the vro is 109c07.ac01. When HSRP is configured, the router automatically selects a virtual MAC address in the address pool of the Cisco IOS software. The virtual MAC address is within the range of the Cisco MAC address block. The Ethernet and FDDI lan use the pre-specified MAC address as the virtual MAC address, and the licensing ring LAN uses a functional address as the virtual MAC address.
In Figure 1, the default router of the host in network 192.1.1.0 is not set as router A, but as the IP address of the virtual router. When user A's workstation sends A data packet to user B's workstation located in the Guangzhou CIDR block, it sends the data packet to the MAC address of the vro.

In Figure 1, vroa A is set to an active vro. It is configured as the IP address and MAC address of the vro. All data packets sent to the vro are sent to the Guangzhou CIDR Block through the interface. As a backup router, vrob B is also configured as the IP address and MAC address of the vro. If router A stops packet forwarding for some reason and the routing protocol converges, router B takes over router A and changes it to an active router. That is to say, router B reacts to the virtual MAC address and virtual IP address. User A's workstation continues to use the IP address of the virtual router to send data packets to user B's workstation. Router B accepts the data packets and sends them to the Guangzhou CIDR Block through the Shanghai CIDR block. Until router A re-works, HSRP allows router B to provide uninterrupted communication services to users in the Beijing CIDR block. When vrob B is an active vro, vrob B performs the normal function of forwarding data packets between the Beijing and Shanghai CIDR blocks.
How HSRP works
The HSRP protocol uses a priority scheme to determine which router configured with the HSRP Protocol becomes the default active router. If a router has a higher priority than all other routers, the router becomes an active router. The default priority of a vro is 100. Therefore, if only one vro has a higher priority than 100, the vro。 becomes an active vro.
HSRP priority is broadcast between routers with HSRP protocol set. The current active router is selected by HSRP protocol. 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. Packet transmission between routers is transparent to all hosts on the network.
Vrouters configured with the HSRP protocol exchange the following three multicast messages:
◆Hello ── the hello Message notifies other routers of their HSRP priority and status information. The HSRP router sends a hello message every three seconds by default;
◆Coup -- a coup message is sent when a Standby Router changes to an active router;
◆Resign-when the active router is down or a router with a higher priority sends a hello message, the active router sends a resign message.
At any time, the router with HSRP protocol configured is in one of the following four States:
◆Active -- the router implements the packet transmission function;
◆Standby── when the active router fails, the router is ready to take over the packet transmission function;
◆Speaking and listening the vro is sending and listening for hello messages;
◆Listening-the router is Listening for hello messages.
Configure HSRP
Figure 2 shows the topology of an IP network. Two routers are configured with the HSRP protocol.


 
All hosts on the network set the IP address of the vro to 1.0.0.3. Commands for configuring the default gateway are related to the operating system, TCP/IP implementation, and configuration of the host.
The following is the configuration of vroa:

Hostname roupid! Interface ethernet 0 ip address 1.0.0.1 255.0.0.0 standby 1 ip 1.0.0.3 standby 1 preempt standby 1 priority 110 standby 1 authentication example standby 1 timers 5 15! Interface ethernet 1 ip address 3.0.0.1 255.0.0.0! The following is the configuration of router B: hostname RouterB! Interface ethernet 0 ip address 1.0.0.2 255.0.0.0 standby 1 ip 1.0.0.3 standby 1 preempt standby 1 authentication example standby 1 timers 5 15! Interface ethernet 1 ip address 2.0.0.2 255.0.0.0! Router VPN 1 network 1.0.0.0 network 2.0.0.0

The standby ip interface setting command starts the HSRP Protocol and sets 1.0.0.3 as the ip address of the vro. The configuration of the two routers contains this command, so that the two routers share the same virtual IP address. 1. Create a backup group 1. If no group number is specified, the default group number is 0 ). In the created standby group, you must have a vro to specify the IP address of the vro. Other vrouters in the standby group can specify the IP address of the vro.
The standby preempt interface setting command allows the router to become the primary router when its priority is higher than that of other routers in the group. In the configuration in this article, both routers contain this command, so that any one of the routers can become the backup router of the other router. 1 indicates that this command applies to standby group 1. If one of the vro configurations does not contain this command, the vro。 cannot be an active vro.
The standby priority interface sets the HSRP priority of the vro to 110, which is higher than the default 100 priority. In the configuration in this article, only vroa A contains this command, which makes vroa A the default active router. 1 indicates that this command applies to standby group 1.
The standby authentication interface setting command creates an 8-character plaintext authentication string, which is contained in each HSRP multicast message.
This command is optional. If used, the same authentication string must be used for each vro configured with HSRP protocol in the group to ensure that each vro can confirm the source of the received HSRP message. 1 indicates that this command is applied to standby group 1.
The standby timers interface sets the interval between the hello messages, which is called the hello time. The interval is 5 seconds; after waiting for 8 seconds, the router will announce that the default hello time and retention time of active router downtime are 3 seconds and 10 seconds respectively ). If you modify this parameter, each vro must use the same hello time and retention time. 1 indicates that this command is applied to standby group 1.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.