Configuring Interworking Between VBST and Rapid PVST+
Networking Requirements
An enterprise's network needs to be upgraded. Huawei CE Series Switches are used to replace some switches on the enterprise network. Figure 3-10 shows the network after the upgrade. SwitchB, SwitchC and SwitchD are Huawei CE Series Switches. As shown in Figure 3-10, SwitchC and SwitchD (access switches) are dual-homed to SwitchA and SwitchB (aggregation switches) respectively. SwitchC transmits traffic from VLAN10 and VLAN20, and SwitchD transmits traffic from VLAN20 and VLAN30. A ring network is formed between the access layer and aggregation layer. All switches on the original network run Rapid PVST+. The enterprise requires that original services work properly after the upgrade, service traffic in each VLAN be correctly forwarded, and service traffic from different VLANs be load balanced to improve link use efficiency.
Configuration Roadmap
The original network is a ring network. Rapid PVST+ is used to eliminate loops and service flows in VLAN 10 and VLAN 20 are load balanced. After the upgrade, Huawei switches need to interwork with switches enabled with Rapid PVST+ and implement load balancing of service flows from different VLANs. VBST can be deployed on Huawei switches to ensure that service traffic in each VLAN is correctly forwarded and traffic from different VLANs is load balanced. The configuration roadmap is as follows:
- Configure Layer 2 forwarding on access and aggregation switches.
Configure basic VBST functions on SwitchB, SwitchC, and SwitchD. Perform the following operations so that a spanning tree shown in Figure 3-10 is formed through calculation:
- Configure SwitchB as the secondary root bridge of VLAN 10 respectively, SwitchB as the secondary root bridge of VLAN 20 respectively, and configure SwitchB as the root bridge of VLAN 30 respectively, to ensure root bridge reliability.
- Set a larger path cost for 10GE1/0/2 on SwitchC in VLAN 10 and VLAN 20 so that 10GE1/0/2 is blocked in spanning trees of VLAN 10 and VLAN 20, and set a larger path cost for 10GE1/0/2 on SwitchD in VLAN 20 and VLAN 30 so that 10GE1/0/2 is blocked in the spanning tree of VLAN 20 and VLAN 30.
- Configure the same path cost calculation method as that on the connected device.
- Configure the fast transition mechanism to ensure successful interworking.
Procedure
- Configure Layer 2 forwarding on switches of the ring network.
Create VLAN 10, VLAN 20, and VLAN 30 on SwitchB, SwitchC, and SwitchD.
# Create VLAN 10, VLAN 20, and VLAN 30 on SwitchB.
<HUAWEI> system-view [~HUAWEI] sysname SwitchB [*HUAWEI] commit [~SwitchB] vlan batch 10 20 30 [*SwitchB] commit
# Create VLAN 10 and VLAN 20 on SwitchC.
<HUAWEI> system-view [~HUAWEI] sysname SwitchC [*HUAWEI] commit [~SwitchC] vlan batch 10 20 [*SwitchC] commit
# Create VLAN 20 and VLAN 30 on SwitchD.
<HUAWEI> system-view [~HUAWEI] sysname SwitchD [*HUAWEI] commit [~SwitchD] vlan batch 20 30 [*SwitchD] commit
Add ports connected to the ring to VLANs.
# Add 10GE1/0/1 on SwitchB to VLAN 10, VLAN 20, and VLAN 30.
[~SwitchB] interface 10ge 1/0/1 [~SwitchB-10GE1/0/1] port link-type trunk [*SwitchB-10GE1/0/1] port trunk allow-pass vlan 10 20 30 [*SwitchB-10GE1/0/1] undo port trunk allow-pass vlan 1 [*SwitchB-10GE1/0/1] quit [*SwitchB] commit
# Add 10GE1/0/2 on SwitchB to VLAN 10 and VLAN 20.
[~SwitchB] interface 10ge 1/0/2 [~SwitchB-10GE1/0/2] port link-type trunk [*SwitchB-10GE1/0/2] port trunk allow-pass vlan 10 20 [*SwitchB-10GE1/0/2] undo port trunk allow-pass vlan 1 [*SwitchB-10GE1/0/2] quit [*SwitchB] commit
# Add 10GE1/0/3 on SwitchB to VLAN 20 and VLAN 30.
[~SwitchB] interface 10ge 1/0/3 [~SwitchB-10GE1/0/3] port link-type trunk [*SwitchB-10GE1/0/3] port trunk allow-pass vlan 20 30 [*SwitchB-10GE1/0/3] undo port trunk allow-pass vlan 1 [*SwitchB-10GE1/0/3] quit [*SwitchB] commit
# Add 10GE1/0/2 on SwitchC to VLAN 10 and VLAN 20.
[~SwitchC] interface 10ge 1/0/2 [~SwitchC-10GE1/0/2] port link-type trunk [*SwitchC-10GE1/0/2] port trunk allow-pass vlan 10 20 [*SwitchC-10GE1/0/2] undo port trunk allow-pass vlan 1 [*SwitchC-10GE1/0/2] quit [*SwitchC] commit
# Add 10GE1/0/3 on SwitchC to VLAN 10 and VLAN 20.
[~SwitchC] interface 10ge 1/0/3 [~SwitchC-10GE1/0/3] port link-type trunk [*SwitchC-10GE1/0/3] port trunk allow-pass vlan 10 20 [*SwitchC-10GE1/0/3] undo port trunk allow-pass vlan 1 [*SwitchC-10GE1/0/3] quit [*SwitchC] commit
# Add 10GE1/0/4 on SwitchC to VLAN 10 and 10GE1/0/5 to VLAN 20.
[~SwitchC] interface 10ge 1/0/4 [~SwitchC-10GE1/0/4] port link-type access [*SwitchC-10GE1/0/4] port default vlan 10 [*SwitchC-10GE1/0/4] quit [*SwitchC] interface 10ge 1/0/5 [*SwitchC-10GE1/0/5] port link-type access [*SwitchC-10GE1/0/5] port default vlan 20 [*SwitchC-10GE1/0/5] quit [*SwitchC] commit
# Add 10GE1/0/2 on SwitchD to VLAN 20 and VLAN 30.
[~SwitchD] interface 10ge 1/0/2 [~SwitchD-10GE1/0/2] port link-type trunk [*SwitchD-10GE1/0/2] port trunk allow-pass vlan 20 30 [*SwitchD-10GE1/0/2] undo port trunk allow-pass vlan 1 [*SwitchD-10GE1/0/2] quit [*SwitchD] commit
# Add 10GE1/0/3 on SwitchD to VLAN 20 and VLAN 30.
[~SwitchD] interface 10ge 1/0/3 [~SwitchD-10GE1/0/3] port link-type trunk [*SwitchD-10GE1/0/3] port trunk allow-pass vlan 20 30 [*SwitchD-10GE1/0/3] undo port trunk allow-pass vlan 1 [*SwitchD-10GE1/0/3] quit [*SwitchD] commit
# Add 10GE1/0/4 on SwitchD to VLAN 20 and 10GE1/0/5 to VLAN 30.
[~SwitchD] interface 10ge 1/0/4 [~SwitchD-10GE1/0/4] port link-type access [*SwitchD-10GE1/0/4] port default vlan 20 [*SwitchD-10GE1/0/4] quit [*SwitchD] interface 10ge 1/0/5 [*SwitchD-10GE1/0/5] port link-type access [*SwitchD-10GE1/0/5] port default vlan 30 [*SwitchD-10GE1/0/5] quit [*SwitchD] commit
- Configure basic functions of VBST.
Configure the root bridge and secondary root bridge.
Configure the secondary root bridge in VLAN 10.
# Configure SwitchB as the secondary root bridge in VLAN 10 for setting the Device Priority 28672.
[~SwitchB] stp vlan 10 priority 28672 [*SwitchB] commit
Configure the secondary root bridge in VLAN 20.
# Configure SwitchB as the secondary root bridge in VLAN 20 for setting the Device Priority 28672.
[~SwitchB] stp vlan 20 priority 28672 [*SwitchB] commit
Configure the root bridge in VLAN 30.
# Configure SwitchB as the root bridge in VLAN 30 for setting the Device Priority 24576.
[~SwitchB] stp vlan 30 priority 24576 [*SwitchB] commit
Configure the path cost for a port in each VLAN so that the port can be blocked.
The value range of a port path cost depends on the path cost calculation method. When a Huawei switch connects to a third-party device, the path cost calculation method at both ends must be the same. In this example, IEEE 802.1t standard is used on Huawei switch by default.
All switches on the same network must use the same path cost calculation method.
To ensure that the blocking point is in the position shown in Figure 3-10, set the path cost of 10GE1/0/2 on SwitchC and the path cost of 10GE1/0/2 on SwitchD to be higher than path costs of other ports. In this example, the path cost is set to 2000000 and path costs of other ports are smaller than 2000000.
# Set the path cost of 10GE1/0/2 on SwitchC to 2000000 in VLAN 10 and VLAN 20.
[~SwitchC] interface 10ge 1/0/2 [~SwitchC-10GE1/0/2] stp vlan 10 cost 2000000 [*SwitchC-10GE1/0/2] stp vlan 20 cost 2000000 [*SwitchC-10GE1/0/2] quit [*SwitchC] commit
# Set the path cost of 10GE1/0/2 on SwitchD to 2000000 in VLAN 20 and VLAN 30.
[~SwitchD] interface 10ge 1/0/2 [~SwitchD-10GE1/0/2] stp vlan 20 cost 2000000 [*SwitchD-10GE1/0/2] stp vlan 30 cost 2000000 [*SwitchD-10GE1/0/2] quit [*SwitchD] commit
- Configure the fast transition mechanism to ensure interworking with non-Huawei devices.
The Huawei datacom device can select the same mode as that on the non-Huawei device to implement interworking. In this example, SwitchA uses the common fast transition mechanism.
# Configure the common fast transition mechanism on 10GE1/0/1, 10GE1/0/2, and 10GE1/0/3 of SwitchB connected to SwitchA.
[~SwitchB] interface 10ge 1/0/1 [~SwitchB-10GE1/0/1] stp no-agreement-check [*SwitchB-10GE1/0/1] quit [*SwitchB] interface 10ge 1/0/2 [*SwitchB-10GE1/0/2] stp no-agreement-check [*SwitchB-10GE1/0/2] quit [*SwitchB] interface 10ge 1/0/3 [*SwitchB-10GE1/0/3] stp no-agreement-check [*SwitchB-10GE1/0/3] quit [*SwitchB] commit
# Configure the common fast transition mechanism on 10GE1/0/2 and 10GE1/0/3 of SwitchC connected to SwitchA.
[~SwitchC] interface 10ge 1/0/2 [~SwitchC-10GE1/0/2] stp no-agreement-check [*SwitchC-10GE1/0/2] quit [*SwitchC] interface 10ge 1/0/3 [*SwitchC-10GE1/0/3] stp no-agreement-check [*SwitchC-10GE1/0/3] quit [*SwitchC] commit
# Configure the common fast transition mechanism on 10GE1/0/2 and 10GE1/0/3 of SwitchD connected to SwitchA.
[~SwitchD] interface 10ge 1/0/2 [~SwitchD-10GE1/0/2] stp no-agreement-check [*SwitchD-10GE1/0/2] quit [*SwitchD] interface 10ge 1/0/3 [*SwitchD-10GE1/0/3] stp no-agreement-check [*SwitchD-10GE1/0/3] quit [*SwitchD] commit
Configure SwitchB, SwitchC, and SwitchD to work in VBST mode.
# Configure SwitchB to work in VBST mode.
[~SwitchB] stp mode vbst [*SwitchB] commit
# Configure SwitchC to work in VBST mode.
[~SwitchC] stp mode vbst [*SwitchC] commit
# Configure SwitchD to work in VBST mode.
[~SwitchD] stp mode vbst [*SwitchD] commit
Enable VBST on Huawei switches to eliminate loops.
Enable VBST globally.
By default, VBST is enabled globally.
Run the display stp global command to check the VBST status. If VBST is disabled, run the stp enable command in the system view to enable VBST globally.
Enable VBST in a VLAN.
By default, VBST is enabled in a VLAN.
Run the display stp vlan vlan-id information command to check the VBST status. If VBST is disabled in the VLAN. Run the undo stp vlan vlan-id disable command in the system view to enable VBST in the VLAN.
- Verify the configuration.
After the configuration is complete and the network topology becomes stable, perform the following operations to verify the configuration.
# Run the display stp vlan information brief command on SwitchB, SwitchC, and SwitchD to check the port status.
[~SwitchB] display stp vlan information brief -------------------------------------------------------------------------------- VLANID Interface Role STPState Protection Cost Edged -------------------------------------------------------------------------------- 10 10GE1/0/1 ROOT forwarding none 2000 disable 10 10GE1/0/2 DESI forwarding none 2000 disable 20 10GE1/0/1 ROOT forwarding none 2000 disable 20 10GE1/0/2 DESI forwarding none 2000 disable 20 10GE1/0/3 DESI forwarding none 2000 disable 30 10GE1/0/1 DESI forwarding none 2000 disable 30 10GE1/0/3 DESI forwarding none 2000 disable ------------------------------------------------------------------------------
[~SwitchC] display stp vlan information brief ------------------------------------------------------------------------------ VLANID Interface Role STPState Protection Cost Edged ------------------------------------------------------------------------------ 10 10GE1/0/2 ALTE discarding none 2000000 disable 10 10GE1/0/3 ROOT forwarding none 2000 disable 10 10GE1/0/4 DESI forwarding none 2000 disable 20 10GE1/0/2 ALTE discarding none 2000000 disable 20 10GE1/0/3 ROOT forwarding none 2000 disable 20 10GE1/0/5 DESI forwarding none 2000 disable ------------------------------------------------------------------------------
[~SwitchD] display stp vlan information brief ------------------------------------------------------------------------------ VLANID Interface Role STPState Protection Cost Edged ------------------------------------------------------------------------------ 20 10GE1/0/2 ALTE discarding none 2000000 disable 20 10GE1/0/3 ROOT forwarding none 2000 disable 20 10GE1/0/4 DESI forwarding none 2000 disable 30 10GE1/0/2 ALTE discarding none 2000000 disable 30 10GE1/0/3 ROOT forwarding none 2000 disable 30 10GE1/0/5 DESI forwarding none 2000 disable ------------------------------------------------------------------------------
The preceding information shows that SwitchB participates in spanning tree calculation in VLAN 10, VLAN 20, and VLAN 30, SwitchC participates in spanning tree calculation in VLAN 10 and VLAN 20, and SwitchD participates in spanning tree calculation in VLAN 20 and VLAN 30. After the calculation is complete, ports are selected as different roles to eliminate loops.
Different spanning trees are formed in VLAN 10, VLAN 20, and VLAN 30, and traffic in VLAN 10, VLAN 20, and VLAN 30 is forwarded along different spanning trees to implement load balancing.
Configuration Files
Configuration file of SwitchA (The following uses Cisco Nexus9000 C9508 7.0(3)I13 as an example)
vlan 10,20,30 spanning-tree pathcost method long spanning-tree vlan 10,20 priority 24576 spanning-tree vlan 30 priority 28672 interface Ethernet1/1 switchport mode trunk switchport trunk allowed vlan 10,20,30 no shutdown interface Ethernet1/2 switchport mode trunk switchport trunk allowed vlan 20,30 no shutdown interface Ethernet1/3 switchport mode trunk switchport trunk allowed vlan 10,20 no shutdown
Configuration file of SwitchB
# sysname SwitchB # stp vlan 30 priority 24576 stp vlan 10 20 priority 28672 # vlan batch 10 20 30 # stp mode vbst # interface 10GE1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 20 30 stp no-agreement-check # interface 10GE1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 20 stp no-agreement-check # interface 10GE1/0/3 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 30 stp no-agreement-check # return
Configuration file of SwitchC
# sysname SwitchC # vlan batch 10 20 # stp mode vbst # interface 10GE1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 20 stp vlan 10 20 cost 2000000 stp no-agreement-check # interface 10GE1/0/3 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 20 stp no-agreement-check # interface 10GE1/0/4 port default vlan 10 # interface 10GE1/0/5 port default vlan 20 # return
Configuration file of SwitchD
# sysname SwitchD # vlan batch 20 30 # stp mode vbst # interface 10GE1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 30 stp vlan 20 30 cost 2000000 stp no-agreement-check # interface 10GE1/0/3 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 30 stp no-agreement-check # interface 10GE1/0/4 port default vlan 20 # interface 10GE1/0/5 port default vlan 30 # return