12-High Availability Configuration Examples

HomeSupportRoutersCR16000-F SeriesConfigure & DeployConfiguration ExamplesH3C CR16000-F Routers Configuration Examples-R795x-6W10012-High Availability Configuration Examples
03-H3C_VRRP_Configuration_Examples
Title Size Download
03-H3C_VRRP_Configuration_Examples 191.30 KB

 

H3C VRRP Configuration Examples

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Software version: Release 7951P01

Document version: 6W100-20200625

 

Copyright © 2020 New H3C Technologies Co., Ltd. All rights reserved.

No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co., Ltd.

Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are the property of their respective owners.

The information in this document is subject to change without notice.

 



Introduction

This document provides VRRP configuration examples.

Prerequisites

This document is not restricted to specific software or hardware versions.

The configuration examples in this document were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network.

This document assumes that you have basic knowledge of VRRP and IPsec.

Example: Configuring a single VRRP group

Network configuration

As shown in Figure 1, configure a VRRP group on Device A and Device B as the gateway for Host A to meet the following requirements:

·     Device A operates as the master to forward packets from Host A to the external network.

·     If Device A or its uplink interface fails, Host A can access the external network through Device B.

Figure 1 Network diagram

 

Analysis

To meet the network requirements, you must perform the following tasks:

·     For Device A to become the master when it recovers from a failure, configure the preemptive mode for the VRRP group.

·     For Device A to decrease its priority and become a backup when its uplink interface fails, configure VRRP tracking on Device A.

·     To avoid frequent role change in the VRRP group, set a preemption delay.

Restrictions and guidelines

When you configure a single VRRP group, follow these restrictions and guidelines:

·     The virtual IP address of a VRRP group cannot be any of the following addresses:

¡     All-zero address (0.0.0.0).

¡     Broadcast address (255.255.255.255).

¡     Loopback address.

¡     IP address of other than Class A, Class B, and Class C.

¡     Invalid IP address (for example, 0.0.0.1).

·     For Host A to access the external network, make sure the following IP addresses are on the same subnet:

¡     The virtual IP address of the VRRP group.

¡     The downlink interface IP addresses of the VRRP group members.

·     IPv4 VRRP can use VRRPv2 or VRRPv3 (default version). For a VRRP group to operate correctly, make sure the VRRP versions on all devices in the VRRP group are the same.

·     Removal of the VRRP group on the IP address owner causes IP address collision. To avoid a collision, change the IP address of the interface on the IP address owner before you remove the VRRP group from the interface.

·     Configure the same virtual IP addresses for each device in the VRRP group.

·     Make sure the decreased priority of the master is lower than the priority of all the other devices in the VRRP group. Another device in the group can then be elected as the master.

Procedures

Configuring Device A

# Assign an IP address to Ten-GigabitEthernet 3/0/1.

<DeviceA> system-view

[DeviceA] interface ten-gigabitethernet 3/0/1

[DeviceA-Ten-GigabitEthernet3/0/1] ip address 192.168.0.2 24

# Create VRRP group 1, and set its virtual IP address to 192.168.0.1.

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 virtual-ip 192.168.0.1

# Set the priority of Device A to 110 in VRRP group 1. Device A has a higher priority than Device B in VRRP group 1, so Device A can become the master.

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 priority 110

# Configure Device A to operate in preemptive mode, and set the preemption delay to 500 centiseconds.

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 preempt-mode delay 500

[DeviceA-Ten-GigabitEthernet3/0/1] quit

# Create track entry 1 to monitor the link status of the uplink interface Ten-GigabitEthernet 3/0/2.

[DeviceA] track 1 interface ten-gigabitethernet 3/0/2

# Associate VRRP group 1 with track entry 1 to decrease the weight of Device A by 50 when the track entry transits to Negative.

[DeviceA] interface ten-gigabitEthernet 3/0/1

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 track 1 priority reduced 50

[DeviceA-Ten-GigabitEthernet3/0/1] quit

Configuring Device B

# Assign an IP address to Ten-GigabitEthernet 3/0/1.

<DeviceB> system-view

[DeviceB] interface ten-gigabitethernet 3/0/1

[DeviceB-Ten-GigabitEthernet3/0/1] ip address 192.168.0.3 24

# Create VRRP group 1, and set its virtual IP address to 192.168.0.1.

[DeviceB-Ten-GigabitEthernet3/0/1] vrrp vrid 1 virtual-ip 192.168.0.1

# Set the priority of Device B to 100 in VRRP group 1.

[DeviceB-Ten-GigabitEthernet3/0/1] vrrp vrid 1 priority 100

# Configure Device B to operate in preemptive mode, and set the preemption delay to 500 centiseconds.

[DeviceB-Ten-GigabitEthernet3/0/1] vrrp vrid 1 preempt-mode delay 500

[DeviceB-Ten-GigabitEthernet3/0/1] quit

