Explain the VRRP linkage mechanism in detail

With the rapid popularization of networks and the deepening of related applications, various value-added services (such as IPTV, video conferencing, etc.) have been widely deployed. The reliability of the basic network has increasingly become the focus of attention of users, which can ensure uninterrupted network transmission for terminals. The user is very important.
Generally, all hosts in the same network segment are set with the same default route with the gateway as the next hop. The packets sent by the host to other network segments will be sent to the gateway through the default route, and then forwarded by the gateway, so as to realize the communication between the host and the external network. When the gateway fails, all hosts in this network segment that use the gateway as the default route will not be able to communicate with the external network. Adding an egress gateway is a common method to improve system reliability. At this time, how to select routes between multiple egresses has become a problem that needs to be solved.
The emergence of VRRP has solved this problem very well. VRRP can use multiple routing devices to form a virtual router without changing the network, and realize the backup of the default gateway by configuring the IP address of the virtual router as the default gateway. When a gateway device fails, the VRRP mechanism can elect a new gateway device to undertake data traffic, thereby ensuring reliable network communication.
As described in the Huawei official document above, when the gateway device fails, we can use the VRRP mechanism to help the network elect a new gateway to bear the data traffic forwarding. And this kind of switching is imperceptible to the user. Then let’s take a look at the scenarios where
Explain the VRRP linkage mechanism in detail
VRRP active /standby switchover will occur, as shown in Figure 1: Figure 1: VRRP failure scenario
According to Figure 1, RTA has three failure points, then these three failure points What are the failure points that will cause the switchover of VRRP active and standby?
The answer is also very simple: when fault point 1 and fault point 2 respectively fail, it will cause the switchover of VRRP master and backup, because whether it is the failure of RTA itself (that is, the failure point 2) or the downstream interface or downstream link of RTA. (I.e. failure point 1) then the RTB as the backup vrrp will not receive the VRRP notification packets sent by the RTA as the master device within the Master_Down_Interval time, then the VRRP as the backup will be re-elected as The new Master device is thus responsible for data traffic forwarding.
But think about it, if the upstream interface of RTA fails (fault point 3), then why is the switch between VRRP active and standby not triggered at this time? This is because the VRRP notification messages sent periodically by RTA can be received by RTB normally, which causes RTB to know that RTA as the Master device is still working normally. Although there is no VRRP active/standby switchover, the user can no longer communicate with the external network through the gateway RTA at this time. So how to solve this problem? So today we will explain in detail the solution to this fault-VRRP linkage mechanism.
The principle of the VRRP linkage mechanism: Use the linkage function of VRRP to monitor the uplink interface or link failure. When the uplink interface or uplink fails, the priority of the master device is actively downgraded to a level smaller than that of the backup device. Can switch between active and standby.
Next, we verify through experiments:
Explain the VRRP linkage mechanism in detail
the purpose of the experiment is to use R1 as the master of VRID group 1, and the link directly connected to R3 fails. At this time, the priority of R1 is automatically downgraded to make R2 through the linkage mechanism of vrrp. Become the new master of VRID group 1, so that PC1 can still access 3.3.3.3 of R3 through the new gateway R2.
First of all, through NAT technology, let PC1 and PC2 have access to the loopback0 address 3.3.3.3 of the ISP.
Then we do VRRP on R1 and R2 respectively. At this time, R1 is the master of vrid1 and also the backup of vrid2; and R2 is the master of vrid2 and
the configuration command of backup R1 of vrid1 :
inter g0/0/0
vrrp vrid 1 virtual-ip 192.168.0.254
vrrp vrid 1 priority 200
int g0/0/0
vrrp vrid 2 virtual-ip 192.168.0.253
R2 configuration command:
inter g0/0/0
vrrp vrid 1 virtual-ip 192.168.0.254
int g0/0/0
vrrp vrid 2 virtual-ip 192.168.0.253
vrrp vrid 2 priority 200
Finally, we will set the chain between R1 and R3 Road shutdown, at this time, it is found that PC1 cannot access R3's 3.3.3.3. At this time, we configure the VRRP linkage mechanism on R1.
The linkage mechanism configuration command of R1:
inter g0/0/0
Vrrp vrid 1 track int g0/0/1 reduced 150
At this time, because R1 is configured with linkage mechanism to monitor the upstream interface G0/0/1, when the link where the interface is located occurs After the failure, reduce the priority of R1 itself, so that R2 will switch between active and standby because its priority is higher than that of R1. In this way, R2 will become the new Master at this time, and PC1 will be able to access normally through R2 in the future. 3.3.3.3 of ISP.

Guess you like

Origin blog.51cto.com/15134242/2661077