H3C Low-End Ethernet Switches Configuration Guide(V1.01)

HomeSupportSwitchesH3C S3100 Switch SeriesConfigure & DeployConfiguration ExamplesH3C Low-End Ethernet Switches Configuration Guide(V1.01)
Table of Contents
Related Documents
20-VRRP Configuration Guide
Title Size Download
20-VRRP Configuration Guide 119.65 KB

Single VRRP Group Configuration

Virtual Router Redundancy Protocol (VRRP) is an error-tolerant protocol defined in RFC 2338. In LANs with multicast or broadcast capabilities (such as Ethernet), VRRP can avoid single point failure through establishing backup links without modifying the configuration of dynamic routing protocols and router discovery protocols.

You can add two or more switches into a single VRRP group, which can provide two or more reliable links to the outside networks, therefore avoiding communication interruption resulting from single- or multi- point failure.

Network Diagram

Figure 1-1 Network diagram for VRRP

 

Networking and Configuration Requirements

Host A accesses Host B on the Internet, with the VRRP group consisting of Switch A and Switch B as its default gateway.

VRRP group settings:

l          VRRP group number: 1

l          Virtual router IP address of the VRRP group: 202.38.160.111/24.

l          Switch A acts as the master.

l          Switch B acts as the backup, and works in the preemptive mode.

Table 1-1 Networking description

Switch

Ethernet port connected with Host A

IP address of the VLAN interface

Switch priority in the VRRP group

Working mode

LSW-A

Ethernet 1/0/6

202.38.160.1/24

110

Preemptive mode

LSW-B

Ethernet 1/0/5

202.38.160.2/24

100 (default)

Preemptive mode

 

Applicable Product Matrix

Product series

Software version

Hardware version

S5600 series

Release 1510, Release1602

All versions

S3600-EI series

Release 1510, Release1602

All versions

 

Configuration Procedure

1)        Configure Switch A.

# Configure VLAN 2.

<LSW-A> system-view

[LSW-A] vlan 2

[LSW-A-vlan2] port Ethernet1/0/6

[LSW-A-vlan2] quit

[LSW-A] interface Vlan-interface 2

[LSW-A-Vlan-interface2] ip address 202.38.160.1 255.255.255.0

[LSW-A-Vlan-interface2] quit

# Enable a VRRP group to respond to ping operations destined for its virtual IP address.

[LSW-A] vrrp ping-enable

# Create a VRRP group.

[LSW-A] interface Vlan-interface 2

[LSW-A-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111

# Set the priority of Switch A in the VRRP group to 110.

[LSW-A-Vlan-interface2] vrrp vrid 1 priority 110

# Configure preemptive mode for the VRRP group.

[LSW-A-Vlan-interface2] vrrp vrid 1 preempt-mode

By default, a VRRP group adopts the preemptive mode.

 

2)        Configure Switch B.

# Configure VLAN 2.

<LSW-B> system-view

[LSW-B] vlan 2

[LSW-B-Vlan2] port Ethernet1/0/5

[LSW-B-vlan2] quit

[LSW-B] interface Vlan-interface 2

[LSW-B-Vlan-interface2] ip address 202.38.160.2 255.255.255.0

[LSW-B-Vlan-interface2] quit

# Enable the VRRP group to respond to ping operations destined for its virtual IP address.

[LSW-B] vrrp ping-enable

# Create a VRRP group.

[LSW-B] interface vlan 2

