Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP?

2024/05/1509:50:33 technology 1208
Hello

, this is the Network Technology Alliance site.

VRRP is a commonly used fault-tolerant protocol, which can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail.

Let’s get started!

What is VRRP?

  • Full English name: Virtual Router Redundancy Protocol
  • Chinese name: Virtual Router Redundancy Protocol
  • Protocol: IETF – RFC 3768
  • Multicast address: 224.0.0.18
  • Network layer protocol
  • Protocol number: 112

VRRP term

  • VRRP router : router running VRRP, possibly Belongs to one or more virtual routers.
  • Virtual IP address : The IP address is assigned as a virtual IP address from the local subnet.
  • virtual MAC address : Use the last 8 bytes of hexadecimal as the VRRP group number to automatically generate a virtual MAC address.
  • Primary Router : The primary router is selected based on priority, if a group member of the VRRP group has a higher priority than other group members, it will be selected as the primary router.
  • backup router : Only one of the VRRP group members becomes the primary router, the other members will become backup routers, and if the primary router fails, one of the backup routers will become the primary router.

VRRP works

VRRP uses virtual routers to control which physical routers are assigned to the access network. A VRRP group consists of a primary router and one or more backup routers that share a virtual IP address. If the main router fails, VRRP automatically assigns one of the backup routers without affecting network traffic. When the failed router becomes operational again, it becomes the master router again. VRRP provides this redundancy without user intervention or additional configuration of any device on the network.

VRRP The main router sends a VRRP advertisement message to the backup router. When the VRRP main router fails to send the advertisement message, the backup router with the highest priority takes over and becomes the main router.

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

VRRP normal working scenario

is shown in the figure below. There are two virtual devices. The upper one is the main router and the lower one is the backup router. Now the traffic normally goes through the main router:

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

VRRP normal working traffic flows to

. When the main router fails down When the machine is running:

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

VRRP active and backup switching working scenario

At this time, the original backup route quickly becomes the main router, and the traffic is also switched to the backup router. This is the power of VRRP!

VRRP three states

VRRP has the following three states:

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

Initialize initial state

  • Initialize state means VRRP is not available, and the device in the Initialize state cannot process VRRP notification messages.
  • When the VRRP process starts or when the device is in the active and standby state and a fault is detected, it enters the initialization state.

Master active state

  • router obtains the virtual address.
  • is responsible for traffic forwarding.

Backup Backup Status

  • The router is starting up or preparing to obtain a virtual address in case the main device fails.
  • will not be responsible for traffic forwarding.

VRRP election mechanism

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

is as shown in the figure. No matter how difficult the technology is, as long as the picture is drawn, it will be very clear!

The main thing to pay attention to is to select the main router according to the priority: The router with higher priority is selected as the main router.

If two routers have the same priority, the interface IP addresses are compared and the router with the larger interface IP address will be selected as the master router.

Other routers serve as backup routers to monitor the status of the Master router at any time.

If the backup router in the group does not receive the message from the Master router within the Master_Down_Interval time, it will switch to the main router. In a VRRP group with multiple backup routers, multiple Master routers may be generated in a short period of time, and then Compare the priority in the received VRRP message with the local priority, and select the router with the highest priority as the master router.

case

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

Virtual router networking environment case - main router election

As shown in the figure, routers R1, R2, and R3 constitute a virtual router VRRP. The virtual IP address of VRRP is 192.168.1.1. Since the priority of R1 is 100, it is higher than R2's 80 and R3's 60, so R1 is the Master router, that is, the main router, and its IP address is 192.168.1.11. R2 and R3 are backup routers, and their IP addresses are 192.168.1.12 and 192.168.1.13 respectively.

The default gateway of hosts PC1, PC2, and PC3 in the LAN is set to the VRRP virtual IP address 192.168.1.1. Under normal circumstances, R1 serves as the main router and is responsible for forwarding packets in the LAN to the external network. When router A is shut down or fails, At this time, Router B or Router C (according to priority), as the Backup router, will become the main router and forward packets from the LAN to the external network, thereby maintaining communication between the LAN and the external network and improving network reliability.

now has several situations:

R1 fault, R2 and R3 have different priorities

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

R1 fault, R2 and R3 have different priorities

As shown in the figure, due to R1 fault, its link has been grayed out. At this time, because the priority of R2 is 80, It is higher than R3's 60, so R2 is the main router and R3 is still the backup router.

R1 fault, R2 and R3 have the same priority.

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

R1 fault, R2 and R3 have the same priority.

As shown in the figure, the priorities of R2 and R3 are both 80. At this time, the size of the IP address is compared, because the IP address of R3 is 192.168. 1.13 is higher than R2 with IP address 192.168.1.12, so R3 is the primary router and R2 is the backup router.

Note:

VRRP will reject the packet in any of the following cases:

The authentication scheme of the router and the incoming packet is different.

router and the MD5 digest of the incoming packet are different.

The authentication characters on the router and the incoming packet are different.

VRRP Other small points

VRRP Preemption

VRRP Preemption is enabled by default in , this enables a higher priority virtual router backup that can take over from the virtual router backup selected as the virtual router master, if disabled In case of preemption, the virtual router backup selected as the virtual router master remains in the master state until the original virtual router master recovers and becomes the master again.

VRRP version

VRRP has two versions: version 2 and version 3.

among which version 2 is widely used.

  • VRRPv2: Support IPv4
  • VRRPv3: Support IPv4 and IPv6

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

VRRP packet capture - version information

VRRP authentication

VRRP provides many authentications to ensure that the infrastructure running VRRP is protected from malicious attacks. There are two general authentications:

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

VRRP authentication

is not enabled by default Certification.

Hello, this is the Network Technology Alliance site. VRRP is a commonly used fault-tolerant protocol that can improve the reliability of the network. Today Rui Ge will introduce the VRRP protocol in detail. Let’s get straight to it! What is VRRP? - DayDayNews

VRRP authentication packet capture

is displayed as shown in Figure capture packet , and authentication is not enabled.

VRRP Advantages

  • VRRP provides failover/redundancy at the network gateway.
  • does not have a single point of failure with as because the backup device is configured to take over if the primary device fails.
  • failover happens very quickly (usually within seconds).
  • VRRP is used in an active-passive (primary-backup) configuration and can also be configured as an Active-Active configuration with load balancing.
  • VRRP is an IETF open standard protocol, so multiple vendors/multiple types of devices can be part of the VRRP group.
  • The main gateway device can have multiple backup devices.

Summary

Virtual Router Redundancy Protocol (VRRP) provides a virtual IP address to a group of routers, VRRP can be used with routers from different vendors, and VRRP supports Message Digest 5 (MD5) authentication.

VRRP is an open standard IEEE protocol that enables a group of routers to form a single virtual router. Using VRRP, several routers are grouped together to appear like a default gateway for the network. Provides redundancy in the network, eliminating single points of failure inherent in static default route environments.

VRRP is a network layer protocol with protocol number 112. The number of routers in the group act as virtual logical routers and act as the default gateway for all local hosts. If any router fails, other group members can take on the responsibility of forwarding traffic.

In this article, Ruige mainly introduces:

  • What is VRRP?
  • VRRP term
  • VRRP working principle
  • VRRP three states Initialize Initial state Master active state Backup backup state
  • VRRP election mechanism case
  • VRRP other small points VRRP preemption VRRP version VRRP certification
  • VRRP advantages

Thank you for reading, if you feel The article is helpful to you, don’t forget Like, favorite ⭐! If you have any questions, feel free to discuss them with me in the comment area below! ! !

technology Category Latest News