Configuring VRRP backup groups
Principle overview:
When VRRP is configured as a single Backup group, all business is undertaken by the Master device, while the Backup device is completely idle and not fully utilized. VRRP can realize load sharing by configuring multiple Backup groups, which effectively solves this problem.
VRRP allows the same interface of the same device to join multiple VRRP backup groups, with different priorities in different backup groups, so that the Master devices in each backup group are different, that is, multiple virtual gateway routers are established. Each host can use different virtual group routers as gateway exits, which can share data flow and back up each other, and make full use of the resources of each device;
In the priority value range of VRRP, 255 is reserved for the IP address owner. When the physical interface IP address of a VRRP router is the same as the virtual IP address of the virtual router, the router is called the virtual IP address owner, and the VRRP priority is automatically set to 255; Priority 0 is also a special value. When the Master device deletes the VRRP configuration and stops running VRRP, it will send a VRRP message with priority 0 to notify the Backup device. When Backup receives the message, it will immediately change from Backup state to mashup state;
Purpose of the experiment:
- Understand the application scenarios of VRRP multiple backup groups
- Master the configuration method of VRRP multi backup group
- Understand the operation priority and configuration priority of VRRP
- Understand the application of VRRP virtual address owner
First, make basic configuration:
AR1: # interface GigabitEthernet0/0/0 ip address 172.16.2.254 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 172.16.3.254 255.255.255.0 # interface NULL0 # ospf 1 area 0.0.0.0 network 172.16.2.0 0.0.0.255 network 172.16.3.0 0.0.0.255 AR2: # interface GigabitEthernet0/0/0 ip address 172.16.1.100 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 172.16.2.254 255.255.255.0 # interface NULL0 # ospf 1 area 0.0.0.0 network 172.16.1.0 0.0.0.255 network 172.16.2.0 0.0.0.255 AR3: # interface GigabitEthernet0/0/0 ip address 172.16.1.200 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 172.16.3.1 255.255.255.0 # interface NULL0 # ospf 1 area 0.0.0.0 network 172.16.1.0 0.0.0.255 network 172.16.3.0 0.0.0.255
After completing the basic configuration, check whether you can ping;
To configure VRRP dual backup groups:
In order to improve the reliability of the network, the company adopts double export
AR2: # interface GigabitEthernet0/0/0 ip address 172.16.1.100 255.255.255.0 vrrp vrid 1 virtual-ip 172.16.1.254 vrrp vrid 1 priority 120 AR3: # interface GigabitEthernet0/0/0 ip address 172.16.1.200 255.255.255.0 vrrp vrid 1 virtual-ip 172.16.1.254
View VRRP information after configuration:
It can be observed that AR2 is the Master of group 1 and AR3 is the Backup.
AR2: # interface GigabitEthernet0/0/0 ip address 172.16.1.100 255.255.255.0 vrrp vrid 1 virtual-ip 172.16.1.254 vrrp vrid 1 priority 120 vrrp vrid 2 virtual-ip 172.16.1.253 AR3: # interface GigabitEthernet0/0/0 ip address 172.16.1.200 255.255.255.0 vrrp vrid 1 virtual-ip 172.16.1.254 vrrp vrid 2 virtual-ip 172.16.1.253 vrrp vrid 2 priority 120
After configuration, view VRRP information:
It can be observed that AR3 is the Master of group 2 and AR2 is Backup.
It can be observed that we have realized the needs of network optimization;
Verify VRRP preemption feature
In virtual group 2, AR3 is a Master router with a priority of 120. Now in virtual group 2, change the preemption mode of AR2 to non preemption mode (preemption mode by default), and change the priority to 200, that is, the priority greater than AR3;
AR2:
It can be observed that although the configuration priority of AR2 is greater than AR3 and the final operation priority is also greater than AR3, AR2 will not preempt as a Master because AR2 is in a non preemptive mode;
Configure virtual IP owner:
In virtual group 1, the configuration priority of AR2 is 120, the configuration priority of AR3 is 100 by default, and AR2 is the Master router of virtual group 1 temporarily. Now, in order to ensure that AR2 is always the Master in virtual group 1, the network administrator modifies the IP address to 172.16.1.254/24 on the G0/0/0 interface of AR2, so that AR2 becomes the virtual IP address owner of the virtual group;
View VRRP information on AR2;
It can be observed that although the configuration priority of AR2 in virtual group 1 is 120, after becoming the owner of the virtual IP address, its operation priority is 255, which is higher than the priority 254 of AR3. Therefore, AR3 cannot preempt to become the Master of the group, which again verifies that the election and preemption of the Master are compared with the operation priority.
End of experiment;
Remarks: if there is any error, please understand!
This article is my study notes, for reference only! If repeated!!! Please contact me!