0% found this document useful (0 votes)
24 views22 pages

Lab 5-1 VRRP Configuration

The document outlines the configuration of Virtual Router Redundancy Protocol (VRRP) for first-hop redundancy among routers R1, R2, and R3, including setting up IP addresses and OSPF routing. It details the tasks for configuring VRRP, testing connectivity, and establishing static routes for R4 and R5. The document also includes command-line instructions for configuring the routers and verifying the routing tables.

Uploaded by

Haroon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views22 pages

Lab 5-1 VRRP Configuration

The document outlines the configuration of Virtual Router Redundancy Protocol (VRRP) for first-hop redundancy among routers R1, R2, and R3, including setting up IP addresses and OSPF routing. It details the tasks for configuring VRRP, testing connectivity, and establishing static routes for R4 and R5. The document also includes command-line instructions for configuring the routers and verifying the routing tables.

Uploaded by

Haroon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

VRRP Configuration

Learning Objectives
The objectives of this lab are to learn and understand:
 How to configure a Virtual Router Redundancy Protocol
(VRRP) group and the virtual IP address
 How to configure the VRRP priority
 How to check the VRRP configuration
 How to configure VRRP to monitor the uplink
 How to configure load balancing for multiple VRRP groups

Topology
Figure 1-1 VRRP topology

Scenario
R1 functions as the gateway for a LAN and an external network. R1 connects to R2 and R3 through S5,
and R2, R3, R4, and R5 connect to a LAN through S1. VRRPv2 needs to be enabled on interfaces of R2
and R3 connecting to S1 to implement first-hop redundancy. R2 is the master router and R3 is the
backup router. No extra configurations are required for switches. The switches only transparently
forward packets.

Tasks
Step 1 Perform basic configurations and configure IP addresses.
Configure IP addresses for all routers.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface loopback 0
[R1-LoopBack0]ip address 1.1.1.1 32
[R1-LoopBack0]quit
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.0.123.1 24

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 10.0.123.2 24
[R2-GigabitEthernet0/0/0]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.1.2 24

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 10.0.123.3 24
[R3-GigabitEthernet0/0/0]quit
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.1.3 24

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.1.4 24

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R5
[R5]interface GigabitEthernet 0/0/1
[R5-GigabitEthernet0/0/1]ip address 192.168.1.5 24

After the configuration is complete, test the connectivity between R1 and R2 and between R1 and R3.
[R1]ping 10.0.123.2
PING 10.0.123.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.123.2: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.123.2: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.123.2: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.123.2: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.123.2: bytes=56 Sequence=5 ttl=255 time=1 ms

--- 10.0.123.2 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/1 ms

[R1]ping 10.0.123.3
PING 10.0.123.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.123.3: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.123.3: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.123.3: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.123.3: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.123.3: bytes=56 Sequence=5 ttl=255 time=1 ms

--- 10.0.123.3 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/1 ms

Test the connectivity between R2, R3, R4, and R5. R2 is used as an example.
[R2]ping 192.168.1.3
PING 192.168.1.3: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.3: bytes=56 Sequence=1 ttl=255 time=27 ms
Reply from 192.168.1.3: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 192.168.1.3: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 192.168.1.3: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 192.168.1.3: bytes=56 Sequence=5 ttl=255 time=1 ms

--- 192.168.1.3 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/6/27 ms

[R2]ping 192.168.1.4
PING 192.168.1.4: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.4: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 192.168.1.4: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 192.168.1.4: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 192.168.1.4: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 192.168.1.4: bytes=56 Sequence=5 ttl=255 time=1 ms

--- 192.168.1.4 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/1 ms

[R2]ping 192.168.1.5
PING 192.168.1.5: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.5: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 192.168.1.5: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 192.168.1.5: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 192.168.1.5: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 192.168.1.5: bytes=56 Sequence=5 ttl=255 time=1 ms