Verifying the configuration

1.     Verify that Host A can ping Host B. (Details not shown.)

2.     Verify that Device A is operating as the master in VRRP group 1 to forward packets from Host A to Host B.

# Display detailed information about VRRP group 1 on Device A.

[DeviceA] display vrrp verbose

IPv4 virtual router information:

 Running mode : Standard

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

     VRID             : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 110                  Running pri  : 110

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 192.168.0.1

     Virtual MAC      : 0000-5e00-0101

     Master IP        : 192.168.0.2

   VRRP track information:

     Track object   : 1                   State : Positive   Pri reduced : 50

# Display detailed information about VRRP group 1 on Device B.

[DeviceB] display vrrp verbose

IPv4 virtual router information:

 Running mode : Standard

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

     VRID             : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Backup

     Config pri       : 100                  Running pri  : 100

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Become master    : 412 milliseconds left

     Auth type        : None

     Virtual IP       : 192.168.0.1

     Master IP        : 192.168.0.2

3.     Disconnect the link between Host A and Device A, and verify that Host A can still ping Host B. (Details not shown.)

4.     Verify that Device B takes over to forward packets from Host A to Host B when Device A fails.

[DeviceB] display vrrp verbose

IPv4 virtual router information:

 Running mode : Standard

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

     VRID             : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 100                  Running pri  : 100

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 192.168.0.1

     Virtual MAC      : 0000-5e00-0101

     Master IP        : 192.168.0.3

5.     Verify that Device A becomes the master to forward packets from Host A to Host B after Device A recovers.

[DeviceA] display vrrp verbose

IPv4 virtual router information:

 Running mode : Standard

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

     VRID             : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 110                  Running pri  : 110

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 192.168.0.1

     Virtual MAC      : 0000-5e00-0101

     Master IP        : 192.168.0.2

   VRRP track information:

     Track object   : 1                   State : Positive   Pri reduced : 50

Configuration files

·     Device A:

#

interface Ten-GigabitEthernet3/0/1

 port link-mode route

 ip address 192.168.0.2 255.255.255.0

 vrrp vrid 1 virtual-ip 192.168.0.1

 vrrp vrid 1 priority 110

 vrrp vrid 1 preempt-mode delay 500

 vrrp vrid 1 track 1 priority reduced 50

#

 track 1 interface ten-gigabitethernet 3/0/2

#

·     Device B:

#

interface Ten-GigabitEthernet3/0/1

 port link-mode route

 ip address 192.168.0.3 255.255.255.0

 vrrp vrid 1 virtual-ip 192.168.0.1

 vrrp vrid 1 priority 100

 vrrp vrid 1 preempt-mode delay 500

#

Example: Configuring multiple VRRP groups

Network configuration

As shown in Figure 2, configure two VRRP groups on Device A and Device B as gateways for internal hosts to meet the following requirements:

·     Device A operates as the master of VRRP group 1 to forward packets from Area A, and Device B operates as the master of VRRP group 2 to forward packets from Area B. When one of the devices fails, the other device provides gateway service for both areas.

·     If the uplink interface of one device fails, hosts can access the external network through the other device.

Figure 2 Network diagram

 

Analysis

To avoid frequent role change in the VRRP group, set a preemption delay.

Restrictions and guidelines

When you configure multiple VRRP groups, follow these restrictions and guidelines:

·     The virtual IP address of a VRRP group cannot be any of the following addresses:

¡     All-zero address (0.0.0.0).

¡     Broadcast address (255.255.255.255).

¡     Loopback address.

¡     IP address of other than Class A, Class B, and Class C.

¡     Invalid IP address (for example, 0.0.0.1).

·     IPv4 VRRP can use VRRPv2 or VRRPv3 (default version). For a VRRP group to operate correctly, make sure the VRRP versions on all devices in the VRRP group are the same.

·     Removal of the VRRP group on the IP address owner causes IP address collision. To avoid a collision, change the IP address of the interface on the IP address owner before you remove the VRRP group from the interface.

·     Make sure the decreased priority of the master is lower than the priority of all the other devices in the VRRP group. Another device in the group can then be elected as the master.

·     Make sure the following configurations are the same on the members of a VRRP group:

¡     Number of virtual IP addresses.

¡     Virtual IP addresses.

¡     Advertisement interval.

Procedures

Configuring Device A

# Assign an IP address to Ten-GigabitEthernet 3/0/1.

<DeviceA> system-view

[DeviceA] interface ten-gigabitethernet 3/0/1

[DeviceA-Ten-GigabitEthernet3/0/1] ip address 10.0.0.2 24

# Assign IP addresses to other interfaces of Device A. (Details not shown.)

# Create VRRP group 1, and set its virtual IP address to 10.0.0.1.

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 virtual-ip 10.0.0.1

