Configuring basic RSTP functions - an example

87 0 0 0

Networking requirements

On a complex network, multiple physical links are often deployed between two devices for link redundancy (one as the active link and the others as standby links). Redundant links may cause loops on the network, which results in broadcast storms and unstable MAC address entries.


RSTP can be deployed on a network to eliminate the loops by blocking the ports. In Figure 14-19, a loop exists on the network and SwitchA, SwitchB, SwitchC and SwitchD are all running RSTP. These devices exchange BPDUs to discover the loops and block the appropriate ports in order to trim the ring topology into a loop-free tree topology. The tree topology prevents infinite looping of packets, which in turn helps improve packet processing performance.


Figure 14-19  Networking diagram of basic RSTP configurations 

imgDownload?uuid=66d8d94b2b4148d39a7472d


Configuration roadmap

The configuration roadmap is as follows:


1. Configure the basic RSTP functions.


a) Configure the RSTP mode for the switches on the ring network.


b) Configure the primary and secondary root bridges.


c) Set a path cost for the ports to be blocked.


d) Enable RSTP to eliminate loops. Because ports connected to the PCs do not participate in RSTP calculation, configure these ports as both edge ports.


2. Configure RSTP protection functions. For example, configure root protection on designated ports of the root bridge.


Procedure

1. Configure basic RSTP functions.


Configure the RSTP mode for the switches on the ring network.



# Configure the RSTP mode on SwitchA.

<HUAWEI> system-view[HUAWEI] sysname SwitchA[SwitchA] stp mode rstp


# Configure the RSTP mode on SwitchB.

<HUAWEI> system-view[HUAWEI] sysname SwitchB[SwitchB] stp mode rstp


# Configure the RSTP mode on SwitchC.

<HUAWEI> system-view[HUAWEI] sysname SwitchC[SwitchC] stp mode rstp


# Configure the RSTP mode on SwitchD.

<HUAWEI> system-view[HUAWEI] sysname SwitchD[SwitchD] stp mode rstp

2. Configure the primary and secondary root bridges.



# Configure SwitchA as the primary root bridge.

[SwitchA] stp root primary


# Configure SwitchD as the secondary root bridge.

[SwitchD] stp root secondary


Set a path cost for the ports to be blocked.


a) The path cost value range depends on path cost calculation methods. This example uses the Huawei proprietary calculation method and sets the path cost to 20000.

b) All switching devices on a network must use the same path cost calculation method.


# On Switch A, set the path cost calculation method to the Huawei proprietary method.

[SwitchA] stp pathcost-standard legacy


# On Switch B, set the path cost calculation method to the Huawei proprietary method.

[SwitchB] stp pathcost-standard legacy


# On Switch C, set the path cost of GigabitEthernet1/0/1 to 20000.

[SwitchC] stp pathcost-standard legacy[SwitchC] interface gigabitethernet 1/0/1[SwitchC-GigabitEthernet1/0/1] stp cost 20000[SwitchC-GigabitEthernet1/0/1] quit


# On SwitchD, set the path cost calculation method to the Huawei proprietary method.

[SwitchD] stp pathcost-standard legacy

3. Enable RSTP to eliminate loops.


Configure the ports connected to PCs as both edge ports.


# Configure GigabitEthernet1/0/2 on SwitchB as both an edge port.

[SwitchB] interface gigabitethernet 1/0/2[SwitchB-GigabitEthernet1/0/2] stp edged-port enable[SwitchB-GigabitEthernet1/0/2] quit


(Optional) Configure BPDU protection on SwitchB.

[SwitchB] stp bpdu-protection


# Configure GigabitEthernet1/0/2 on SwitchC as both an edge port.

[SwitchC] interface gigabitethernet 1/0/2[SwitchC-GigabitEthernet1/0/2] stp edged-port enable[SwitchC-GigabitEthernet1/0/2] quit


(Optional) Configure BPDU protection on SwitchC.

[SwitchC] stp bpdu-protection

imgDownload?uuid=5b62c8cbf31b4e27acec5da NOTE:

If edge ports are connected to network devices that have STP enabled and BPDU protection is enabled, the edge ports will be shut down and their attributes remain unchanged after they receive BPDUs.

Enable RSTP globally.


# Enable RSTP globally on SwitchA.

[SwitchA] stp enable


# Enable RSTP globally on SwitchB.

[SwitchB] stp enable


# Enable RSTP globally on SwitchC.

[SwitchC] stp enable


# Enable RSTP globally on SwitchD.

[SwitchD] stp enable

Configure the RSTP protection functions. For example, configure root protection on designated ports of the root bridge.


# Enable root protection on GE 1/0/1 on SwitchA.

[SwitchA] interface gigabitethernet 1/0/1[SwitchA-GigabitEthernet1/0/1] stp root-protection[SwitchA-GigabitEthernet1/0/1] quit


# Enable root protection on GE 1/0/2 on SwitchA.

[SwitchA] interface gigabitethernet 1/0/2[SwitchA-GigabitEthernet1/0/2] stp root-protection[SwitchA-GigabitEthernet1/0/2] quit

Verify the configuration


After the preceding configuration has completed and the network becomes stable, perform the following operations to verify the configuration:


# Run the display stp brief command on SwitchA to view the port roles and states. The following information is displayed:

[SwitchA] display stp brief
 MSTID Port   Role STP State Protection
 0 GigabitEthernet1/0/1 DESI FORWARDING ROOT
 0 GigabitEthernet1/0/2 DESI FORWARDING ROOT


After SwitchA was configured as the root bridge, GigabitEthernet1/0/2 connected to SwitchB and GigabitEthernet1/0/1 connected to SwitchD were selected as designated ports through the spanning tree calculation. The root protection is enabled on the designated ports.


# Run the display stp interface gigabitethernet 1/0/1 brief command on SwitchB to view the role and state of GigabitEthernet1/0/1. The following information is displayed:

[SwitchB] display stp interface gigabitethernet 1/0/1 brief
 MSTID Port   Role STP State Protection
 0 GigabitEthernet1/0/1 DESI FORWARDING NONE 


GigabitEthernet1/0/1 is selected as a designated port and is in the Forwarding state.


# Run the display stp brief command on SwitchC to view the port roles and states. The following information is displayed:

[SwitchC] display stp brief
 MSTID Port   Role STP State Protection
 0 GigabitEthernet1/0/1 ALTE DISCARDING NONE 
 0 GigabitEthernet1/0/2 DESI FORWARDING BPDU 
 0 GigabitEthernet1/0/3 ROOT FORWARDING NONE 


GE1/0/1 is selected as an alternate port and is in the Discarding state.


GE1/0/3 is selected as a root port and is in the Forwarding state.


  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login