--- 192.168.1.5 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/1 ms
Step 2 Configure OSPF and static routes.
The loopback interface on R1 and connected interfaces on R1, R2, and R3 run in OSPF area 0. Routes of
interfaces on R2 and R3 connecting to S1 are advertised to OSPF, but no OSPF neighbor relationships.
The silent mode is therefore used.
To simulate PCs, R4 and R5 use default static routes pointing to 192.168.1.1 (VRRP virtual IP address).
Enable R1 to learn routes to 192.168.1.0, and enable R2 and R3 to learn routes to 1.1.1.1.
[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.0.123.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0

[R2]ospf 1
[R2-ospf-1]silent-interface GigabitEthernet 0/0/1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 10.0.123.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255

[R3]ospf 1
[R3-ospf-1]silent-interface GigabitEthernet 0/0/1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 10.0.123.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255

[R4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.1


[R5]ip route-static 0.0.0.0 0.0.0.0 192.168.1.1

After the configuration is complete, check the routing table ofR1, R2, and R4.
[R1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 10

Destination/Mask Proto Pre Cost Flags NextHop Interface

1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0


10.0.123.0/24 Direct 0 0 D 10.0.123.1 GigabitEthernet0/0/0
10.0.123.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
10.0.123.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 OSPF 10 2 D 10.0.123.3 GigabitEthernet0/0/0

OSPF 10 2 D 10.0.123.2 GigabitEthernet0/0/0

255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

[R2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 12

Destination/Mask Proto Pre Cost Flags NextHop Interface

1.1.1.1/32 OSPF 10 1 D 10.0.123.1 GigabitEthernet0/0/0


10.0.0.2/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.123.0/24 Direct 0 0 D 10.0.123.2 GigabitEthernet0/0/0
10.0.123.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
10.0.123.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.2 GigabitEthernet0/0/1
192.168.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
192.168.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

[R4]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9

Destination/Mask Proto Pre Cost Flags NextHop Interface

0.0.0.0/0 Static 60 0 RD 192.168.1.1 GigabitEthernet0/0/1


10.0.0.4/32 Direct 0 0 D 127.0.0.1 LoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.4 GigabitEthernet0/0/1
192.168.1.4/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
192.168.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

The preceding output shows that R1 can learn routes to 192.168.1.0/24, R2 can learn routes to
1.1.1.1/32, and R4 has a default static route to 192.168.1.1.

Step 3 Configure a VRRP group and the virtual IP address.


Enable VRRP on interfaces of R2 and R3, and configure the VRID and virtual IP address.
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]vrrp vrid 1 virtual-ip 192.168.1.1

R2 is configured first and becomes the master router if there is no other member in the VRRP group
after a period of time.
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]vrrp vrid 1 virtual-ip 192.168.1.1

After the configuration is complete, check the VRRP status on R2 and R3.
[R2]display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Master
Virtual IP : 192.168.1.1
Master IP : 192.168.1.2
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 100
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-07-22 18:00:03
Last change time : 2016-07-22 18:00:07

[R3]display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Backup
Virtual IP : 192.168.1.1
Master IP : 192.168.1.2
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 100
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-07-22 18:03:16
Last change time : 2016-07-22 18:03:16

R2 is selected as the master router and R3 as the backup router. The priorities of master and slave
routers are both 100. When R3 is started first, it becomes the master router, which is not expected.

Configure the VRRP priority and verify the active/standby switchover.


Configure VRRP priorities on R2 and R3. A greater priority value indicates a higher priority. Set VRRP
priorities of R2 and R3 to 120 and 110, respectively.
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]vrrp vrid 1 priority 120

[R3]interface GigabitEthernet 0/0/1


[R3-GigabitEthernet0/0/1]vrrp vrid 1 priority 110

Check the configuration after priorities are changed.


[R2]display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Master
Virtual IP : 192.168.1.1
Master IP : 192.168.1.2
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-07-22 18:00:03
Last change time : 2016-07-22 18:00:07

[R3]display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Backup
Virtual IP : 192.168.1.1
Master IP : 192.168.1.2
PriorityRun : 110
PriorityConfig : 110
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-07-22 18:03:16
Last change time : 2016-07-22 18:03:16

The preceding output shows that priorities of R2 and R3 have been changed successfully. By default,
VRRP preemption is enabled. When the priority of R3 is changed to be higher, an active/standby
switchover will be triggered.
Test the connectivity between R4 and R1.
[R4]ping 1.1.1.1
PING 1.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=254 time=57 ms
Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=254 time=1 ms

--- 1.1.1.1 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/12/57 ms

The preceding output shows that the virtual gateway works properly and can forward data of the LAN
where R4 is located to R1. Normally, the master router forwards data, so traffic passes through R2. To
verify the switching status, perform the ping operation from R4 to R1 for a long time and shut down the
interface of R2 connected to S1.
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]shutdown