# Set the priority of Device A to 120 in VRRP group 1. Device A has a higher priority than Device B in VRRP group 1, so Device A can become the master.

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 priority 120

# Configure Device A to operate in preemptive mode, and set the preemption delay to 500 centiseconds.

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 preempt-mode delay 500

[DeviceA-Ten-GigabitEthernet3/0/1] quit

# Create VRRP group 2, and set its virtual IP address to 11.0.0.1.

[DeviceA] interface ten-gigabitethernet 3/0/3

[DeviceA-Ten-GigabitEthernet3/0/3] vrrp vrid 2 virtual-ip 11.0.0.1

# Configure Device A to operate in preemptive mode, and set the preemption delay to 500 centiseconds.

[DeviceA-Ten-GigabitEthernet3/0/3] vrrp vrid 2 preempt-mode delay 500

[DeviceA-Ten-GigabitEthernet3/0/3] quit

# Create track entry 1 to monitor the link status of the uplink interface Ten-GigabitEthernet 3/0/2.

[DeviceA] track 1 interface ten-gigabitethernet 3/0/2

# Associate VRRP group 1 with track entry 1 to decrease the weight of Device A by 50 when the track entry transits to Negative.

[DeviceA] interface ten-gigabitEthernet 3/0/1

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 track 1 priority reduced 50

[DeviceA-Ten-GigabitEthernet3/0/1] quit 

Configuring Device B

# Assign an IP address to Ten-GigabitEthernet 3/0/1.

<DeviceB> system-view

[DeviceB] interface ten-gigabitEthernet 3/0/1

[DeviceB-Ten-GigabitEthernet3/0/1] ip address 10.0.0.3 24

# Assign IP addresses to other VLAN interfaces of Device B. (Details not shown.)

# Create VRRP group 1, and set its virtual IP address to 10.0.0.1.

[DeviceB-Ten-GigabitEthernet3/0/1] vrrp vrid 1 virtual-ip 10.0.0.1

# Configure Device B to operate in preemptive mode, and set the preemption delay to 500 centiseconds.

[DeviceB-Ten-GigabitEthernet3/0/1] vrrp vrid 1 preempt-mode delay 500

[DeviceB-Ten-GigabitEthernet3/0/1] quit

# Create VRRP group 2, and set its virtual IP address to 11.0.0.1.

[DeviceB] interface ten-gigabitethernet 3/0/3

[DeviceB-Ten-GigabitEthernet3/0/3] vrrp vrid 2 virtual-ip 11.0.0.1

# Set the priority of Device B to 120 in VRRP group 2. Device B has a higher priority than Device A in VRRP group 2, so Device B can become the master.

[DeviceB-Ten-GigabitEthernet3/0/3] vrrp vrid 2 priority 120

# Configure Device B to operate in preemptive mode, and set the preemption delay to 500 centiseconds.

[DeviceB-Ten-GigabitEthernet3/0/3] vrrp vrid 2 preempt-mode delay 500

[DeviceB-Ten-GigabitEthernet3/0/3] quit

# Create track entry 2 to monitor the link status of the uplink interface Ten-GigabitEthernet 3/0/2.

[DeviceB] track 2 interface ten-gigabitethernet 3/0/2

# Associate VRRP group 2 with track entry 2 to decrease the weight of Device A by 50 when the track entry transits to Negative.

[DeviceB] interface ten-gigabitEthernet 3/0/3

[DeviceB-Ten-GigabitEthernet3/0/3] vrrp vrid 2 track 2 priority reduced 50

[DeviceB-Ten-GigabitEthernet3/0/3] quit

Verifying the configuration

1.     Verify that the hosts in Area A and Area B can ping the external network.

# Ping 100.0.0.1 from Host A in Area A.

<host A> ping 100.0.0.1

PING 100.0.0.1 (100.0.0.1): 56 data bytes

56 bytes from 100.0.0.1: seq=0 ttl=128 time=22.43 ms

56 bytes from 100.0.0.1: seq=1 ttl=128 time=7.17 ms

56 bytes from 100.0.0.1: seq=2 ttl=128 time=8.91 ms

56 bytes from 100.0.0.1: seq=3 ttl=128 time=7.45 ms

56 bytes from 100.0.0.1: seq=4 ttl=128 time=9.11 ms

 

--- 100.0.0.1 ping statistics ---

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 7.17/11.01/22.43 ms

# Ping 100.1.0.1 from Host C in Area B.

<host C> ping 100.1.0.1

PING 100.1.0.1 (100.1.0.1): 56 data bytes

56 bytes from 100.1.0.1: seq=0 ttl=128 time=22.43 ms

56 bytes from 100.1.0.1: seq=1 ttl=128 time=7.17 ms

56 bytes from 100.1.0.1: seq=2 ttl=128 time=8.91 ms

56 bytes from 100.1.0.1: seq=3 ttl=128 time=7.45 ms