[LSW-B-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111

# Configure preemptive mode for the VRRP group.

[LSW-B-Vlan-interface2] vrrp vrid 1 preempt-mode

The default gateway of Host A is configured as 202.38.160.111.

Normally, Switch A functions as the gateway. When Switch A is turned off or fails, Switch B functions as the gateway.

Because Switch A is configured to work in the preemptive mode, when Switch A resumes to work, it becomes the master again to function as the gateway.

Complete Configuration

l          Configurations on Switch A

#

vrrp ping-enable

#

interface Vlan-interface1

ip address 202.38.160.1 255.255.255.0

vrrp vrid 1 virtual-ip 202.38.160.111

vrrp vrid 1 priority 110

#

interface Ethernet1/0/6

port access vlan 2

#

l          Configurations on Switch B

#

vrrp ping-enable

#

interface Vlan-interface1

ip address 202.38.160.2 255.255.255.0

vrrp vrid 1 virtual-ip 202.38.160.111

#

interface Ethernet1/0/5

port access vlan 2

#

Precautions

l          For the IP address owner, its priority in the VRRP group is always 255.

l          Do not configure multiple VRRP groups on the same VLAN interface. Otherwise, the VRRP function will be affected.

l          If both switches in the preemptive mode and switches in the non-preemptive mode exist in a VRRP group, the working mode of the VRRP group conforms to that of the master. For example, if the master works in the preemptive mode, when the master fails, the VRRP group will elect a new master through preemption although there are switches working in the non-preemptive mode.

Multiple VRRP Groups Configuration

Multiple VRRP groups can implement the link backup and load sharing functions, which can avoid communication interruption resulting from switch failure or traffic overburden on a link.

Network Diagram

Figure 1-2 Network diagram for VRRP

 

Networking and Configuration Requirements

A switch can backup multiple VRRP groups.

Multiple-VRRP group configuration can implement load sharing. For example, Switch A acts as the master of VRRP group 1 and a backup of VRRP group 2. Switch B acts as the master of VRRP group 2 and a backup of VRRP group 1. Some hosts in the network take VRRP group 1 as the gateway, while the others take VRRP group 2 as the gateway. In this way, both load sharing and mutual backup are implemented.

Applicable Product Matrix

Product series

Software version

Hardware version

S5600 series

Release 1510, Release1602

All versions

S3600-EI series

Release 1510, Release1602

All versions

 

Configuration Procedure

l          Configure Switch A.

# Configure VLAN 2.

<LSW-A> system-view

[LSW-A] vlan 2

[LSW-A-vlan2] port Ethernet1/0/6

[LSW-A-vlan2] quit

[LSW-A] interface Vlan-interface 2

[LSW-A-Vlan-interface2] ip address 202.38.160.1 255.255.255.0

# Create VRRP group 1.

[LSW-A-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111

# Set the priority of Switch A in VRRP group 1 to 150.

[LSW-A-Vlan-interface2] vrrp vrid 1 priority 150

# Create VRRP group 2.

[LSW-A-Vlan-interface2] vrrp vrid 2 virtual-ip 202.38.160.112

l          Configure Switch B.

# Configure VLAN 2.

<LSW-B> system-view

[LSW-B] vlan 2

[LSW-B-vlan2] port Ethernet1/0/6

[LSW-B-vlan2] quit

[LSW-B] interface Vlan-interface 2

[LSW-B-Vlan-interface2] ip address 202.38.160.2 255.255.255.0

# Create VRRP group 1.

[LSW-B-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111

# Create VRRP group 2.

[LSW-B-Vlan-interface2] vrrp vrid 2 virtual-ip 202.38.160.112

# Set the priority of Switch B in VRRP group 2 to 110.

[LSW-B-Vlan-interface2] vrrp vrid 2 priority 110

Complete Configuration

l          Configurations on Switch A

#

interface Vlan-interface2

ip address 202.38.160.1 255.255.255.0

vrrp vrid 1 virtual-ip 202.38.160.111

vrrp vrid 1 priority 150

vrrp vrid 2 virtual-ip 202.38.160.112

#

interface Ethernet1/0/6

port access vlan 2

#

l          Configurations on Switch B

#

interface Vlan-interface2

ip address 202.38.160.2 255.255.255.0

vrrp vrid 1 virtual-ip 202.38.160.111

vrrp vrid 2 virtual-ip 202.38.160.112

vrrp vrid 2 priority 110

#

interface Ethernet1/0/6

port access vlan 2

#

Precautions

l          For the IP address owner, its priority in the VRRP group is always 255.

l          Multiple-VRRP group configuration is commonly used in real networking, for multiple VRRP groups can implement load sharing.

l          Do not configure multiple VRRP groups on the same VLAN interface. Otherwise, the VRRP function will be affected.

l          If both switches in the preemptive mode and switches in the non-preemptive mode exist in a VRRP group, the working mode of the VRRP group conforms to that of the master. For example, if the master works in the preemptive mode, when it fails, the VRRP group will elect a new master through preemption although there are switches working in the non-preemptive mode.

VRRP Interface Tracking

VRRP interface tracking extends the backup functionality of a backup in a VRRP group. With this function enabled, a backup can backup the master not only when the VRRP group resident interface fails, but also when other interfaces of the master become unavailable. This is achieved by tracking an interface of a master.

When the tracked interface goes down, the priority of the master decreases by a specified value (value-reduced), allowing a higher priority switch in the VRRP group to become the new master.

Network Diagram

Figure 1-3 Network diagram for VRRP

 

Networking and Configuration Requirements

Switch A is the master and Switch B is the backup in a VRRP group. Both Switch A and Switch B have an interface connected with the Internet. Configure the VRRP interface tracking function, so that when the interface connected with the Internet on Switch A becomes unavailable, Switch B can replace Switch A to act as the gateway even if Switch A is still working.

Set the group number to 1.

Applicable Product Matrix

Product series

Software version

Hardware version

S5600 series

Release 1510, Release1602

All versions

S3600-EI series

Release 1510, Release1602

All versions

 

Configuration Procedure

l          Configure Switch A.

# Configure VLAN 2.

<LSW-A> system-view

[LSW-A] vlan 2

[LSW-A-vlan2] port Ethernet1/0/6

[LSW-A-vlan2] quit

[LSW-A] interface Vlan-interface 2

[LSW-A-Vlan-interface2] ip address 202.38.160.1 255.255.255.0

[LSW-A-Vlan-interface2] quit

# Enable the VRRP group to respond to ping operations destined for its virtual IP address.

[LSW-A] vrrp ping-enable

# Create VRRP group 1.

[LSW-A] interface Vlan-interface 2

[LSW-A-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111

# Set the priority of Switch A in VRRP group 1 to 110.

[LSW-A-Vlan-interface2] vrrp vrid 1 priority 110

# Set the interface to be tracked.

[LSW-A-Vlan-interface2] vrrp vrid 1 track interface Vlan-interface 3 reduced 30

l          Configure Switch B.

# Configure VLAN 2.

<LSW-B> system-view

[LSW-B] vlan 2

[LSW-B-vlan2] port Ethernet1/0/5

[LSW-B-vlan2] quit

[LSW-B] interface Vlan-interface 2

[LSW-B-Vlan-interface2] ip address 202.38.160.2 255.255.255.0

[LSW-B-Vlan-interface2] quit

# Enable a VRRP group to respond to ping operations destined for its virtual IP address.

[LSW-B] vrrp ping-enable

# Create VRRP group 1.

[LSW-B] interface Vlan-interface 2

[LSW-B-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111

Normally, Switch A acts as the gateway. When VLAN-interface 3 on Switch A becomes unavailable, the priority of Switch A decreases by 30, making the priority of Switch A lower than that of Switch B. Therefore, Switch B preempts and becomes the master to act as the gateway.

When VLAN-interface 3 resumes to work, Switch A becomes the master again to act as the gateway.

Complete Configuration

l          Configuration on Switch A

#

vrrp ping-enable

#

interface Vlan-interface2

ip address 202.38.160.1 255.255.255.0

vrrp vrid 1 virtual-ip 202.38.160.111

vrrp vrid 1 priority 110

vrrp vrid 1 track Vlan-interface1 reduced 30

#

interface Ethernet1/0/6

port access vlan 2

#

l          Configurations on Switch B

#

vrrp ping-enable

#

interface Vlan-interface2

ip address 202.38.160.2 255.255.255.0

vrrp vrid 1 virtual-ip 202.38.160.111

#

interface Ethernet1/0/5

port access vlan 2

#

Precautions

l          For the IP address owner, its priority in the VRRP group is always 255.

l          When configuring VRRP interface tracking, you are recommended to configure the uplink Trunk port to deny the VLAN that corresponds to the tracked interface.

l          When you set the priority decrease value of the master in a VRRP group, make sure that the master has a lower priority than the backups after the decrease.

VRRP Port Tracking

VRRP group port tracking function can track the link state of a physical port, and decrease the priority of the switch when the physical port fails.

With this function enabled for a VRRP group, if the tracked physical port of the master fails, the priority of the master decreases by the specified value automatically, making a new election of the master in the group.

Network Diagram

Figure 1-4 Network diagram for VRRP port tracking

 

Networking and Configuration Requirements

l          There are two switches, the master and the backup, in VRRP group 1.

l          The IP addresses of the master and the backup are 202.38.160.1 and 202.38.160.2 respectively.

l          The master is connected with the upstream network through port Ethernet 1/0/1 that belongs to VLAN 3, and is connected with a Layer 2 switch through Ethernet 1/0/2 that belongs to VLAN 2.

l          The virtual IP address of the VRRP group is 202.38.160.111.

l          Enable the port tracking function on Ethernet 1/0/1 of the master and specify that the priority of the master decreases by 50 when Ethernet 1/0/1 fails, which triggers a new master election in VRRP group 1.

Applicable Product Matrix

Product series

Software version

Hardware version

S5600 series

Release 1510, Release1602

All versions

S3600-EI series

Release 1510, Release1602

All versions

 

Configuration Procedure

On the backup, the configurations related to the upstream and downstream device connection, and the configurations related to the VRRP group have been finished. The configuration procedures are omitted here.

 

Perform the following configurations on the master:

# Configure VLAN 3.

<Sysname> system-view

[Sysname] vlan 3

[Sysname-vlan3] port Ethernet1/0/1

[Sysname-vlan3] quit

[Sysname] interface Vlan-interface 3

[Sysname-Vlan-interface3] ip address 10.100.10.2 255.255.255.0

[Sysname-Vlan-interface3] quit

# Configure VLAN 2.

[Sysname] vlan 2

[Sysname-vlan2] port Ethernet1/0/2

[Sysname-vlan2] quit

[Sysname] interface Vlan-interface 2

[Sysname-Vlan-interface2] ip address 202.38.160.1 255.255.255.0

[Sysname-Vlan-interface2] quit

# Create VRRP group 1.

[Sysname] interface Vlan-interface 2

[Sysname-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111

[Sysname-Vlan-interface2] quit

# Enter port view of Ethernet 1/0/1 and enable the VRRP port tracking function.

[Sysname] interface Ethernet1/0/1

[Sysname-Ethernet1/0/1] vrrp Vlan-interface 2 vrid 1 track reduced 50

Complete Configuration

On the master:

#

interface Vlan-interface2

 ip address 202.38.160.1 255.255.255.0

 vrrp vrid 1 virtual-ip 202.38.160.111

#

interface Vlan-interface3

 ip address 10.100.10.2 255.255.255.0

#

interface Ethernet1/0/1

 port access vlan 3

 vrrp Vlan-interface 2 vrid 1 track reduced 50

#

interface Ethernet1/0/2

 port access vlan 2

#

Precautions

l          For the IP address owner, its priority in the VRRP group is always 255.

l          When you set the priority decrease value of the master in a VRRP group, make sure that the master has a lower priority than the backups after the decrease.

  • 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
新华三官网