R4 discards two data packets during the switchover, and subsequent data is forwarded normally.
[R4]ping -c 1000 1.1.1.1
PING 1.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=6 ttl=254 time=1 ms
Request time out
Request time out
Reply from 1.1.1.1: bytes=56 Sequence=9 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=10 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=11 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=12 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=13 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=14 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=15 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=16 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=17 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=18 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=19 ttl=254 time=1 ms
Reply from 1.1.1.1: bytes=56 Sequence=20 ttl=254 time=1 ms

--- 1.1.1.1 ping statistics ---


20 packet(s) transmitted
18 packet(s) received
10.00% packet loss
round-trip min/avg/max = 1/1/1 ms

R3 becomes the master router after the switchover.


[R3]display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Master
Virtual IP : 192.168.1.1
Master IP : 192.168.1.3
PriorityRun : 110
PriorityConfig : 110
MasterPriority : 110
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-07-22 18:03:16
Last change time : 2016-07-22 18:29:41

Configure VRRP to monitor the uplink.


The VRRP active/standby switchover is implemented by listening to Advertisement packets. If the
backup router cannot listen to messages of the master router or has a higher priority, the backup router
preempts to be the master router (no preemption delay by default).
If the fault occurs on the uplink link, the active/standby switchover is not performed. In this case, all
Internet access traffic cannot be forwarded after reaching R2. VRRP is enabled to monitor the uplink.
When the uplink fails, R2 automatically reduces its priority. R3 preempts to be the master router, and
traffic is switched to the backup router and backup uplink.
Before configuring VRRP to monitor the uplink, restore the link that is shut down.
Configure VRRP to monitor the uplink interface and set the value by which the priority decreases to 30.
That is, when the link fails, the priority of R2 becomes 90, which is lower than the priority of R3 (110).
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]undo shutdown
[R2-GigabitEthernet0/0/1]vrrp vrid 1 track interface GigabitEthernet 0/0/0 reduced 30

Check the configuration.


[R2]display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Master
Virtual IP : 192.168.1.1
Master IP : 192.168.1.2
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track IF : GigabitEthernet0/0/0 Priority reduced : 30
IF state : UP
Create time : 2016-07-25 17:14:56 UTC-08:00
Last change time : 2016-07-25 17:32:27 UTC-08:00

Perform the ping operation on R4 for a long time and shut down the uplink interface on R2.
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]shutdown

[R2]display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Backup
Virtual IP : 192.168.1.1
Master IP : 192.168.1.3
PriorityRun : 90
PriorityConfig : 120
MasterPriority : 110
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track IF : GigabitEthernet0/0/0 Priority reduced : 30
IF state : DOWN
Create time : 2016-07-25 17:14:56 UTC-08:00
Last change time : 2016-07-25 19:57:46 UTC-08:00

[R3]display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Master
Virtual IP : 192.168.1.1
Master IP : 192.168.1.3
PriorityRun : 110
PriorityConfig : 110
MasterPriority : 110
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-07-25 17:20:00 UTC-08:00
Last change time : 2016-07-25 19:56:24 UTC-08:00

R3 becomes the master router and traffic is successfully switched to R3.


Restore the uplink and priority of R2. R2 preempts to be the master router again. During preemption,
few packets are discarded on R4. This is because OSPF routes are not converged rapidly. For details
about route convergence acceleration, see the OSPF experiment.
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]undo shutdown

[R2]display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Master
Virtual IP : 192.168.1.1
Master IP : 192.168.1.2
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track IF : GigabitEthernet0/0/0 Priority reduced : 30
IF state : UP
Create time : 2016-07-25 17:14:56 UTC-08:00
Last change time : 2016-07-25 20:04:40 UTC-08:00

When the interface goes Up, the OSPF neighbor relationship needs to be reestablished on the uplink
interface of R2. If OSPF fast convergence is not configured, data cannot be forwarded for several
seconds. You are advised to set the preemption delay to be longer than the OSPF convergence time
during the switchback.
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]vrrp vrid 1 preempt-mode timer delay 10