56 bytes from 100.1.0.1: seq=4 ttl=128 time=9.11 ms

 

--- 100.1.0.1 ping statistics ---

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 7.17/11.01/22.43 ms

2.     Verify that Device A is operating as the master in VRRP group 1 and the backup in VRRP group 2. Device B is operating as the backup in VRRP group 1 and the master in VRRP group 2.

# Display detailed information about the VRRP groups on Device A.

[DeviceA] display vrrp verbose

IPv4 virtual router information:

 Running mode : Standard

 Total number of virtual routers : 2

   Interface Ten-GigabitEthernet3/0/1

     VRID             : 1                    Adver Timer  : 100 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 120                  Running pri  : 120

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 10.0.0.1

     Virtual MAC      : 0000-5e00-0101

     Master IP        : 10.0.0.2

   VRRP track information:                                                     

     Track object   : 1                   State : Positive   Pri reduced : 50  

 

   Interface Ten-GigabitEthernet3/0/3

     VRID             : 2                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Backup

     Config pri       : 100                  Running pri  : 100

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Become master    : 3550 milliseconds left

     Virtual IP       : 11.0.0.1

     Master IP        : 11.0.0.3

# Display detailed information about the VRRP groups on Device B.

[DeviceB] display vrrp verbose

IPv4 virtual router information:

 Running mode       : Standard

 Total number of virtual routers : 2

   Interface Ten-GigabitEthernet3/0/1

     VRID             : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Backup

     Config pri       : 100                  Running pri  : 100

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Become master    : 3500 milliseconds left

     Virtual IP       : 10.0.0.1

     Master IP        : 10.0.0.2

 

   Interface Ten-GigabitEthernet3/0/3

     VRID           : 2                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 120                  Running pri  : 120

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 11.0.0.1

     Virtual MAC      : 0000-5e00-0102

     Master IP        : 11.0.0.3

   VRRP track information:                                                     

     Track object   : 2                   State : Positive   Pri reduced : 50  

3.     Verify that Device B becomes the master in VRRP group 1 when Device A fails.

[DeviceB] display vrrp verbose

IPv4 virtual router information:

 Running  mode       : Standard

 Total number of virtual routers : 2

   Interface Ten-GigabitEthernet3/0/1

     VRID             : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 100                  Running pri  : 100

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 10.0.0.1

     Virtual MAC      : 0000-5e00-0101

     Master IP        : 10.0.0.3

 

   Interface Ten-GigabitEthernet3/0/3

     VRID             : 2                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 120                  Running pri  : 120

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 11.0.0.1

     Virtual MAC      : 0000-5e00-0102

     Master IP        : 11.0.0.3

   VRRP track information:                                                     

     Track object   : 2                   State : Positive   Pri reduced : 50  

4.     Verify that Device A becomes the master in VRRP group 1 after it recovers.

[DeviceA] display vrrp verbose

IPv4 virtual router information:

 Running mode      : Standard

 Total number of virtual routers : 2

   Interface Ten-GigabitEthernet3/0/1

     VRID             : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 120                  Running pri  : 120

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 10.0.0.1

     Virtual MAC      : 0000-5e00-0101

     Master IP        : 10.0.0.2

   VRRP track information:                                                     

     Track object   : 1                   State : Positive   Pri reduced : 50  

 

   Interface Ten-GigabitEthernet3/0/3

     VRID             : 2                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Backup

     Config pri       : 100                  Running pri  : 100

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Become master    : 3550 milliseconds left

     Auth type        : None

     Virtual IP       : 11.0.0.1

     Master IP        : 11.0.0.3

Configuration files

·     Device A:

#

interface Ten-GigabitEthernet3/0/1

 port link-mode route

 ip address 10.0.0.2 255.255.255.0

 vrrp vrid 1 virtual-ip 10.0.0.1

 vrrp vrid 1 priority 120

 vrrp vrid 1 preempt-mode delay 500

 vrrp vrid 1 track 1 priority reduced 50

#

interface Ten-GigabitEthernet3/0/2

 port link-mode route

 ip address 100.0.0.2 255.255.255.0

#

interface Ten-GigabitEthernet3/0/3

 port link-mode route

 ip address 11.0.0.2 255.255.255.0

 vrrp vrid 2 virtual-ip 11.0.0.1

vrrp vrid 2 preempt-mode delay 500

#

 track 1 interface ten-gigabitethernet 3/0/2

#

·     Device B:

#

interface Ten-GigabitEthernet3/0/1

 port link-mode route

 ip address 10.0.0.3 255.255.255.0

 vrrp vrid 1 virtual-ip 10.0.0.1

vrrp vrid 1 preempt-mode delay 500

#

interface Ten-GigabitEthernet3/0/2

 port link-mode route

 ip address 100.1.0.2 255.255.255.0

#

