01-S12500_VRRP_Configuration_Examples
Chapters Download (311.23 KB)
Title | Size | Download |
---|---|---|
01-S12500_VRRP_Configuration_Examples | 311.23 KB |
Contents
Example: Configuring a single IPv4 VRRP group
Configuration restrictions and guidelines
Configuring the Layer 2 switch
Example: Configuring multiple IPv4 VRRP groups
Configuration restrictions and guidelines
Example: Configuring IPv4 VRRP load balancing mode
Configuration restrictions and guidelines
Example: Configuring a single IPv6 VRRP group
Configuration restrictions and guidelines
Configuring the Layer 2 switch
Example: Configuring multiple IPv6 VRRP groups
Configuration restrictions and guidelines
Example: Configuring IPv6 VRRP load balancing mode
Configuration restrictions and guidelines
This document provides VRRP configuration examples.
VRRP operates in either of the following modes:
· Standard mode—Complies with RFCs. In this mode, only the master can forward packets and the backups are in listening state.
· Load balancing mode—Extends the VRRP standard mode to distribute load across VRRP group members.
You can also implement load sharing by configuring multiple standard-mode VRRP groups. Each group has one master and multiple backups.
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 H3C VRRP.
As shown in Figure 1, configure a VRRP group on Switch A and Switch B as the gateway for the hosts, and implement the following requirements:
· Switch A operates as the master to forward packets from the hosts to the external network. When Switch A fails, Switch B takes over to forward packets for the hosts.
· When the uplink interface of Switch A fails, hosts can access the external network through Switch B.
· To avoid loops between Switch A, Switch B, and the Layer 2 switch, enable MSTP on them, and specify the master as the root bridge.
Configure VRRP tracking on Switch A so that when its uplink is not available, Switch A decreases its priority for Switch B to take over quickly.
This configuration example was created and verified on S12500-CMW710-R7129.
When you configure a single IPv4 VRRP group, follow these restrictions and guidelines:
· The virtual IP address of the IPv4 VRRP group and the IP address of the downlink interface of the VRRP group must be in the same subnet. Otherwise, the hosts in the subnet cannot access external networks.
· If you associate a track entry with the VRRP group on an IP address owner, the association does not take effect until the switch is not an IP address owner.
· Make sure the VRRP versions on all switches in the VRRP group are the same. Otherwise, the VRRP group cannot operate correctly.
# Configure VLAN 101.
<SwitchA> system-view
[SwitchA] vlan 101
[SwitchA-vlan101] port Gigabitethernet 2/0/1
[SwitchA-vlan101] port Gigabitethernet 2/0/24
[SwitchA-vlan101] quit
[SwitchA] interface GigabitEthernet 2/0/1
[SwitchA-GigabitEthernet2/0/1] undo shutdown
[SwitchA-GigabitEthernet2/0/1] quit
[SwitchA] interface GigabitEthernet 2/0/24
[SwitchA-GigabitEthernet2/0/24] undo shutdown
[SwitchA-GigabitEthernet2/0/24] quit
[SwitchA] interface vlan-interface 101
[SwitchA–Vlan-interface101] undo shutdown
[SwitchA-Vlan-interface101] ip address 10.0.0.2 24
[SwitchA–Vlan-interface101] quit
# Configure VLAN 4094.
[SwitchA] vlan 4094
[SwitchA-vlan4094] port Gigabitethernet 2/0/2
[SwitchA-vlan4094] quit
[SwitchA] interface GigabitEthernet 2/0/2
[SwitchA-GigabitEthernet2/0/2] undo shutdown
[SwitchA-GigabitEthernet2/0/2] quit
[SwitchA] interface vlan-interface 4094
[SwitchA–Vlan-interface4094] undo shutdown
[SwitchA-Vlan-interface4094] ip address 100.0.0.2 24
[SwitchA-Vlan-interface4094] quit
# Create VRRP group 1, and set the virtual IP address of the VRRP group to 10.0.0.1.
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] vrrp vrid 1 virtual-ip 10.0.0.1
# Set the priority of Switch A in VRRP group 1 to 120.
[SwitchA-Vlan-interface101] vrrp vrid 1 priority 120
[SwitchA-Vlan-interface101] quit
# Create track entry 1 and associate it with the link state of VLAN-interface 4094.
[SwitchA] track 1 interface Vlan-interface 4094
# Associate VRRP group 1 on VLAN-interface 101 with track entry 1 and decrease the priority of the switch in the VRRP group by 255 when the state of track entry 1 changes to negative.
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] vrrp vrid 1 track 1 reduced 255
[SwitchA-Vlan-interface101] quit
# Configure MSTP.
[SwitchA] stp region-configuration
[SwitchA-mst-region] region-name vrrp
[SwitchA-mst-region] instance 1 vlan 101
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
[SwitchA] stp instance 1 root primary
[SwitchA] stp global enable
# Configure VLAN 101.
<SwitchB> system-view
[SwitchB] vlan 101
[SwitchB-vlan101] port Gigabitethernet 3/0/1
[SwitchB-vlan101] port Gigabitethernet 3/0/24
[SwitchB-vlan101] quit
[SwitchB] interface GigabitEthernet 3/0/1
[SwitchB-GigabitEthernet3/0/1] undo shutdown
[SwitchB-GigabitEthernet3/0/1] quit
[SwitchB] interface GigabitEthernet 3/0/24
[SwitchB-GigabitEthernet3/0/24] undo shutdown
[SwitchB-GigabitEthernet3/0/24] quit
[SwitchB] interface Vlan-interface 101
[SwitchB-Vlan-interface101] undo shutdown
[SwitchB-Vlan-interface101] ip address 10.0.0.3 24
[SwitchB-Vlan-interface101] quit
# Configure VLAN 4094.
[SwitchB] vlan 4094
[SwitchB-vlan4094] port Gigabitethernet 3/0/2
[SwitchB-vlan4094] quit
[SwitchB] interface GigabitEthernet 3/0/2
[SwitchB-GigabitEthernet3/0/2] undo shutdown
[SwitchB-GigabitEthernet3/0/2] quit
[SwitchB] interface Vlan-interface 4094
[SwitchB-Vlan-interface4094] undo shutdown
[SwitchB-Vlan-interface4094] ip address 100.0.0.3 24
[SwitchB-Vlan-interface4094] quit
# Create VRRP group 1, and set the virtual IP address of the VRRP group to 10.0.0.1.
[SwitchB] interface Vlan-interface 101
[SwitchB-Vlan-interface101] vrrp vrid 1 virtual-ip 10.0.0.1
[SwitchB-Vlan-interface101] quit
# Configure MSTP.
[SwitchB] stp region-configuration
[SwitchB-mst-region] region-name vrrp
[SwitchB-mst-region] instance 1 vlan 101
[SwitchB-mst-region] active region-configuration
[SwitchB-mst-region] quit
[SwitchB] stp global enable
Configure MSTP on the Layer 2 switch in the same way MSTP is configured on Switch B.
# Ping the external network from Host A and Host B. (Details not shown.)
# Display detailed information about VRRP group 1 on Switch A.
[SwitchA] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 0
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 : 255
The output shows that Switch A is the master in VRRP group 1.
# Display detailed information about VRRP group 1 on Switch B.
[SwitchB] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 10.0.0.1
Master IP : 10.0.0.2
The output shows that Switch B is the backup in VRRP group 1.
# Display the MSTP status on the Layer 2 switch.
<L2Switch> display stp instance 1 brief
MSTID Port Role STP State Protection
1 GigabitEthernet3/0/1 ROOT FORWARDING NONE
1 GigabitEthernet3/0/2 ALTE DISCARDING NONE
The output shows that the port that connects the Layer 2 switch to Switch B is blocked.
# Display detailed information about the VRRP group on Switch B when Switch A fails or the uplink VLAN interface is down.
[SwitchB] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 10.0.0.1
Virtual MAC : 0000-5e00-0101
Master IP : 10.0.0.3
The output shows that Switch B has become the master.
· Switch A:
#
vlan 101
#
vlan 4094
#
stp region-configuration
region-name vrrp
instance 1 vlan 101
active region-configuration
#
stp instance 1 root primary
stp global enable
#
interface Vlan-interface101
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 track 1 reduced 255
#
interface Vlan-interface4094
ip address 100.0.0.2 255.255.255.0
#
interface GigabitEthernet2/0/1
port link-mode bridge
port access vlan 101
#
interface GigabitEthernet2/0/2
port link-mode bridge
port access vlan 4094
#
interface GigabitEthernet2/0/24
port link-mode bridge
port access vlan 101
#
track 1 interface Vlan-interface 4094
#
· Switch B:
#
vlan 101
#
vlan 4094
#
stp region-configuration
region-name vrrp
instance 1 vlan 101
active region-configuration
#
stp global enable
#
interface Vlan-interface101
ip address 10.0.0.3 255.255.255.0
vrrp vrid 1 virtual-ip 10.0.0.1
#
interface Vlan-interface4094
ip address 100.0.0.3 255.255.255.0
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 101
#
interface GigabitEthernet3/0/2
port link-mode bridge
port access vlan 4094
#
interface GigabitEthernet3/0/24
port link-mode bridge
port access vlan 101
#
As shown in Figure 2, Switch A and Switch B form two VRRP groups. Implement the following requirements:
· Switch A operates as the master of VRRP group 1 to forward packets from Area A, and Switch B operates as the master of VRRP group 2 to forward packets from Area B. When one of the switches fails, the other switch provides gateway service for both areas.
· When the uplink interface of one switch fails, hosts can access the external network through the other switch.
· To avoid loops between Switch A, Switch B, and the Layer 2 switch, enable MSTP on them, and specify the masters as the root bridges.
Configure VRRP tracking on the master so that when its uplink is not available, the master decreases its priority for the backup to take over quickly.
This configuration example was created and verified on S12500-CMW710-R7129.
When you configure multiple IPv4 VRRP groups, follow these restrictions and guidelines:
· The virtual IP addresses of an IPv4 VRRP group and the IP address of the downlink interface of the VRRP group must be in the same subnet. Otherwise, the hosts in the subnet cannot access external networks.
· If you associate a track entry with a VRRP group on an IP address owner, the association does not take effect until the switch is not an IP address owner.
· Make sure the VRRP versions on all switches in the VRRP group are the same. Otherwise, the VRRP group cannot operate correctly.
# Configure VLAN 101.
<SwitchA> system-view
[SwitchA] vlan 101
[SwitchA-vlan101] port Gigabitethernet 2/0/1
[SwitchA-vlan101] quit
[SwitchA] interface GigabitEthernet 2/0/1
[SwitchA-GigabitEthernet2/0/1] undo shutdown
[SwitchA-GigabitEthernet2/0/1] quit
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] undo shutdown
[SwitchA-Vlan-interface101] ip address 10.0.0.2 24
[SwitchA-Vlan-interface101] quit
# Configure VLAN 102.
[SwitchA] vlan 102
[SwitchA-vlan102] port Gigabitethernet 2/0/3
[SwitchA-vlan102] quit
[SwitchA] interface GigabitEthernet 2/0/3
[SwitchA-GigabitEthernet2/0/3] undo shutdown
[SwitchA-GigabitEthernet2/0/3] quit
[SwitchA] interface vlan-interface 102
[SwitchA-Vlan-interface102] undo shutdown
[SwitchA-Vlan-interface102] ip address 11.0.0.2 24
[SwitchA-Vlan-interface102] quit
# Configure VLAN 4094.
[SwitchA] vlan 4094
[SwitchA-vlan4094] port Gigabitethernet 2/0/2
[SwitchA-vlan4094] quit
[SwitchA] interface GigabitEthernet 2/0/2
[SwitchA-GigabitEthernet2/0/2] undo shutdown
[SwitchA-GigabitEthernet2/0/2] quit
[SwitchA] interface vlan-interface 4094
[SwitchA-Vlan-interface4094] undo shutdown
[SwitchA-Vlan-interface4094] ip address 100.0.0.2 24
[SwitchA-Vlan-interface4094] quit
# Configure GigabitEthernet 2/0/24 as a trunk port, and assign it to VLAN 101 and VLAN 102.
[SwitchA] interface GigabitEthernet2/0/24
[SwitchA-GigabitEthernet2/0/24] undo shutdown
[SwitchA-GigabitEthernet2/0/24] port link-type trunk
[SwitchA-GigabitEthernet2/0/24] undo port trunk permit vlan 1
[SwitchA-GigabitEthernet2/0/24] port trunk permit vlan 101 to 102
[SwitchA-GigabitEthernet2/0/24] port trunk pvid vlan 101
[SwitchA-GigabitEthernet2/0/24] quit
# Create VRRP group 1, and set the virtual IP address of the VRRP group to 10.0.0.1.
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] vrrp vrid 1 virtual-ip 10.0.0.1
# Set the priority of Switch A in VRRP group 1 to 120.
[SwitchA-Vlan-interface101] vrrp vrid 1 priority 120
[SwitchA-Vlan-interface101] quit
# Create track entry 1 and associate it with the link state of VLAN-interface 4094.
[SwitchA] track 1 interface Vlan-interface 4094
# Associate VRRP group 1 on VLAN-interface 101 with track entry 1 and decrease the priority of the switch in the VRRP group by 255 when the state of track entry 1 changes to negative.
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] vrrp vrid 1 track 1 reduced 255
[SwitchA-Vlan-interface101] quit
# Create VRRP group 2, and set the virtual IP address of the VRRP group to 11.0.0.1.
[SwitchA] interface vlan-interface 102
[SwitchA-Vlan-interface102] vrrp vrid 1 virtual-ip 11.0.0.1
[SwitchA-Vlan-interface102] quit
# Configure MSTP.
[SwitchA] stp region-configuration
[SwitchA-mst-region] region-name vrrp
[SwitchA-mst-region] instance 1 vlan 101
[SwitchA-mst-region] instance 2 vlan 102
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
[SwitchA] stp instance 1 root primary
[SwitchA] stp global enable
# Configure VLAN 101.
<SwitchB> system-view
[SwitchB] vlan 101
[SwitchB-vlan101] port Gigabitethernet 3/0/1
[SwitchB-vlan101] quit
[SwitchB] interface GigabitEthernet 3/0/1
[SwitchB-GigabitEthernet3/0/1] undo shutdown
[SwitchB-GigabitEthernet3/0/1] quit
[SwitchB] interface vlan-interface 101
[SwitchB-Vlan-interface101] undo shutdown
[SwitchB-Vlan-interface101] ip address 10.0.0.3 24
[SwitchB-Vlan-interface101] quit
# Configure VLAN 102.
[SwitchB] vlan 102
[SwitchB-vlan102] port Gigabitethernet 3/0/3
[SwitchB-vlan102] quit
[SwitchB] interface GigabitEthernet 3/0/3
[SwitchB-GigabitEthernet3/0/3] undo shutdown
[SwitchB-GigabitEthernet3/0/3] quit
[SwitchB] interface vlan-interface 102
[SwitchB-Vlan-interface102] undo shutdown
[SwitchB-Vlan-interface102] ip address 11.0.0.3 24
[SwitchB-Vlan-interface102] quit
# Configure VLAN 4094.
[SwitchB] vlan 4094
[SwitchB-vlan4094] port Gigabitethernet 3/0/2
[SwitchB-vlan4094] quit
[SwitchB] interface GigabitEthernet 3/0/2
[SwitchB-GigabitEthernet3/0/2] undo shutdown
[SwitchB-GigabitEthernet3/0/2] quit
[SwitchB] interface vlan-interface 4094
[SwitchB-Vlan-interface4094] undo shutdown
[SwitchB-Vlan-interface4094] ip address 100.0.0.3 24
[SwitchB-Vlan-interface4094] quit
# Configure GigabitEthernet 3/0/24 as a trunk port, and assign it to VLAN 101 and VLAN 102.
[SwitchB] interface GigabitEthernet3/0/24
[SwitchB-GigabitEthernet3/0/24] undo shutdown
[SwitchB-GigabitEthernet3/0/24] port link-type trunk
[SwitchB-GigabitEthernet3/0/24] undo port trunk permit vlan 1
[SwitchB-GigabitEthernet3/0/24] port trunk permit vlan 101 to 102
[SwitchB-GigabitEthernet3/0/24] port trunk pvid vlan 101
[SwitchB-GigabitEthernet3/0/24] quit
# Create VRRP group 1, and set the virtual IP address of the VRRP group to 10.0.0.1.
[SwitchB] interface vlan-interface 101
[SwitchB-Vlan-interface101] vrrp vrid 1 virtual-ip 10.0.0.1
[SwitchB-Vlan-interface101] quit
# Create VRRP group 2, and set the virtual IP address of the VRRP group to 11.0.0.1.
[SwitchB] interface vlan-interface 102
[SwitchB-Vlan-interface102] vrrp vrid 1 virtual-ip 11.0.0.1
# Set the priority of Switch B in VRRP group 2 to 120.
[SwitchB-Vlan-interface102] vrrp vrid 1 priority 120
[SwitchB-Vlan-interface102] quit
# Create track entry 1 and associate it with the link state of VLAN-interface 4094.
[SwitchB] track 1 interface Vlan-interface 4094
# Associate VRRP group 2 on VLAN-interface 102 with track entry 1. Decrease the priority of the switch in the VRRP group by 255 when the state of track entry 1 changes to negative.
[SwitchB] interface vlan-interface 102
[SwitchB-Vlan-interface102] vrrp vrid 1 track 1 reduced 255
[SwitchB-Vlan-interface102] quit
# Configure MSTP.
[SwitchB] stp region-configuration
[SwitchB-mst-region] region-name vrrp
[SwitchB-mst-region] instance 1 vlan 101
[SwitchB-mst-region] instance 2 vlan 102
[SwitchB-mst-region] active region-configuration
[SwitchB-mst-region] quit
[SwitchB] stp instance 2 root primary
[SwitchB] stp global enable
# Ping the external network from hosts in area A and area B. (Details not shown.)
# Display detailed information about the VRRP groups on Switch A.
[SwitchA] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 2
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 0
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 : 255
Interface Vlan-interface102
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 11.0.0.1
Master IP : 11.0.0.3
The output shows that Switch A is the master in VRRP group 1 and is the backup in VRRP group 2.
# Display detailed information about the VRRP groups on Switch B.
[SwitchB] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 2
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 10.0.0.1
Master IP : 10.0.0.2
Interface Vlan-interface102
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 11.0.0.1
Virtual MAC : 0000-5e00-0101
Master IP : 11.0.0.3
VRRP Track Information:
Track object: 1 State :positive Pri Reduced : 255
The output shows that Switch B is the backup in VRRP group 1 and is the master in VRRP group 2.
# Display the MSTP status on Switch A.
[SwitchA] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet2/0/1 DESI FORWARDING NONE
0 GigabitEthernet2/0/24 DESI FORWARDING NONE
0 GigabitEthernet2/0/3 ROOT FORWARDING NONE
1 GigabitEthernet2/0/1 DESI FORWARDING NONE
1 GigabitEthernet2/0/24 DESI FORWARDING NONE
2 GigabitEthernet2/0/24 ROOT FORWARDING NONE
2 GigabitEthernet2/0/3 ALTE DISCARDING NONE
The output shows that GigabitEthernet 2/0/3 on Switch A is blocked in MSTI 2.
# Display the MSTP status on Switch B.
[SwitchB] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet3/0/1 DESI FORWARDING NONE
0 GigabitEthernet3/0/24 ALTE DISCARDING NONE
0 GigabitEthernet3/0/3 ROOT FORWARDING NONE
1 GigabitEthernet3/0/1 ALTE DISCARDING NONE
1 GigabitEthernet3/0/24 ROOT FORWARDING NONE
2 GigabitEthernet3/0/24 DESI FORWARDING NONE
2 GigabitEthernet3/0/3 DESI FORWARDING NONE
The output shows that GigabitEthernet 3/0/1 on Switch B is blocked in MSTI 1.
# Display detailed information about the VRRP groups on Switch B when Switch A fails or the uplink VLAN interface is down.
[SwitchB] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 2
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 10.0.0.1
Virtual MAC : 0000-5e00-0101
Master IP : 10.0.0.3
Interface Vlan-interface102
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 11.0.0.1
Virtual MAC : 0000-5e00-0101
Master IP : 11.0.0.3
VRRP Track Information:
Track Object: 1 State : Positive Pri Reduced : 255
The output shows that Switch B has become the master in VRRP group 1.
· Switch A:
#
vlan 101 to 102
#
vlan 4094
#
stp region-configuration
region-name vrrp
instance 1 vlan 101
instance 2 vlan 102
active region-configuration
#
stp instance 1 root primary
stp global enable
#
interface Vlan-interface101
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 track 1 reduced 255
#
interface Vlan-interface102
ip address 11.0.0.2 255.255.255.0
vrrp vrid 1 virtual-ip 11.0.0.1
#
interface Vlan-interface4094
ip address 100.0.0.2 255.255.255.0
#
interface GigabitEthernet2/0/1
port link-mode bridge
port access vlan 101
#
interface GigabitEthernet2/0/2
port link-mode bridge
port access vlan 4094
#
interface GigabitEthernet2/0/3
port link-mode bridge
port access vlan 102
#
interface GigabitEthernet2/0/24
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 101 to 102
port trunk pvid vlan 101
#
track 1 interface Vlan-interface 4094
#
· Switch B:
#
vlan 101 to 102
#
vlan 4094
#
stp region-configuration
region-name vrrp
instance 1 vlan 101
instance 2 vlan 102
active region-configuration
#
stp instance 2 root primary
stp global enable
#
interface Vlan-interface101
ip address 10.0.0.3 255.255.255.0
vrrp vrid 1 virtual-ip 10.0.0.1
#
interface Vlan-interface102
ip address 11.0.0.3 255.255.255.0
vrrp vrid 1 virtual-ip 11.0.0.1
vrrp vrid 1 priority 120
vrrp vrid 1 track 1 reduced 255
#
interface Vlan-interface4094
ip address 100.0.0.3 255.255.255.0
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 101
#
interface GigabitEthernet3/0/2
port link-mode bridge
port access vlan 4094
#
interface GigabitEthernet3/0/3
port link-mode bridge
port access vlan 102
#
interface GigabitEthernet3/0/24
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 101 to 102
port trunk pvid vlan 101
#
track 1 interface Vlan-interface 4094
#
As shown in Figure 3, Switch A, Switch B, and Switch C form a load-balanced VRRP group and use the virtual IP address 10.1.1.1/24 to provide gateway service. Implement the following requirements:
· Switch A operates as the master to forward packets from Host A. When Switch A fails, Switch B or Switch C takes over to forward packets for Host A.
· Packets from the hosts are forwarded by different switches to reduce the burden of the master.
· When the upstream link of the active virtual forwarder (AVF) fails, the AVF can notify a listening virtual forwarder (LVF) to take over.
For the AVF to notify an LVF to take over its role when the upstream link of the AVF fails, configure VF tracking on each gateway to monitor the uplink.
Use BFD to monitor the upstream link state of the VF owner, and use the tracking function to establish the collaboration between the VFs and BFD. When the upstream link fails, the state of the track entry changes to Negative, and the weights of the VFs (including the AVF) on the switch decrease by a specified value. The corresponding LVF with a higher priority on another switch becomes the AVF and forwards packets.
This configuration example was created and verified on S12500-CMW710-R7129.
When you configure IPv4 VRRP load balancing mode, follow these restrictions and guidelines:
· In load balancing mode, the virtual IP address of a VRRP group can be any unassigned IP address of the subnet where the VRRP group resides. The virtual IP address of a VRRP group cannot be the IP address of any interface in the VRRP group. No IP address owner can exist in a VRRP group.
· The virtual IP addresses of an IPv4 VRRP group and the IP address of the downlink interface of the VRRP group must be in the same subnet. Otherwise, the hosts in the subnet cannot access external networks.
· Make sure the VRRP versions on all switches in the VRRP group are the same. Otherwise, the VRRP group cannot operate correctly.
· The source IP address of BFD echo packets cannot be on the same network segment as any local interface's IP address.
# Configure VLAN 2.
<SwitchA> system-view
[SwitchA] vlan 2
[SwitchA-vlan2] port Gigabitethernet 3/0/1
[SwitchA-vlan2] quit
[SwitchA] interface GigabitEthernet 3/0/1
[SwitchA-GigabitEthernet3/0/1] undo shutdown
[SwitchA-GigabitEthernet3/0/1] quit
[SwitchA] interface vlan-interface 2
[SwitchA–Vlan-interface2] undo shutdown
[SwitchA-Vlan-interface2] ip address 10.1.1.2 24
[SwitchA–Vlan-interface2] quit
# Configure VLAN 4094.
[SwitchA] vlan 4094
[SwitchA-vlan4094] port Gigabitethernet 3/0/5
[SwitchA-vlan4094] quit
[SwitchA] interface GigabitEthernet 3/0/5
[SwitchA-GigabitEthernet3/0/5] undo shutdown
[SwitchA-GigabitEthernet3/0/5] quit
[SwitchA] interface vlan-interface 4094
[SwitchA–Vlan-interface4094] undo shutdown
[SwitchA-Vlan-interface4094] ip address 100.0.0.2 24
[SwitchA–Vlan-interface4094] quit
# Configure VRRP to operate in load balancing mode.
[SwitchA] vrrp mode load-balance
# Create VRRP group 1, and set the virtual IP address for the group to 10.1.1.1.
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.1
# Set the priority of Switch A in VRRP group 1 to 120.
[SwitchA-Vlan-interface2] vrrp vrid 1 priority 120
# Configure VRRP tracking for the VF.
[SwitchA-Vlan-interface2] vrrp vrid 1 weight track 1 reduced 255
[SwitchA-Vlan-interface2] quit
# Configure the source IP address of BFD echo packets as 45.45.45.45.
[SwitchA] bfd echo-source-ip 45.45.45.45
# Configure the minimum interval for receiving BFD echo packets as 100 milliseconds.
[SwitchA] interface vlan-interface 4094
[SwitchA-Vlan-interface4094] bfd min-echo-receive-interval 100
# Configure the single-hop detection time multiplier as 3.
[SwitchA-Vlan-interface4094] bfd detect-multiplier 3
[SwitchA–Vlan-interface4094] quit
# Create track entry 1, which uses BFD to monitor the link between local IP address 100.0.0.1 and remote IP address 100.0.0.2 by sending BFD echo packets out from the VLAN-interface 4094.
[SwitchA] track 1 bfd echo interface Vlan-interface4094 remote ip 100.0.0.1 local ip 100.0.0.2
# Configure VLAN 2.
<SwitchB> system-view
[SwitchB] vlan 2
[SwitchB-vlan2] port Gigabitethernet 3/0/1
[SwitchB-vlan2] quit
[SwitchB] interface GigabitEthernet 3/0/1
[SwitchB-GigabitEthernet3/0/1] undo shutdown
[SwitchB-GigabitEthernet3/0/1] quit
[SwitchB] interface vlan-interface 2
[SwitchB–Vlan-interface2] undo shutdown
[SwitchB-Vlan-interface2] ip address 10.1.1.3 24
[SwitchB-Vlan-interface2] quit
# Configure VLAN 4094.
[SwitchB] vlan 4094
[SwitchB-vlan4094] port Gigabitethernet 3/0/5
[SwitchB-vlan4094] quit
[SwitchB] interface GigabitEthernet 3/0/5
[SwitchB-GigabitEthernet3/0/5] undo shutdown
[SwitchB-GigabitEthernet3/0/5] quit
[SwitchB] interface vlan-interface 4094
[SwitchB–Vlan-interface4094] undo shutdown
[SwitchB-Vlan-interface4094] ip address 100.0.0.3 24
[SwitchB–Vlan-interface4094] quit
# Configure VRRP to operate in load balancing mode.
[SwitchB] vrrp mode load-balance
# Create VRRP group 1, and set the virtual IP address for the group to 10.1.1.1.
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.1
# Set the priority of Switch B in VRRP group 1 to 110.
[SwitchB-Vlan-interface2] vrrp vrid 1 priority 110
# Configure VRRP tracking for the VF.
[SwitchB-Vlan-interface2] vrrp vrid 1 weight track 1 reduced 255
[SwitchB-Vlan-interface2] quit
# Configure the source IP address of BFD echo packets as 56.56.56.56.
[SwitchB] bfd echo-source-ip 56.56.56.56
# Configure the minimum interval for receiving BFD echo packets as 100 milliseconds.
[SwitchB] interface vlan-interface 4094
[SwitchB-Vlan-interface4094] bfd min-echo-receive-interval 100
# Configure the single-hop detection time multiplier as 3.
[SwitchB-Vlan-interface4094] bfd detect-multiplier 3
[SwitchB–Vlan-interface4094] quit
# Create track entry 1, which uses BFD to monitor the link between local IP address 100.0.0.1 and remote IP address 100.0.0.2 by sending BFD echo packets out from the VLAN-interface 4094.
[SwitchB] track 1 bfd echo interface Vlan-interface4094 remote ip 100.0.0.1 local ip 100.0.0.3
# Configure VLAN 2.
<SwitchC> system-view
[SwitchC] vlan 2
[SwitchC-vlan2] port Gigabitethernet 3/0/1
[SwitchC-vlan2] quit
[SwitchC] interface GigabitEthernet 3/0/1
[SwitchC-GigabitEthernet3/0/1] undo shutdown
[SwitchC-GigabitEthernet3/0/1] quit
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] undo shutdown
[SwitchC-Vlan-interface2] ip address 10.1.1.4 24
[SwitchC-Vlan-interface2] quit
# Configure VLAN 4094.
[SwitchC] vlan 4094
[SwitchC-vlan4094] port Gigabitethernet 3/0/5
[SwitchC-vlan4094] quit
[SwitchC] interface GigabitEthernet 3/0/5
[SwitchC-GigabitEthernet3/0/5] undo shutdown
[SwitchC-GigabitEthernet3/0/5] quit
[SwitchC] interface vlan-interface 4094
[SwitchC-Vlan-interface4094] undo shutdown
[SwitchC-Vlan-interface4094] ip address 100.0.0.4 24
[SwitchC-Vlan-interface4094] quit
# Configure VRRP to operate in load balancing mode.
[SwitchC] vrrp mode load-balance
# Create VRRP group 1, and set the virtual IP address for the group to 10.1.1.1.
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.1
# Configure VRRP tracking for the VF.
[SwitchC-Vlan-interface2] vrrp vrid 1 weight track 1 reduced 255
[SwitchC-Vlan-interface2] quit
# Configure the source IP address of BFD echo packets as 67.67.67.67.
[SwitchC] bfd echo-source-ip 67.67.67.67
# Configure the minimum interval for receiving BFD echo packets as 100 milliseconds.
[SwitchC] interface vlan-interface 4094
[SwitchC-Vlan-interface4094] bfd min-echo-receive-interval 100
# Configure the single-hop detection time multiplier as 3.
[SwitchC-Vlan-interface4094] bfd detect-multiplier 3
[SwitchC–Vlan-interface4094] quit
# Create track entry 1. Track entry 1 uses BFD to monitor the link between local IP address 100.0.0.1 and remote IP address 100.0.0.2 by sending BFD echo packets out from the VLAN-interface 4094.
[SwitchC] track 1 bfd echo interface Vlan-interface4094 remote ip 100.0.0.1 local ip 100.0.0.4
# Ping the external network from Host A, Host B, and Host C. (Details not shown.)
# Display detailed information about VRRP group 1 on Switch A.
[SwitchA] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 1
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 10.1.1.1
Master IP : 10.1.1.2
Forwarder Information: 3 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Active
Virtual MAC : 000f-e2ff-0011 (Owner)
Owner ID : 6697-1250-0100
Priority : 255
Active : local
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-0012 (Learnt)
Owner ID : 00e0-6405-3100
Priority : 127
Active : 10.1.1.3
Forwarder 03
State : Listening
Virtual MAC : 000f-e2ff-0013 (Learnt)
Owner ID : 0001-0002-0103
Priority : 127
Active : 10.1.1.4
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 255
# Display detailed information about VRRP group 1 on Switch B.
[SwitchB] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 1
Admin Status : Up State : Backup
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 10.1.1.1
Master IP : 10.1.1.2
Forwarder Information: 3 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Listening
Virtual MAC : 000f-e2ff-0011 (Learnt)
Owner ID : 6697-1250-0100
Priority : 127
Active : 10.1.1.2
Forwarder 02
State : Active
Virtual MAC : 000f-e2ff-0012 (Owner)
Owner ID : 00e0-6405-3100
Priority : 255
Active : local
Forwarder 03
State : Listening
Virtual MAC : 000f-e2ff-0013 (Learnt)
Owner ID : 0001-0002-0103
Priority : 127
Active : 10.1.1.4
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 255
# Display detailed information about VRRP group 1 on Switch C.
[SwitchC] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 1
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 10.1.1.1
Master IP : 10.1.1.2
Forwarder Information: 3 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Listening
Virtual MAC : 000f-e2ff-0011 (Learnt)
Owner ID : 6697-1250-0100
Priority : 127
Active : 10.1.1.2
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-0012 (Learnt)
Owner ID : 00e0-6405-3100
Priority : 127
Active : 10.1.1.3
Forwarder 03
State : Active
Virtual MAC : 000f-e2ff-0013 (Owner)
Owner ID : 0001-0002-0103
Priority : 255
Active : local
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 255
The output shows that in VRRP group 1, Switch A is the master, and Switch B and Switch C are the backups. An active VF and two listening VFs exist on each switch.
# Display detailed information about VRRP group 1 on Switch C when Switch A fails.
[SwitchC] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 1
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 10.1.1.1
Master IP : 10.1.1.3
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 : 6697-1250-0100
Priority : 85
Active : local
Redirect Time : 588 secs
Time-out Time : 1788 secs
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-0012 (Learnt)
Owner ID : 00e0-6405-3100
Priority : 85
Active : 10.1.1.3
Forwarder 03
State : Active
Virtual MAC : 000f-e2ff-0013 (Owner)
Owner ID : 0001-0002-0103
Priority : 255
Active : local
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 255
The output shows that Switch B becomes the master after Switch A fails. Switch C becomes an AVF with virtual MAC address 000f-e2ff-0011 mapped to it and forwards packets sent by Host A.
· Switch A:
#
vlan 2
#
vlan 4094
#
vrrp mode load-balance
#
bfd echo-source-ip 45.45.45.45
#
interface Vlan-interface2
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 weight track 1 reduced 255
#
interface Vlan-interface4094
ip address 100.0.0.2 255.255.255.0
bfd min-echo-receive-interval 100
bfd detect-multiplier 3
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 2
#
interface GigabitEthernet3/0/5
port link-mode bridge
port access vlan 4094
#
track 1 bfd echo interface Vlan-interface4094 remote ip 100.0.0.1 local ip 100.0.0.2
#
· Switch B:
#
vlan 2
#
vlan 4094
#
vrrp mode load-balance
#
bfd echo-source-ip 56.56.56.56
#
interface Vlan-interface2
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 weight track 1 reduced 255
#
interface Vlan-interface4094
ip address 100.0.0.3 255.255.255.0
bfd min-echo-receive-interval 100
bfd detect-multiplier 3
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 2
#
#
interface GigabitEthernet3/0/5
port link-mode bridge
port access vlan 4094
#
track 1 bfd echo interface Vlan-interface4094 remote ip 100.0.0.1 local ip 100.0.0.3
#
· Switch C:
#
vlan 2
#
vlan 4094
#
vrrp mode load-balance
#
bfd echo-source-ip 67.67.67.67
#
interface Vlan-interface2
ip address 10.1.1.4 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.1.1
vrrp vrid 1 weight track 1 reduced 255
#
interface Vlan-interface4094
ip address 100.0.0.4 255.255.255.0
bfd min-echo-receive-interval 100
bfd detect-multiplier 3
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 2
#
#
interface GigabitEthernet3/0/5
port link-mode bridge
port access vlan 4094
#
track 1 bfd echo interface Vlan-interface4094 remote ip 100.0.0.1 local ip 100.0.0.4
#
As shown in Figure 4, configure a VRRP group on Switch A and Switch B as the gateway for the hosts, and implement the following requirements:
· Switch A operates as the master to forward packets from the hosts to the external network. When Switch A fails, Switch B takes over to forward packets for the hosts.
· When the uplink interface of Switch A fails, hosts can access the external network through Switch B.
· To avoid loops between Switch A, Switch B, and the Layer 2 switch, enable MSTP on them, and specify the master as the root bridge.
Configure VRRP tracking on Switch A so that when its uplink is not available, Switch A decreases its priority for Switch B to take over quickly.
This configuration example was created and verified on S12500-CMW710-R7129.
When you configure a single IPv6 VRRP group, follow these restrictions and guidelines:
· The virtual IPv6 addresses of the VRRP group and the IPv6 address of the downlink interface of the VRRP group must be in the same subnet. Otherwise, the hosts in the subnet cannot access external networks.
· If you associate a track entry with a VRRP group on an IP address owner, the association does not take effect until the switch is not an IP address owner.
# Configure VLAN 101.
<SwitchA> system-view
[SwitchA] vlan 101
[SwitchA-vlan101] port Gigabitethernet 2/0/1
[SwitchA-vlan101] port Gigabitethernet 2/0/24
[SwitchA-vlan101] quit
[SwitchA] interface GigabitEthernet 2/0/1
[SwitchA-GigabitEthernet2/0/1] undo shutdown
[SwitchA-GigabitEthernet2/0/1] quit
[SwitchA] interface GigabitEthernet 2/0/24
[SwitchA-GigabitEthernet2/0/24] undo shutdown
[SwitchA-GigabitEthernet2/0/24] quit
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] undo shutdown
[SwitchA-Vlan-interface101] ipv6 address 10::2 64
[SwitchA-Vlan-interface101] quit
# Configure VLAN 4094.
[SwitchA] vlan 4094
[SwitchA-vlan4094] port Gigabitethernet 2/0/2
[SwitchA-vlan4094] quit
[SwitchA] interface GigabitEthernet 2/0/2
[SwitchA-GigabitEthernet2/0/2] undo shutdown
[SwitchA-GigabitEthernet2/0/2] quit
[SwitchA] interface vlan-interface 4094
[SwitchA-Vlan-interface4094] undo shutdown
[SwitchA-Vlan-interface4094] ipv6 address 100::2 64
[SwitchA-Vlan-interface4094] quit
# Create VRRP group 1, and set the virtual IPv6 addresses of the VRRP group to FE80::1 and 10::1.
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
[SwitchA-Vlan-interface101] vrrp ipv6 vrid 1 virtual-ip 10::1
# Set the priority of Switch A in VRRP group 1 to 120.
[SwitchA-Vlan-interface101] vrrp ipv6 vrid 1 priority 120
[SwitchA-Vlan-interface101] quit
# Create track entry 1 and associate it with the link state of VLAN-interface 4094.
[SwitchA] track 1 interface vlan-interface 4094
# Associate VRRP group 1 on VLAN-interface 101 with track entry 1. Decrease the priority of the switch in the VRRP group by 255 when the state of track entry 1 changes to negative.
[switchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] vrrp ipv6 vrid 1 track 1 reduced 255
[SwitchA-Vlan-interface101] quit
# Configure MSTP.
[SwitchA] stp region-configuration
[SwitchA-mst-region] region-name vrrp
[SwitchA-mst-region] instance 1 vlan 101
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
[SwitchA] stp instance 1 root primary
[SwitchA] stp global enable
# Configure VLAN 101.
<SwitchB> system-view
[SwitchB] vlan 101
[SwitchB-vlan101] port Gigabitethernet 3/0/1
[SwitchB-vlan101] port Gigabitethernet 3/0/24
[SwitchB-vlan101] quit
[SwitchB] interface GigabitEthernet 3/0/1
[SwitchB-GigabitEthernet3/0/1] undo shutdown
[SwitchB-GigabitEthernet3/0/1] quit
[SwitchB] interface GigabitEthernet 3/0/24
[SwitchB-GigabitEthernet3/0/24] undo shutdown
[SwitchB-GigabitEthernet3/0/24] quit
[SwitchB] interface vlan-interface 101
[SwitchB-Vlan-interface101] undo shutdown
[SwitchB-Vlan-interface101] ipv6 address 10::3 64
[SwitchB-Vlan-interface101] quit
# Configure VLAN 4094.
[SwitchB] vlan 4094
[SwitchB-vlan4094] port Gigabitethernet 3/0/2
[SwitchB-vlan4094] quit
[SwitchB] interface GigabitEthernet 3/0/2
[SwitchB-GigabitEthernet3/0/2] undo shutdown
[SwitchB-GigabitEthernet3/0/2] quit
[SwitchB] interface vlan-interface 4094
[SwitchB-Vlan-interface4094] undo shutdown
[SwitchB-Vlan-interface4094] ipv6 address 100::3 64
[SwitchB-Vlan-interface4094] quit
# Create VRRP group 1, and set the virtual IPv6 addresses of the VRRP group to FE80::1 and 10::1.
[SwitchB] interface vlan-interface 101
[SwitchB-Vlan-interface101] vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
[SwitchB-Vlan-interface101] vrrp ipv6 vrid 1 virtual-ip 10::1
[SwitchB-Vlan-interface101] quit
# Configure MSTP.
[SwitchB] stp region-configuration
[SwitchB-mst-region] region-name vrrp
[SwitchB-mst-region] instance 1 vlan 101
[SwitchB-mst-region] active region-configuration
[SwitchB-mst-region] quit
[SwitchB] stp global enable
Configure MSTP on the Layer 2 switch in the same way MSTP is configured on Switch B.
# Ping the external network from Host A and Host B. (Details not shown.)
# Display detailed information about VRRP group 1 on Switch A.
[SwitchA] display vrrp ipv6 verbose
IPv6 virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::1
10::1
Virtual MAC : 0000-5e00-0201
Master IP : FE80::2E0:64FF:FE05:3100
VRRP Track Information:
Track Object: 1 State : Positive Pri Reduced : 255
The output shows that Switch A is the master in VRRP group 1.
# Display detailed information about VRRP group 1 on Switch B.
[SwitchB] display vrrp ipv6 verbose
IPv6 virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::1
10::1
Master IP : FE80::2E0:64FF:FE05:3100
The output shows that Switch B is the backup in VRRP group 1.
# Display the MSTP status on the Layer 2 switch.
<L2Switch> display stp instance 1 brief
MSTID Port Role STP State Protection
1 GigabitEthernet3/0/1 ROOT FORWARDING NONE
1 GigabitEthernet3/0/2 ALTE DISCARDING NONE
The output shows that the interface connecting to Switch B is blocked.
# Display detailed information about VRRP group 1 on Switch B.
[SwitchB] display vrrp ipv6 verbose
IPv6 virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::1
10::1
Virtual MAC : 0000-5e00-0201
Master IP : FE80::6697:12FF:FE50:100
The output shows that Switch B becomes the master in VRRP group 1.
· Switch A:
#
vlan 101
#
vlan 4094
#
stp region-configuration
region-name vrrp
instance 1 vlan 101
active region-configuration
#
stp instance 1 root primary
stp global enable
#
interface Vlan-interface101
ipv6 address 10::2/64
vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
vrrp ipv6 vrid 1 virtual-ip 10::1
vrrp ipv6 vrid 1 priority 120
vrrp ipv6 vrid 1 track 1 reduced 255
#
interface Vlan-interface4094
ipv6 address 100::2/64
#
interface GigabitEthernet2/0/1
port link-mode bridge
port access vlan 101
#
interface GigabitEthernet2/0/2
port link-mode bridge
port access vlan 4094
#
interface GigabitEthernet2/0/24
port link-mode bridge
port access vlan 101
#
track 1 interface Vlan-interface 4094
#
· Switch B:
#
vlan 101
#
vlan 4094
#
stp region-configuration
region-name vrrp
instance 1 vlan 101
active region-configuration
#
stp global enable
#
interface Vlan-interface101
ipv6 address 10::3/64
vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
vrrp ipv6 vrid 1 virtual-ip 10::1
#
interface Vlan-interface4094
ipv6 address 100::3/64
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 101
#
interface GigabitEthernet3/0/2
port link-mode bridge
port access vlan 4094
#
interface GigabitEthernet3/0/24
port link-mode bridge
port access vlan 101
#
As shown in Figure 5, Switch A and Switch B form two VRRP groups. Implement the following requirements:
· Switch A operates as the master of VRRP group 1 to forward packets from Area A. Switch B operates as the master of VRRP group 2 to forward packets from Area B. When one of the switches fails, the other switch provides gateway service for both areas.
· When the uplink interface of one switch fails, hosts can access the external network through the other switch.
· To avoid loops between Switch A, Switch B, and the Layer 2 switch, enable MSTP on them, and specify the masters as the root bridges.
Configure VRRP tracking on the master so that when its uplink is not available, the master decreases its priority for the backup to take over quickly.
This configuration example was created and verified on S12500-CMW710-R7129.
When you configure multiple IPv6 VRRP groups, follow these restrictions and guidelines:
· The virtual IPv6 addresses of a VRRP group and the IPv6 address of the downlink interface of the VRRP group must be in the same subnet. Otherwise, the hosts in the subnet cannot access external networks.
· If you associate a track entry with a VRRP group on an IP address owner, the association does not take effect until the switch is not an IP address owner.
# Configure VLAN 101.
<SwitchA> system-view
[SwitchA] vlan 101
[SwitchA-vlan101] port Gigabitethernet 2/0/1
[SwitchA-vlan101] quit
[SwitchA] interface GigabitEthernet 2/0/1
[SwitchA-GigabitEthernet3/0/1] undo shutdown
[SwitchA-GigabitEthernet3/0/1] quit
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] undo shutdown
[SwitchA-Vlan-interface101] ipv6 address 10::2 64
[SwitchA-Vlan-interface101] quit
# Configure VLAN 102.
[SwitchA] vlan 102
[SwitchA-vlan102] port Gigabitethernet 2/0/3
[SwitchA-vlan102] quit
[SwitchA] interface GigabitEthernet 2/0/3
[SwitchA-GigabitEthernet2/0/3] undo shutdown
[SwitchA-GigabitEthernet2/0/3] quit
[SwitchA] interface vlan-interface 102
[SwitchA-Vlan-interface102] undo shutdown
[SwitchA-Vlan-interface102] ipv6 address 11::2 64
[SwitchA-Vlan-interface102] quit
# Configure VLAN 4094.
[SwitchA] vlan 4094
[SwitchA-vlan4094] port Gigabitethernet 2/0/2
[SwitchA-vlan4094] quit
[SwitchA] interface GigabitEthernet 2/0/2
[SwitchA-GigabitEthernet2/0/2] undo shutdown
[SwitchA-GigabitEthernet2/0/2] quit
[SwitchA] interface vlan-interface 4094
[SwitchA-Vlan-interface4094] undo shutdown
[SwitchA-Vlan-interface4094] ipv6 address 100::2 64
[SwitchA-Vlan-interface4094] quit
# Configure GigabitEthernet 2/0/24 as a trunk port, and assign it to VLAN 101 and VLAN 102.
[SwitchA] interface GigabitEthernet2/0/24
[SwitchA-GigabitEthernet2/0/24] undo shutdown
[SwitchA-GigabitEthernet2/0/24] port link-type trunk
[SwitchA-GigabitEthernet2/0/24] undo port trunk permit vlan 1
[SwitchA-GigabitEthernet2/0/24] port trunk permit vlan 101 to 102
[SwitchA-GigabitEthernet2/0/24] port trunk pvid vlan 101
[SwitchA-GigabitEthernet2/0/24] quit
# Create VRRP group 1, and set the virtual IPv6 address of the VRRP group to FE80::1 and 10::1.
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
[SwitchA-Vlan-interface101] vrrp ipv6 vrid 1 virtual-ip 10::1
# Set the priority of Switch A in VRRP group 1 to 120.
[SwitchA-Vlan-interface101] vrrp ipv6 vrid 1 priority 120
[SwitchA-Vlan-interface101] quit
# Create track entry 1 and associate it with the link state of VLAN-interface 4094.
[SwitchA] track 1 interface vlan-interface 4094
# Associate VRRP group 1 on VLAN-interface 101 with track entry 1 and decrease the priority of the switch in the VRRP group by 255 when the state of track entry 1 changes to negative.
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] vrrp vrid 1 track 1 reduced 255
[SwitchA-Vlan-interface101] quit
# Create VRRP group 2, and set the virtual IPv6 address of the VRRP group to FE80::1 and 11::1.
[SwitchA] interface vlan-interface 102
[SwitchA-Vlan-interface102] vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
[SwitchA-Vlan-interface102] vrrp ipv6 vrid 1 virtual-ip 11::1
[SwitchA-Vlan-interface102] quit
# Configure MSTP.
[SwitchA] stp region-configuration
[SwitchA-mst-region] region-name vrrp
[SwitchA-mst-region] instance 1 vlan 101
[SwitchA-mst-region] instance 2 vlan 102
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
[SwitchA] stp instance 1 root primary
[SwitchA] stp global enable
# Configure VLAN 101.
<SwitchB> system-view
[SwitchB] vlan 101
[SwitchB-vlan101] port Gigabitethernet 3/0/1
[SwitchB-vlan101] quit
[SwitchB] interface GigabitEthernet 3/0/1
[SwitchB-GigabitEthernet3/0/1] undo shutdown
[SwitchB-GigabitEthernet3/0/1] quit
[SwitchB] interface vlan-interface 101
[SwitchB-Vlan-interface101] undo shutdown
[SwitchB-Vlan-interface101] ipv6 address 10::3 64
[SwitchB-Vlan-interface101] quit
# Configure VLAN 102.
[SwitchB] vlan 102
[SwitchB-vlan102] port Gigabitethernet 3/0/3
[SwitchB-vlan102] quit
[SwitchB] interface GigabitEthernet 3/0/3
[SwitchB-GigabitEthernet3/0/3] undo shutdown
[SwitchB-GigabitEthernet3/0/3] quit
[SwitchB] interface vlan-interface 102
[SwitchB-Vlan-interface102] undo shutdown
[SwitchB-Vlan-interface102] ipv6 address 11::3 64
[SwitchB-Vlan-interface102] quit
# Configure VLAN 4094.
[SwitchB] vlan 4094
[SwitchB-vlan4094] port Gigabitethernet 3/0/2
[SwitchB-vlan4094] quit
[SwitchB] interface GigabitEthernet 3/0/2
[SwitchB-GigabitEthernet3/0/2] undo shutdown
[SwitchB-GigabitEthernet3/0/2] quit
[SwitchB] interface vlan-interface 4094
[SwitchB-Vlan-interface4094] undo shutdown
[SwitchB-Vlan-interface4094] ipv6 address 100::3 64
[SwitchB-Vlan-interface4094] quit
# Configure GigabitEthernet 3/0/24 as a trunk port, and assign it to VLAN 101 and VLAN 102.
[SwitchB] interface GigabitEthernet3/0/24
[SwitchB-GigabitEthernet3/0/24] undo shutdown
[SwitchB-GigabitEthernet3/0/24] port link-type trunk
[SwitchB-GigabitEthernet3/0/24] undo port trunk permit vlan 1
[SwitchB-GigabitEthernet3/0/24] port trunk permit vlan 101 to 102
[SwitchB-GigabitEthernet3/0/24] port trunk pvid vlan 101
[SwitchB-GigabitEthernet3/0/24] quit
# Create VRRP group 1, and set the virtual IPv6 address of the VRRP group to FE80::1 and 10::1.
[SwitchB] interface vlan-interface 101
[SwitchB-Vlan-interface101] vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
[SwitchB-Vlan-interface101] vrrp ipv6 vrid 1 virtual-ip 10::1
[SwitchB-Vlan-interface101] undo shutdown
[SwitchB-Vlan-interface101] quit
# Create VRRP group 2, and set the virtual IPv6 address of the VRRP group to FE80::1 and 11::1.
[SwitchB] interface vlan-interface 102
[SwitchB-Vlan-interface102] vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
[SwitchB-Vlan-interface102] vrrp ipv6 vrid 1 virtual-ip 11::1
# Set the priority for VRRP group 2 to 120.
[SwitchB-Vlan-interface102] vrrp ipv6 vrid 1 priority 120
[SwitchB-Vlan-interface102] quit
# Associate VRRP group 2 on VLAN-interface 102 with track entry 1. Decrease the priority of the switch in the VRRP group by 255 when the state of track entry 1 changes to negative.
[SwitchB] interface vlan-interface 102
[SwitchB-Vlan-interface102] vrrp ipv6 vrid 1 track 1 reduced 255
[SwitchB-Vlan-interface102] quit
# Configure MSTP.
[SwitchB] stp region-configuration
[SwitchB-mst-region] region-name vrrp
[SwitchB-mst-region] instance 1 vlan 101
[SwitchB-mst-region] instance 2 vlan 102
[SwitchB-mst-region] active region-configuration
[SwitchB-mst-region] quit
[SwitchB] stp instance 2 root primary
[SwitchB] stp global enable
# Ping the external network from the hosts in Area A and Area B. (Details not shown.)
# Display detailed information about the VRRP groups on Switch A.
[SwitchA] display vrrp ipv6 verbose
IPv6 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 2
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::1
10::1
Virtual MAC : 0000-5e00-0201
Master IP : FE80::2E0:64FF:FE05:3100
VRRP Track Information:
Track Object: 1 State : Positive Pri Reduced : 255
Interface Vlan-interface102
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::1
11::1
Master IP : FE80::6697:12FF:FE50:3100
The output shows that Switch A is the master in VRRP group 1 and the backup in VRRP group 2.
# Display detailed information about the VRRP groups on Switch B.
[SwitchB] display vrrp ipv6 verbose
IPv6 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 2
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::1
10::1
Master IP : FE80::2E0:64FF:FE05:3100
Interface Vlan-interface102
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::1
11::1
Virtual MAC : 0000-5e00-0201
Master IP : FE80::6697:12FF:FE50:100
VRRP Track Information:
Track Object: 1 State : Positive Pri Reduced : 255
The output shows that Switch B is the backup in VRRP group 1 and the master in VRRP group 2.
# Display the MSTP status on Switch A. The output shows that GigabitEthernet 2/0/3 is blocked in MSTI 2.
[SwitchA] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet2/0/1 DESI FORWARDING NONE
0 GigabitEthernet2/0/24 DESI FORWARDING NONE
0 GigabitEthernet2/0/3 ROOT FORWARDING NONE
1 GigabitEthernet2/0/1 DESI FORWARDING NONE
1 GigabitEthernet2/0/24 DESI FORWARDING NONE
2 GigabitEthernet2/0/24 ROOT FORWARDING NONE
2 GigabitEthernet2/0/3 ALTE DISCARDING NONE
# Display the MSTP status on Switch B. The output shows that GigabitEthernet 3/0/1 is blocked in MSTI 1.
[SwitchB] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet3/0/1 DESI FORWARDING NONE
0 GigabitEthernet3/0/24 ALTE DISCARDING NONE
0 GigabitEthernet3/0/3 ROOT FORWARDING NONE
1 GigabitEthernet3/0/1 ALTE DISCARDING NONE
1 GigabitEthernet3/0/24 ROOT FORWARDING NONE
2 GigabitEthernet3/0/24 DESI FORWARDING NONE
2 GigabitEthernet3/0/3 DESI FORWARDING NONE
# Display detailed information about the VRRP groups on Switch B when Switch A fails.
[SwitchB] display vrrp ipv6 verbose
IPv6 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 2
Interface Vlan-interface101
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::1
10::1
Virtual MAC : 0000-5e00-0201
Master IP : FE80::6697:12FF:FE50:100
Interface Vlan-interface102
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::1
11::1
Virtual MAC : 0000-5e00-0201
Master IP : FE80::6697:12FF:FE50:100
VRRP Track Information:
Track Object: 1 State : Positive Pri Reduced : 255
The output shows that Switch B becomes the master of VRRP group 1.
· Switch A:
#
vlan 101 to 102
#
vlan 4094
#
stp region-configuration
region-name vrrp
instance 1 vlan 101
instance 2 vlan 102
active region-configuration
#
stp instance 1 root primary
stp global enable
#
interface Vlan-interface101
ipv6 address 10::2/64
vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
vrrp ipv6 vrid 1 virtual-ip 10::1
vrrp ipv6 vrid 1 priority 120
vrrp ipv6 vrid 1 track 1 reduced 255
#
interface Vlan-interface102
ipv6 address 11::2/64
vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
vrrp ipv6 vrid 1 virtual-ip 11::1
#
interface Vlan-interface4094
ipv6 address 100::2/64
#
interface GigabitEthernet2/0/1
port link-mode bridge
port access vlan 101
#
interface GigabitEthernet2/0/2
port link-mode bridge
port access vlan 4094
#
interface GigabitEthernet2/0/3
port link-mode bridge
port access vlan 102
#
interface GigabitEthernet2/0/24
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 101 to 102
port trunk pvid vlan 101
#
track 1 interface Vlan-interface 4094
#
· Switch B:
#
vlan 101 to 102
#
vlan 4094
#
stp region-configuration
region-name vrrp
instance 1 vlan 101
instance 2 vlan 102
active region-configuration
#
stp instance 2 root primary
stp global enable
#
interface Vlan-interface101
ipv6 address 10::3/64
vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
vrrp ipv6 vrid 1 virtual-ip 10::1
#
interface Vlan-interface102
ipv6 address 11::3/64
vrrp ipv6 vrid 1 virtual-ip FE80::1 link-local
vrrp ipv6 vrid 1 virtual-ip 11::1
vrrp ipv6 vrid 1 priority 120
vrrp ipv6 vrid 1 track 1 reduced 255
#
interface Vlan-interface4094
ipv6 address 100::3/64
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 101
#
interface GigabitEthernet3/0/2
port link-mode bridge
port access vlan 4094
#
interface GigabitEthernet3/0/3
port link-mode bridge
port access vlan 102
#
interface GigabitEthernet3/0/24
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 101 to 102
port trunk pvid vlan 101
#
track 1 interface Vlan-interface 4094
#
As shown in Figure 6, Switch A, Switch B, and Switch C form a load-balanced VRRP group and use the virtual IPv6 address FE80::10 to provide gateway service. Implement the following requirements:
· Switch A operates as the master to forward packets from Host A. When Switch A fails, Switch B or Switch C takes over to forward packets for Host A.
· Packets from the hosts are forwarded by different switches to reduce the burden of the master.
· When the upstream link of the AVF fails, the AVF can notify an LVF to take over.
For the AVF to notify an LVF to take over its role when the upstream link of the AVF fails, configure VF tracking on each gateway to monitor the uplink. Use interface management to monitor the upstream link state of the VF owner. Use the tracking function to establish the collaboration between the VFs and interface management. When the upstream link fails, the state of the track entry changes to Negative, and the weights of the VFs (including the AVF) on the switch decrease by a specified value. The corresponding LVF with a higher priority on another switch becomes the AVF and forwards packets.
This configuration example was created and verified on S12500-CMW710-R7129.
When you configure IPv6 VRRP load balancing mode, follow these restrictions and guidelines:
· The virtual IPv6 addresses of a VRRP group and the IPv6 address of the downlink interface of the VRRP group must be in the same subnet. Otherwise, the hosts in the subnet cannot access external networks.
· In load balancing mode, the virtual IP address of a VRRP group can be any unassigned IP address of the subnet where the VRRP group resides. The virtual IP address cannot be the IP address of any interface in the VRRP group. No IP address owner can exist in a VRRP group.
· To enable hosts to learn their default gateway from RA messages sent by the switches, enable RA message sending on the VLAN interfaces of all the gateways connecting to the hosts.
# Configure VLAN 2.
<SwitchA> system-view
[SwitchA] vlan 2
[SwitchA-vlan2] port Gigabitethernet 3/0/1
[SwitchA-vlan2] quit
[SwitchA] interface GigabitEthernet 3/0/1
[SwitchA-GigabitEthernet3/0/1] undo shutdown
[SwitchA-GigabitEthernet3/0/1] quit
[SwitchA] interface vlan-interface 2
[SwitchA–Vlan-interface2] undo shutdown
[SwitchA-Vlan-interface2] ipv6 address fe80::1 link-local
[SwitchA-Vlan-interface2] ipv6 address 1::1 64
[SwitchA–Vlan-interface2] quit
# Configure VLAN 4094.
[SwitchA] vlan 4094
[SwitchA-vlan4094] port Gigabitethernet 3/0/5
[SwitchA-vlan4094] quit
[SwitchA] interface GigabitEthernet 3/0/5
[SwitchA-GigabitEthernet3/0/5] undo shutdown
[SwitchA-GigabitEthernet3/0/5] quit
[SwitchA] interface vlan-interface 4094
[SwitchA-Vlan-interface4094] undo shutdown
[SwitchA-Vlan-interface4094] ipv6 address 2001::1/64
[SwitchA-Vlan-interface4094] quit
# Configure VRRP to operate in load balancing mode.
[SwitchA] vrrp ipv6 mode load-balance
# Create VRRP group 1 and set its virtual IPv6 addresses to FE80::10 and 1::10.
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] vrrp ipv6 vrid 1 virtual-ip fe80::10 link-local
[SwitchA-Vlan-interface2] vrrp ipv6 vrid 1 virtual-ip 1::10
# Set the priority of Switch A in VRRP group 1 to 120.
[SwitchA-Vlan-interface2] vrrp ipv6 vrid 1 priority 120
# Enable Switch A to send RA messages.
[SwitchA-Vlan-interface2] undo ipv6 nd ra halt
# Associate VRRP group 1 on VLAN-interface 2 with track entry 1. Decrease the priority of the switch in the VRRP group by 255 when the state of track entry 1 changes to negative.
[SwitchA-Vlan-interface2] vrrp ipv6 vrid 1 weight track 1 reduced 255
[SwitchA-Vlan-interface2] quit
# Create track entry 1 and associate it with the link state of VLAN-interface 4094.
[SwitchA] track 1 interface Vlan-interface4094 protocol ipv6
# Configure VLAN 2.
<SwitchB> system-view
[SwitchB] vlan 2
[SwitchB-vlan2] port Gigabitethernet 3/0/1
[SwitchB-vlan2] quit
[SwitchB] interface GigabitEthernet 3/0/1
[SwitchB-GigabitEthernet3/0/1] undo shutdown
[SwitchB-GigabitEthernet3/0/1] quit
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] undo shutdown
[SwitchB-Vlan-interface2] ipv6 address fe80::2 link-local
[SwitchB-Vlan-interface2] ipv6 address 1::2 64
[SwitchB-Vlan-interface2] quit
# Configure VLAN 4094.
[SwitchB] vlan 4094
[SwitchB-vlan4094] port Gigabitethernet 3/0/5
[SwitchB-vlan4094] quit
[SwitchB] interface GigabitEthernet 3/0/5
[SwitchB-GigabitEthernet3/0/5] undo shutdown
[SwitchB-GigabitEthernet3/0/5] quit
[SwitchB] interface vlan-interface 4094
[SwitchB-Vlan-interface4094] undo shutdown
[SwitchB-Vlan-interface4094] ipv6 address 2001::2/64
[SwitchB-Vlan-interface4094] quit
# Configure VRRP to operate in load balancing mode.
[SwitchB] vrrp ipv6 mode load-balance
# Create VRRP group 1 and set its virtual IP addresses to FE80::10 and 1::10.
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] vrrp ipv6 vrid 1 virtual-ip fe80::10 link-local
[SwitchB-Vlan-interface2] vrrp ipv6 vrid 1 virtual-ip 1::10
# Set the priority of Switch B in VRRP group 1 to 110.
[SwitchB-Vlan-interface2] vrrp ipv6 vrid 1 priority 110
# Enable Switch B to send RA messages.
[SwitchB-Vlan-interface2] undo ipv6 nd ra halt
# Associate VRRP group 1 on VLAN-interface 2 with track entry 1. Decrease the priority of the switch in the VRRP group by 255 when the state of track entry 1 changes to negative.
[SwitchB-Vlan-interface2] vrrp ipv6 vrid 1 weight track 1 reduced 255
[SwitchB-Vlan-interface2] undo shutdown
[SwitchB-Vlan-interface2] quit
# Create track entry 1 and associate it with the link state of VLAN-interface 4094.
[SwitchB] track 1 interface Vlan-interface4094 protocol ipv6
# Configure VLAN 2.
<SwitchC> system-view
[SwitchC] vlan 2
[SwitchC-vlan2] port Gigabitethernet 3/0/1
[SwitchC-vlan2] quit
[SwitchC] interface GigabitEthernet 3/0/1
[SwitchC-GigabitEthernet3/0/1] undo shutdown
[SwitchC-GigabitEthernet3/0/1] quit
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] undo shutdown
[SwitchC-Vlan-interface2] ipv6 address fe80::3 link-local
[SwitchC-Vlan-interface2] ipv6 address 1::3 64
[SwitchC-Vlan-interface2] quit
# Configure VLAN 4094.
[SwitchC] vlan 4094
[SwitchC-vlan4094] port Gigabitethernet 3/0/5
[SwitchC-vlan4094] quit
[SwitchC] interface GigabitEthernet 3/0/5
[SwitchC-GigabitEthernet3/0/5] undo shutdown
[SwitchC-GigabitEthernet3/0/5] quit
[SwitchC] interface vlan-interface 4094
[SwitchC-Vlan-interface4094] undo shutdown
[SwitchC-Vlan-interface4094] ipv6 address 2001::3/64
[SwitchC-Vlan-interface4094] quit
# Configure VRRP to operate in load balancing mode.
[SwitchC] vrrp ipv6 mode load-balance
# Create VRRP group 1 and set its virtual IP addresses to FE80::10 and 1::10.
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] vrrp ipv6 vrid 1 virtual-ip fe80::10 link-local
[SwitchC-Vlan-interface2] vrrp ipv6 vrid 1 virtual-ip 1::10
# Enable Switch C to send RA messages.
[SwitchC-Vlan-interface2] undo ipv6 nd ra halt
# Associate VRRP group 1 on VLAN-interface 2 with track entry 1. Decrease the priority of the switch in the VRRP group by 255 when the state of track entry 1 changes to negative.
[SwitchC-Vlan-interface2] vrrp ipv6 vrid 1 weight track 1 reduced 255
[SwitchC-Vlan-interface2] quit
# Create track entry 1 and associate it with the link state of VLAN-interface 4094.
[SwitchC] track 1 interface Vlan-interface4094 protocol ipv6
# Ping the external network from Host A, Host B, and Host C. (Details not shown.)
# Display detailed information about VRRP group 1 on Switch A.
[SwitchA] display vrrp ipv6 verbose
IPv6 virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::10
1::10
Master IP : FE80::1
Forwarder Information: 3 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Active
Virtual MAC : 000f-e2ff-4011 (Owner)
Owner ID : 6697-1250-0100
Priority : 255
Active : local
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-4012 (Learnt)
Owner ID : 00e0-6405-3100
Priority : 127
Active : FE80::2
Forwarder 03
State : Listening
Virtual MAC : 000f-e2ff-4013 (Learnt)
Owner ID : 00e0-3948-0100
Priority : 127
Active : FE80::3
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 255
# Display detailed information about VRRP group 1 on Switch B.
[SwitchB] display vrrp ipv6 verbose
IPv6 virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::10
1::10
Master IP : FE80::1
Forwarder Information: 3 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Listening
Virtual MAC : 000f-e2ff-4011 (Learnt)
Owner ID : 6697-1250-0100
Priority : 127
Active : FE80::1
Forwarder 02
State : Active
Virtual MAC : 000f-e2ff-4012 (Owner)
Owner ID : 00e0-6405-3100
Priority : 255
Active : local
Forwarder 03
State : Listening
Virtual MAC : 000f-e2ff-4013 (Learnt)
Owner ID : 00e0-3948-0100
Priority : 127
Active : FE80::3
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 255
# Display detailed information about VRRP group 1 on Switch C.
[SwitchC] display vrrp ipv6 verbose
IPv6 virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::10
1::10
Master IP : FE80::1
Forwarder Information: 3 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Listening
Virtual MAC : 000f-e2ff-4011 (Learnt)
Owner ID : 6697-1250-0100
Priority : 127
Active : FE80::1
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-4012 (Learnt)
Owner ID : 00e0-6405-3100
Priority : 127
Active : FE80::2
Forwarder 03
State : Active
Virtual MAC : 000f-e2ff-4013 (Owner)
Owner ID : 00e0-3948-0100
Priority : 255
Active : local
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 255
The output shows that in VRRP group 1, Switch A is the master, and Switch B and Switch C are the backups. An active VF and two listening VFs exist on each switch.
# Display detailed information about VRRP group 1 on Switch C when Switch A fails.
[SwitchC] display vrrp ipv6 verbose
IPv6 virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : FE80::10
1::10
Master IP : FE80::2
Forwarder Information: 3 Forwarders 2 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Active
Virtual MAC : 000f-e2ff-4011 (Take Over)
Owner ID : 6697-1250-0100
Priority : 85
Active : local
Redirect Time : 549 secs
Time-out Time : 1749 secs
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-4012 (Learnt)
Owner ID : 00e0-6405-3100
Priority : 85
Active : FE80::2
Forwarder 03
State : Active
Virtual MAC : 000f-e2ff-4013 (Owner)
Owner ID : 00e0-3948-0100
Priority : 255
Active : local
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 255
The output shows that Switch B becomes the master after Switch A fails; Switch C becomes an active VF with virtual MAC address 000F-E2FF-4011 mapped to it and forwards packets sent by Host A.
· Switch A:
#
vlan 2
#
vlan 4094
#
vrrp ipv6 mode load-balance
#
interface Vlan-interface2
ipv6 address 1::1/64
ipv6 address FE80::1 link-local
vrrp ipv6 vrid 1 virtual-ip FE80::10 link-local
vrrp ipv6 vrid 1 virtual-ip 1::10
vrrp ipv6 vrid 1 priority 120
vrrp ipv6 vrid 1 weight track 1 reduced 255
undo ipv6 nd ra halt
#
interface Vlan-interface4094
ipv6 address 2001::1/64
#
interface GigabitEthernet3/0/1
port access vlan 2
#
interface GigabitEthernet3/0/5
port access vlan 4094
#
track 1 interface Vlan-interface4094 protocol ipv6
#
· Switch B:
#
vlan 2
#
vlan 4094
#
Vrrp ipv6 mode load-balance
#
interface Vlan-interface2
ipv6 address 1::2/64
ipv6 address FE80::2 link-local
vrrp ipv6 vrid 1 virtual-ip FE80::10 link-local
vrrp ipv6 vrid 1 virtual-ip 1::10
vrrp ipv6 vrid 1 priority 120
vrrp ipv6 vrid 1 weight track 1 reduced 255
undo ipv6 nd ra halt
#
interface Vlan-interface4094
ipv6 address 2001::2/64
#
interface GigabitEthernet3/0/1
port access vlan 2
#
interface GigabitEthernet3/0/5
port access vlan 4094
#
track 1 interface Vlan-interface4094 protocol ipv6
#
· Switch C:
#
vlan 2
#
vlan 4094
#
vrrp ipv6 mode load-balance
#
interface Vlan-interface2
ipv6 address 1::3/64
ipv6 address FE80::3 link-local
vrrp ipv6 vrid 1 virtual-ip FE80::10 link-local
vrrp ipv6 vrid 1 virtual-ip 1::10
vrrp ipv6 vrid 1 priority 120
vrrp ipv6 vrid 1 weight track 1 reduced 255
undo ipv6 nd ra halt
#
interface Vlan-interface4094
ipv6 address 2001::3/64
#
interface GigabitEthernet3/0/1
port access vlan 2
#
interface GigabitEthernet3/0/5
port access vlan 4094
#
track 1 interface Vlan-interface4094 protocol ipv6
#
· H3C S12500 Routing Switch Series High Availability Configuration Guide
· H3C S12500 Routing Switch Series High Availability Command Reference
· H3C S12500 Routing Switch Series Layer 2—LAN Switching Configuration Guide
· H3C S12500 Routing Switch Series Layer 2—LAN Switching Command Reference