Check the VRRP configurations again. You can see that the preemption delay has been configured
successfully.
[R2]display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Master
Virtual IP : 192.168.1.1
Master IP : 192.168.1.2
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 10 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track IF : GigabitEthernet0/0/0 Priority reduced : 30
IF state : UP
Create time : 2016-07-25 17:14:56 UTC-08:00
Last change time : 2016-07-25 20:04:40 UTC-08:00

Step 4 Configure load balancing of multiple VRRP groups.


Normally, the master device forwards all traffic, and the backup device is idle.
To implement dual-gateway load balancing, configure multiple VRRP groups. Configure VRRP group 1 on
R2 and R3, set the virtual IP address to 192.168.1.1, and configure R2 as the master device. Configure
VRRP group 2, set the virtual address to 192.168.1.254, and configure R3 as the master device.
Configure the default gateway address pointing to 192.168.1.1 for R4 and the default gateway address
pointing to 192.168.1.254 for R5. Internet access traffic can be load balanced to two gateways.
The configuration is as follows.
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]vrrp vrid 2 virtual-ip 192.168.1.254
[R2-GigabitEthernet0/0/1]vrrp vrid 2 priority 110

[R3]interface GigabitEthernet 0/0/1


[R3-GigabitEthernet0/0/1]vrrp vrid 2 virtual-ip 192.168.1.254
[R3-GigabitEthernet0/0/1]vrrp vrid 2 priority 120
[R3-GigabitEthernet0/0/1]vrrp vrid 2 track interface GigabitEthernet0/0/0 reduced 30

[R5]undo ip route-static 0.0.0.0 0.0.0.0 192.168.1.1


[R5]ip route-static 0.0.0.0 0.0.0.0 192.168.1.254

Check load balancing of two VRRP groups on R2 and R3.


<R2>display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Master
Virtual IP : 192.168.1.1
Master IP : 192.168.1.2
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 10 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track IF : GigabitEthernet0/0/0 Priority reduced : 30
IF state : UP
Create time : 2016-07-25 17:14:56 UTC-08:00
Last change time : 2016-07-25 20:04:40 UTC-08:00

GigabitEthernet0/0/1 | Virtual Router 2


State : Backup
Virtual IP : 192.168.1.254
Master IP : 192.168.1.3
PriorityRun : 110
PriorityConfig : 110
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0102
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-07-25 17:15:54 UTC-08:00
Last change time : 2016-07-25 17:20:30 UTC-08:00

<R3>display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Backup
Virtual IP : 192.168.1.1
Master IP : 192.168.1.2
PriorityRun : 110
PriorityConfig : 110
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-07-25 17:20:00 UTC-08:00
Last change time : 2016-07-25 20:03:15 UTC-08:00

GigabitEthernet0/0/1 | Virtual Router 2


State : Master
Virtual IP : 192.168.1.254
Master IP : 192.168.1.3
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0102
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track IF : GigabitEthernet0/0/0 Priority reduced : 30
IF state : UP
Create time : 2016-07-25 17:20:14 UTC-08:00
Last change time : 2016-07-25 17:20:23 UTC-08:00

Perform the tracert operation to check the gateways that process data destined for the two default
routes. You can see that data sent by R4 is forwarded by the master device in VRRP group 1 and data
sent by R5 is forwarded by the master device in VRRP group 2.
# Enable R1 to send ICMP Port Unreachable packets.
[R1]icmp port-unreachable send

<R4>tracert 1.1.1.1

traceroute to 1.1.1.1(1.1.1.1), max hops: 30 ,packet length: 40,press CTRL_C t


o break

1 192.168.1.2 80 ms 40 ms 40 ms

2 10.0.123.1 100 ms 70 ms 70 ms

<R5>tracert 1.1.1.1

traceroute to 1.1.1.1(1.1.1.1), max hops: 30 ,packet length: 40,press CTRL_C t


o break

1 192.168.1.3 50 ms 30 ms 50 ms

2 10.0.123.1 60 ms 90 ms 60 ms

Check the switchover when the uplink fails.


[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]shutdown

<R4>tracert 1.1.1.1

traceroute to 1.1.1.1(1.1.1.1), max hops: 30 ,packet length: 40,press CTRL_C t


o break

1 192.168.1.3 50 ms 40 ms 50 ms
2 10.0.123.1 70 ms 80 ms 50 ms