interface Ten-GigabitEthernet3/0/3

 port link-mode route

 ip address 11.0.0.3 255.255.255.0

 vrrp vrid 2 priority 120

 vrrp vrid 2 preempt-mode delay 500

 vrrp vrid 2 track 2 priority reduced 50

#

 track 2 interface ten-gigabitethernet 3/0/2

#

Example: Configuring VRRP load balancing

Network configuration

As shown in Figure 3, configure a load-balanced VRRP group on Device A, Device B, and Device C as the gateway for the hosts to meet the following requirements:

·     Packets from the hosts are load balanced among the devices.

·     If one device fails, hosts can access the external network through the other devices.

Figure 3 Network diagram

 

Analysis

To meet the network requirements, you must perform the following tasks:

·     To avoid frequent role change in the VRRP group, set a preemption delay.

·     For traffic to be switched to the other two devices when the uplink interface of one device fails, configure VF tracking on Device A, Device B, and Device C. When the uplink interface of one device fails, the weights of the VFs (including the AVF) on the device decrease by the specified value.

·     For the failed device to become the master when it recovers, configure the preemptive mode for the VRRP group.

Restrictions and guidelines

When you configure VRRP load balancing, follow these restrictions and guidelines:

·     The virtual IP address of a VRRP group cannot be any of the following addresses:

¡     All-zero address (0.0.0.0).

¡     Broadcast address (255.255.255.255).

¡     Loopback address.

¡     IP address of other than Class A, Class B, and Class C.

¡     Invalid IP address (for example, 0.0.0.1).

·     For the hosts to access the external network, make sure the following IP addresses are on the same subnet:

¡     The virtual IP address of the VRRP group.

¡     The downlink interface IP addresses of the VRRP group members.

·     IPv4 VRRP can use VRRPv2 or VRRPv3 (default version). For a VRRP group to operate correctly, make sure the VRRP versions on all devices in the VRRP group are the same.

·     In load balancing mode, the virtual IP address of a VRRP group cannot be the IP address of any interface in the VRRP group. Otherwise, VRRP load balancing cannot operate correctly.

·     If the uplink interface of the VF owner fails, an LVF must take over as the AVF. The switchover occurs when the weight of the VF owner drops below the lower limit of failure. This requires the reduced weight for the VF owner to be higher than 245.

·     Configure the same virtual IP addresses for each device in the VRRP group.

·     Make sure the decreased priority of the master is lower than the priority of all the other devices in the VRRP group. Another device in the group can then be elected as the master.

Procedures

Configuring Device A

1.     Configure the interfaces:

<DeviceA> system-view

[DeviceA] interface ten-gigabitEthernet 3/0/1

[DeviceA-Ten-GigabitEthernet3/0/1] ip address 10.1.1.2 24

[DeviceA-Ten-GigabitEthernet3/0/1] quit

2.     Configure VRRP:

# Configure VRRP to operate in load balancing mode.

[DeviceA] vrrp mode load-balance

# Create VRRP group 1, and set its virtual IP address to 10.1.1.1.

[DeviceA] interface ten-gigabitethernet 3/0/1

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 virtual-ip 10.1.1.1

# Set the priority of Device A to 120 in VRRP group 1. Device A has the highest priority in VRRP group 1, so Device A can become the master.

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 priority 120

# Configure Device A to operate in preemptive mode, and set the preemption delay to 500 centiseconds.

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 preempt-mode delay 500

[DeviceA-Ten-GigabitEthernet3/0/1] quit

3.     Configure Track:

# Create track entry 1 to monitor the link status of the uplink interface Ten-GigabitEthernet 3/0/2. If the uplink interface fails, the track entry transits to Negative.

[DeviceA] track 1 interface ten-gigabitethernet 3/0/2

# Configure the VFs in VRRP group 1 to monitor track entry 1, and decrease their weights by 250 when the track entry transits to Negative.

[DeviceA] interface ten-gigabitEthernet 3/0/1

[DeviceA-Ten-GigabitEthernet3/0/1] vrrp vrid 1 track 1 weight reduced 250

[DeviceA-Ten-GigabitEthernet3/0/1] quit

Configuring Device B

1.     Configure the interfaces:

<DeviceB> system-view

[DeviceB] interface ten-gigabitEthernet 3/0/1

[DeviceB-Ten-GigabitEthernet3/0/1] ip address 10.1.1.3 24

[DeviceB-Ten-GigabitEthernet3/0/1] quit

2.     Configure VRRP:

# Configure VRRP to operate in load balancing mode.

[DeviceB] vrrp mode load-balance

# Create VRRP group 1, and set its virtual IP address to 10.1.1.1.

[DeviceB] interface ten-gigabitethernet 3/0/1

[DeviceB-Ten-GigabitEthernet3/0/1] vrrp vrid 1 virtual-ip 10.1.1.1

