Combining VRRP and floating route to configure active and standby routes

1: Experimental environment

1.1 environment:

Huawei ensp software

1.2 equipment

PC, router and switch
Two PC s in initialization state, two routers in initialization state and three switches

2, Experimental requirements

SW1 and SW2 constitute the primary and secondary routes. When one party hangs up, the data will pass through the other party. R1 is configured with floating routes

3: Experimental process

3.1: equipment configuration

In the ensp, prepare the PC, router and switch.

3.2 configure SW1 switch

3.2.1 configuration interface

[SW1]v b 10 20 100

[SW1]int g0/0/2
[SW1-GigabitEthernet0/0/2]p l t
[SW1-GigabitEthernet0/0/2]port l a v 10 20
[SW1-GigabitEthernet0/0/2]int g0/0/1
[SW1-GigabitEthernet0/0/1]p l a
[SW1-GigabitEthernet0/0/1]p t a v 100
[SW1-GigabitEthernet0/0/1]un sh

3.2.2 vlanifs with three-layer switches

[SW1]int vlan 10
[SW1-Vlanif10]ip add 192.168.10.10 24
[SW1-Vlanif10]int vlan 20
[SW1-Vlanif20]ip add 192.168.20.10 24
[SW1-Vlanif20]int vlan 100
[SW1-Vlanif100]ip add 11.0.0.2 30

3.2.3 configure VRRP

VLANIF10 of SW1 configures the master route and VLANIF10 of SW2 to form the master-slave relationship;
The vlanif20 of SW1 configures the standby route and the VLANIF10 main route of SW2 to form the standby master relationship;

[SW1]int vlanif 10
[SW1-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1
[SW1-Vlanif10]vrrp vrid 1 priority 120 #The higher the priority of vrrp, the higher the priority
[SW1-Vlanif10]vrrp vrid 1 track interface g0/0/1 #Listening port
[SW1-Vlanif10]vrrp vrid 1 track interface g0/0/2  #Listening port
[SW1]int vlanif 20
[SW1-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.1
[SW1-Vlanif20]vrrp vrid 2 priority 115  Back route without listening port

3.2.4 configure route information

[SW1]ip route-static 0.0.0.0 0.0.0.0 11.0.0.1

3.3 configure SW2 switch

3.3.1 configure interface address

[SW2]v b 10 20 100
[SW2]int g0/0/2
[SW2-GigabitEthernet0/0/2]p l t
[SW2]int g0/0/2
[SW2-GigabitEthernet0/0/2]p l t
[SW2-GigabitEthernet0/0/2]p t a v 10 20
[SW2-GigabitEthernet0/0/2]un sh
[SW2-GigabitEthernet0/0/2]int g0/0/1
[SW2-GigabitEthernet0/0/1]p l a
[SW2-GigabitEthernet0/0/1]p d v 100
[SW2-GigabitEthernet0/0/1]un sh

3.3.2 configure vlanif

[SW2]int vlanif 10
[SW2-Vlanif10]ip add 192.168.10.20 24
[SW2-Vlanif10]int vlanif 20
[SW2-Vlanif20]ip add 192.168.20.20 24
[SW2-Vlanif20]int vlanif 100
[SW2-Vlanif100]ip add 12.0.0.2 30

3.3.3 configure vrrp

[SW2-Vlanif100]int vlanif 10
[SW2-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1
[SW2-Vlanif10]vrrp vrid 1 priority 115    prepare
[SW2]int vlanif 20
[SW2-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.1
[SW2-Vlanif20]vrrp vrid 2 priority 120    main

3.3.4 configure route information

ip route-static 0.0.0.0 0.0.0.0 12.0.0.1

3.4 configure R1 router

3.4.1 configuration interface

[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 11.0.0.1 30
[R1-GigabitEthernet0/0/0]un sh
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 12.0.0.1 30
[R1-GigabitEthernet0/0/1]un sh
[R1]int loo 0
[R1-LoopBack0]ip add 1.1.1.1 24

3.4.2 configure floating route (the lower the priority level, the more priority)

[R1]ip route-static 192.168.10.0 255.255.255.0 11.0.0.2  #The default is 60
[R1]ip route-static 192.168.10.0 255.255.255.0 12.0.0.2 preference 70  # If the above path fails, the routing information will be automatically written into the routing table, and the path will float to the 12.0.0.2 interface
[R1]ip route-static 192.168.20.0 255.255.255.0 12.0.0.2
[R1]ip route-static 192.168.20.0 255.255.255.0 11.0.0.2 preference 70

3.5 check whether the requirements are met

3.5.1 no downtime of the active and standby routes

3.5.2 packet capturing during VLAN 10 line outage of simulated SW1

3.5.3 VLAN 20 line outage packet capturing of analog SW2

4, Experiment summary

1. The default priority of floating route is 60, and the smaller the priority is, the higher the priority is. If it is the second route, the priority is higher than the default. Generally, it is more than 60

  1. The larger the value of ARRP priority range 1-254 is, the higher the priority is, so the priority of the primary ARRP is greater than that of the standby route.

Keywords: Operation & Maintenance

Added by aufkes on Thu, 28 May 2020 18:40:38 +0300