<R5>tracert 1.1.1.1

traceroute to 1.1.1.1(1.1.1.1), max hops: 30 ,packet length: 40,press CTRL_C t


o break

1 192.168.1.3 40 ms 50 ms 40 ms

2 10.0.123.1 70 ms 100 ms 90 ms

Check the status of the two VRRP groups.


<R2>display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Backup
Virtual IP : 192.168.1.1
Master IP : 192.168.1.3
PriorityRun : 90
PriorityConfig : 120
MasterPriority : 110
Preempt : YES Delay Time : 10 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track IF : GigabitEthernet0/0/0 Priority reduced : 30
IF state : DOWN
Create time : 2016-07-25 17:14:56 UTC-08:00
Last change time : 2016-07-25 20:48:28 UTC-08:00

GigabitEthernet0/0/1 | Virtual Router 2


State : Backup
Virtual IP : 192.168.1.254
Master IP : 192.168.1.3
PriorityRun : 110
PriorityConfig : 110
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0102
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-07-25 17:15:54 UTC-08:00
Last change time : 2016-07-25 17:20:30 UTC-08:00

<R3>display vrrp
GigabitEthernet0/0/1 | Virtual Router 1
State : Master
Virtual IP : 192.168.1.1
Master IP : 192.168.1.3
PriorityRun : 110
PriorityConfig : 110
MasterPriority : 110
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-07-25 17:20:00 UTC-08:00
Last change time : 2016-07-25 20:46:42 UTC-08:00

GigabitEthernet0/0/1 | Virtual Router 2


State : Master
Virtual IP : 192.168.1.254
Master IP : 192.168.1.3
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0102
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track IF : GigabitEthernet0/0/0 Priority reduced : 30
IF state : UP
Create time : 2016-07-25 17:20:14 UTC-08:00
Last change time : 2016-07-25 17:20:23 UTC-08:00

Normally, R2 and R3 load balance traffic. When R2 is faulty, R3 takes over all traffic on R2. In this case,
load balancing of two VRRP groups is configured.

Device Configuration
<R1>display current-configuration

sysname R1

interface GigabitEthernet0/0/0

ip address 10.0.123.1 255.255.255.0

interface LoopBack0

ip address 1.1.1.1 255.255.255.255

ospf 1

area 0.0.0.0

network 1.1.1.1 0.0.0.0

network 10.0.123.0 0.0.0.255

return

<R2>display current-configuration

sysname R2

interface GigabitEthernet0/0/0

shutdown
ip address 10.0.123.2 255.255.255.0

interface GigabitEthernet0/0/1

ip address 192.168.1.2 255.255.255.0

vrrp vrid 1 virtual-ip 192.168.1.1

vrrp vrid 1 priority 120

vrrp vrid 1 preempt-mode timer delay 10

vrrp vrid 1 track interface GigabitEthernet0/0/0 reduced 30

vrrp vrid 2 virtual-ip 192.168.1.254

vrrp vrid 2 priority 110

ospf 1

silent-interface GigabitEthernet0/0/1

area 0.0.0.0

network 10.0.123.0 0.0.0.255

network 192.168.1.0 0.0.0.255

return

<R3>display current-configuration

sysname R3

interface GigabitEthernet0/0/0

ip address 10.0.123.3 255.255.255.0

interface GigabitEthernet0/0/1

ip address 192.168.1.3 255.255.255.0

vrrp vrid 1 virtual-ip 192.168.1.1

vrrp vrid 1 priority 110

vrrp vrid 2 virtual-ip 192.168.1.254

vrrp vrid 2 priority 120

vrrp vrid 2 track interface GigabitEthernet0/0/0 reduced 30

ospf 1
silent-interface GigabitEthernet0/0/1

area 0.0.0.0

network 10.0.123.0 0.0.0.255

network 192.168.1.0 0.0.0.255

return

<R4>display current-configuration

sysname R4

interface GigabitEthernet0/0/1

ip address 192.168.1.4 255.255.255.0

ip route-static 0.0.0.0 0.0.0.0 192.168.1.1

return

<R5>display current-configuration

sysname R5

interface GigabitEthernet0/0/1

ip address 192.168.1.5 255.255.255.0

ip route-static 0.0.0.0 0.0.0.0 192.168.1.254

return

You might also like