# Set the priority of Device B to 110 in VRRP group 1. Device B has a higher priority than Device C in VRRP group 1, so Device B can become the master when Device A fails.

[DeviceB-Ten-GigabitEthernet3/0/1] vrrp vrid 1 priority 110

# Configure Device B to operate in preemptive mode, and set the preemption delay to 500 centiseconds.

[DeviceB-Ten-GigabitEthernet3/0/1] vrrp vrid 1 preempt-mode delay 500

[DeviceB-Ten-GigabitEthernet3/0/1] quit

3.     Configure Track:

# Create track entry 1 to monitor the link status of the uplink interface Ten-GigabitEthernet3 /0/2. When the uplink interface fails, the track entry transits to Negative.

[DeviceB] track 1 interface ten-gigabitethernet 3/0/2

# Configure the VFs in VRRP group 1 to monitor track entry 1, and decrease their weights by 250 when the track entry transits to Negative.

[DeviceB] interface ten-gigabitEthernet 3/0/1

[DeviceB-Ten-GigabitEthernet3/0/1] vrrp vrid 1 track 1 weight reduced 250

[DeviceB-Ten-GigabitEthernet3/0/1] quit

Configuring Device C

1.     Configure the interfaces:

<DeviceC> system-view

[DeviceC] interface ten-gigabitEthernet 3/0/1

[DeviceC-Ten-GigabitEthernet3/0/1] ip address 10.1.1.4 24

[DeviceC-Ten-GigabitEthernet3/0/1] quit

2.     Configure VRRP:

# Configure VRRP to operate in load balancing mode.

[DeviceC] vrrp mode load-balance

# Create VRRP group 1, and set its virtual IP address to 10.1.1.1.

[DeviceC] interface ten-gigabitethernet 3/0/1

[DeviceC-Ten-GigabitEthernet3/0/1] vrrp vrid 1 virtual-ip 10.1.1.1

# Configure Device C to operate in preemptive mode, and set the preemption delay to 500 centiseconds.

[DeviceC-Ten-GigabitEthernet3/0/1] vrrp vrid 1 preempt-mode delay 500

[DeviceC-Ten-GigabitEthernet3/0/1] quit

3.     Configure Track:

# Create track entry 1 to monitor the link status of the uplink interface Ten-GigabitEthernet 3/0/2. When the uplink interface fails, the track entry transits to Negative.

[DeviceC] track 1 interface ten-gigabitethernet 3/0/2

# Configure the VFs in VRRP group 1 to monitor track entry 1, and decrease their weights by 250 when the track entry transits to Negative.

[DeviceC] interface ten-gigabitEthernet 3/0/1

[DeviceC-Ten-GigabitEthernet3/0/1] vrrp vrid 1 track 1 weight reduced 250

[DeviceC-Ten-GigabitEthernet3/0/1] quit

Verifying the configuration

1.     Verify that Host A can ping the external network. (Details not shown.)

2.     Verify that Device A is operating as the master and Device B and Device C as the backups in VRRP group 1. Each of the three devices has one AVF and two LVFs.

# Display detailed information about VRRP group 1 on Device A.

[DeviceA] display vrrp verbose

IPv4 virtual device information:

 Running mode      : Load balance

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

    VRID              : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 120                  Running pri  : 120

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 10.1.1.1

     Member IP list   : 10.1.1.2 (Local, Master)

                        10.1.1.3 (Backup)

                        10.1.1.4 (Backup)

   Forwarder information: 3 Forwarders 1 Active

     Config weight  : 255

     Running weight : 255

    Forwarder 01

     State          : Active

     Virtual MAC    : 000f-e2ff-0011 (Owner)

     Owner ID       : 0000-5e01-1101

     Priority       : 255

     Active         : local

    Forwarder 02

     State          : Listening

     Virtual MAC    : 000f-e2ff-0012 (Learnt)

     Owner ID       : 0000-5e01-1103

     Priority       : 127

     Active         : 10.1.1.3

    Forwarder 03

     State          : Listening

     Virtual MAC    : 000f-e2ff-0013 (Learnt)

     Owner ID       : 0000-5e01-1105

     Priority       : 127

     Active         : 10.1.1.4

   Forwarder weight track information:

     Track object   : 1          State : Positive   Weight reduced : 250

# Display detailed information about VRRP group 1 on Device B.

[DeviceB] display vrrp verbose

IPv4 virtual device information:

 Running mode      : Load balance

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

    VRID              : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Backup

     Config pri       : 110                  Running pri  : 110

     Preempt node     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 10.1.1.1

     Member IP list   : 10.1.1.3 (Local, Backup)

                        10.1.1.2 (Master)

                        10.1.1.4 (Backup)

   Forwarder information: 3 Forwarders 1 Active

     Config weight  : 255

     Running weight : 255

    Forwarder 01

     State          : Listening

     Virtual MAC    : 000f-e2ff-0011 (Learnt)

     Owner ID       : 0000-5e01-1101

     Priority       : 127

     Active         : 10.1.1.2

    Forwarder 02

     State          : Active

     Virtual MAC    : 000f-e2ff-0012 (Owner)

     Owner ID       : 0000-5e01-1103

     Priority       : 255

     Active         : local

    Forwarder 03

     State          : Listening

     Virtual MAC    : 000f-e2ff-0013 (Learnt)

     Owner ID       : 0000-5e01-1105

     Priority       : 127

     Active         : 10.1.1.4

   Forwarder weight track information:

     Track object   : 1          State : Positive   Weight reduced : 250

# Display detailed information about VRRP group 1 on Device C.

[DeviceC] display vrrp verbose

IPv4 virtual device information:

 Running mode      : Load balance

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

    VRID              : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Backup

     Config pri       : 100                  Running pri  : 100

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 10.1.1.1

     Member IP list   : 10.1.1.4 (Local, Backup)

                        10.1.1.2 (Master)

                        10.1.1.3 (Backup)

   Forwarder information: 3 Forwarders 1 Active

     Config weight  : 255

     Running weight : 255

    Forwarder 01

     State          : Listening

     Virtual MAC    : 000f-e2ff-0011 (Learnt)

     Owner ID       : 0000-5e01-1101

     Priority       : 127

     Active         : 10.1.1.2

    Forwarder 02

     State          : Listening

     Virtual MAC    : 000f-e2ff-0012 (Learnt)

     Owner ID       : 0000-5e01-1103

     Priority       : 127

     Active         : 10.1.1.3

    Forwarder 03

     State          : Active

     Virtual MAC    : 000f-e2ff-0013 (Owner)

     Owner ID       : 0000-5e01-1105

     Priority       : 255

     Active         : local

   Forwarder weight track information:

     Track object   : 1          State : Positive   Weight reduced : 250

3.     Verify that AVF switchover can be performed when the uplink interface of Device A fails.

# Display detailed information about VRRP group 1 on Device A.

[DeviceA] display vrrp verbose

IPv4 virtual device information:

 Running mode      : Load balance

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

    VRID              : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 120                  Running pri  : 120

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 10.1.1.1

     Member IP list   : 10.1.1.2 (Local, Master)

                        10.1.1.3 (Backup)

                        10.1.1.4 (Backup)

   Forwarder Information: 3 Forwarders 0 Active

     Config weight  : 255

     Running weight : 5

    Forwarder 01

     State          : Initialize

     Virtual MAC    : 000f-e2ff-0011 (Owner)

     Owner ID       : 0000-5e01-1101

     Priority       : 0

     Active         : 10.1.1.4

    Forwarder 02

     State          : Initialize

     Virtual MAC    : 000f-e2ff-0012 (Learnt)

     Owner ID       : 0000-5e01-1103

     Priority       : 0

     Active         : 10.1.1.3

    Forwarder 03

     State          : Initialize

     Virtual MAC    : 000f-e2ff-0013 (Learnt)

     Owner ID       : 0000-5e01-1105

     Priority       : 0

     Active         : 10.1.1.4

   Forwarder weight track information:

     Track object   : 1          State : Negative   Weight reduced : 250

# Display detailed information about VRRP group 1 on Device C.

[DeviceC] display vrrp verbose

IPv4 virtual device information:

 Running mode      : Load balance

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

    VRID           : 1                    Adver timer  : 100 centiseconds

     Admin status   : Up                   State        : Backup

     Config pri     : 100                  Running pri  : 100

     Preempt mode   : Yes                  Delay time   : 500 centiseconds

     Auth type      : None

     Become master  : 3550 milliseconds left

     Virtual IP     : 10.1.1.1

     Member IP list : 10.1.1.4 (Local, Backup)

                      10.1.1.2 (Master)

                      10.1.1.3 (Backup)

   Forwarder information: 3 Forwarders 2 Active

     Config weight  : 255

     Running weight : 255

    Forwarder 01

     State          : Active

     Virtual MAC    : 000f-e2ff-0011 (Take Over)

     Owner ID       : 0000-5e01-1101

     Priority       : 85

     Active         : local

     Redirect time  : 93 seconds

     Time-out time  : 1293 seconds

    Forwarder 02

     State          : Listening

     Virtual MAC    : 000f-e2ff-0012 (Learnt)

     Owner ID       : 0000-5e01-1103

     Priority       : 85

     Active         : 10.1.1.3

    Forwarder 03

     State          : Active

     Virtual MAC    : 000f-e2ff-0013 (Owner)

     Owner ID       : 0000-5e01-1105

     Priority       : 255

     Active         : local

   Forwarder weight track information:

     Track object   : 1          State : Positive   Weight reduced : 250

The output shows that when the uplink interface of Device A fails, the weights of the VFs on Device A drop below the lower limit of failure. All VFs on Device A transit to Initialized state and cannot forward traffic. The VF for MAC address 000f-e2ff-0011 on Device C becomes the AVF to forward traffic.

4.     #Verify that the VF for virtual MAC address 000f-e2ff-0011 is removed from Device C when the timeout timer (about 1800 seconds) expires. The VF no longer forwards the packets destined for the MAC address.

[DeviceC] display vrrp verbose

IPv4 virtual device information:

 Running mode      : Load balance

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

    VRID              : 1                    Adver timer  : 100 centiseconds

     Admin status     : Up                   State        : Backup

     Config pri       : 100                  Running pri  : 100

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Become master    : 3550 milliseconds left

     Virtual IP       : 10.1.1.1

     Member IP list   : 10.1.1.4 (Local, Backup)

                        10.1.1.2 (Master)

                        10.1.1.3 (Backup)

   Forwarder information: 2 Forwarders 1 Active

     Config weight  : 255

     Running weight : 255

    Forwarder 02

     State          : Listening

     Virtual MAC    : 000f-e2ff-0012 (Learnt)

     Owner ID       : 0000-5e01-1103

     Priority       : 127

     Active         : 10.1.1.3

    Forwarder 03

     State          : Active

     Virtual MAC    : 000f-e2ff-0013 (Owner)

     Owner ID       : 0000-5e01-1105

     Priority       : 255

     Active         : local

   Forwarder weight track information:

     Track object   : 1          State : Positive   Weight reduced : 250

5.     Verify that Device B has a higher priority than Device C and becomes the master when Device A fails.

[DeviceB] display vrrp verbose

 IPv4 standby information:

     Run mode       : Load balance

     Run method     : Virtual MAC

 Total number of virtual routers : 1

   Interface Ten-GigabitEthernet3/0/1

    VRID              : 1                    Adver timer  : 1 centiseconds

     Admin status     : Up                   State        : Master

     Config pri       : 110                  Running pri  : 110

     Preempt mode     : Yes                  Delay time   : 500 centiseconds

     Auth type        : None

     Virtual IP       : 10.1.1.1

     Member IP list   : 10.1.1.3 (Local, Master)

                        10.1.1.4 (Backup)

   Forwarder information: 2 Forwarders 1 Active

     Config weight  : 255

     Running weight : 255

    Forwarder 02

     State          : Active

     Virtual MAC    : 000f-e2ff-0012 (Owner)

     Owner ID       : 0000-5e01-1103

     Priority       : 255

     Active         : local

    Forwarder 03

     State          : Listening

     Virtual MAC    : 000f-e2ff-0013 (Learnt)

     Owner ID       : 0000-5e01-1105

     Priority       : 127

     Active         : 10.1.1.4

   Forwarder weight track information:

     Track object   : 1          State : Positive   Weight reduced : 250

Configuration files

·     Device A:

#

 vrrp mode load-balance

#

interface Ten-GigabitEthernet3/0/1

 port link-mode route

 ip address 10.1.1.2 255.255.255.0

 vrrp vrid 1 virtual-ip 10.1.1.1

 vrrp vrid 1 priority 120

 vrrp vrid 1 preempt-mode delay 500

 vrrp vrid 1 track 1 weight reduced 250

#

interface Ten-GigabitEthernet3/0/2

 port link-mode route

#

track 1 interface Ten-GigabitEthernet3/0/2

#

·     Device B:

#

 vrrp mode load-balance

#

interface Ten-GigabitEthernet3/0/1

 port link-mode route

 ip address 10.1.1.3 255.255.255.0

 vrrp vrid 1 virtual-ip 10.1.1.1

 vrrp vrid 1 priority 110

 vrrp vrid 1 preempt-mode delay 500

 vrrp vrid 1 track 1 weight reduced 250

#

interface Ten-GigabitEthernet3/0/2

 port link-mode route

#

track 1 interface Ten-GigabitEthernet3/0/2

#

·     Device C:

#

 vrrp mode load-balance

#

interface Ten-GigabitEthernet3/0/1

 port link-mode route

 ip address 10.1.1.4 255.255.255.0

 vrrp vrid 1 virtual-ip 10.1.1.1

 vrrp vrid 1 preempt-mode delay 500

 vrrp vrid 1 track 1 weight reduced 250

#

interface Ten-GigabitEthernet3/0/2

 port link-mode route

#

track 1 interface Ten-GigabitEthernet3/0/2

#

Related documentation

·     H3C CR16000-F Routers High Availability Command Reference-R7951P01

·     H3C CR16000-F Routers High Availability Configuration Guide-R7951P01

·     H3C CR16000-F Routers Layer 2—LAN Switching Command Reference-R7951P01

·     H3C CR16000-F Routers Layer 2—LAN Switching Configuration Guide-R7951P01

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网