1 VRRP concept Introduction
VRRP is short for Virtual Router Redundancy Protocol ). To understand VRRP, determine the following terms:
● VRRP router: the router that runs the VRRP protocol. This vro can be one or more virtual routers.
● Virtual router: an abstract object managed by VRRP protocol, used as the default router of a host in a shared LAN. It consists of a vro identifier (VRID) and a group of associated IP addresses in the same LAN. One VRRP router can back up one or more vrouters.
● IP address owner: the router that uses the interface address of the LAN as the IP address of the virtual router. When running, the router will respond to the packet destined for the IP address.
● Primary vro: The VRRP router will undertake the following tasks: forward packets destined for the IP address associated with the vro and respond to ARP requests for the IP address. Note: If the IP address owner exists, the owner is always the primary vro.
● Backup vro: A group of available VRRP routers. If the primary vro fails, the vro will be forwarded by the primary vro.
2 Working Mechanism of VRRP
VRRP groups multiple router interfaces in the same broadcast domain into a group to form a vro and assign an IP address to it as the interface address of the vro. The vro interface address can be either the address of one of the vro interfaces or a third-party address.
If you use the vro interface address as the VRRP virtual address, the vro with this IP address will act as the primary router, and other vrouters will act as backups. If a third-party address is used, the router with the highest priority is the primary router. If the two routers have the same priority, whoever sends the VRRP packet will become the primary router.
1. In the host in the broadcast domain, set the IP address of the vro as the gateway. When the primary router fails, the router with the highest priority will be selected in the Standby Router to take over, which has no impact on the hosts in the domain.
Only when all vrouters in this VRRP group cannot work normally can the hosts in this domain be unable to communicate with the outside world.
However, another problem occurs. If the uplink link of the Master router in the VRRP group is disconnected, the status of the router will not change, or the Master, in this case, the host routing in this domain still follows this router, but the host in this domain cannot communicate with the outside world due to its disconnection of the uplink. Therefore, the uplink status detection is added to VRRP to solve this problem.
Configure a VRRP group to track the link status of a track. If the interface status changes from up to down, the priority is automatically reduced. If the interface status changes from down to down, the priority is automatically increased, to speed up the active/standby election of vrrp.
We can also group these routers into multiple groups so that they are mutually backed up. hosts in the domain use different IP addresses as gateways to achieve load balancing of data.
3. The following is a case to show you how VRRP is used in enterprises. See the following topology:
4. experiment process:
R2 Configuration:
Sw1 Configuration:
Sw2 Configuration:
Test results:
Pc2:
Pc2 Internet test:
Pc1 Test Result:
Tracking result: