Got it

Understanding of STP - Example for Configuring Basic RSTP Functions

Latest reply: May 18, 2021 16:47:20 265 20 19 0 4

OBJECTIVE


The purpose of this post is to present an introduction to the example for configruing basic RSTP functions.



Networking Requirements


On a complex network, loops are inevitable. With the requirement for network redundancy backup, network designers tend to deploy multiple physical links between two devices, one of which is the master and the others are the backup. Loops are likely or bound to occur in such a situation.


Loops will cause broadcast storms, thereby exhausting network resources and paralyzing the network. Loops also cause flapping of MAC address tables and damages MAC address entries.


RSTP can be deployed on a network to eliminate loops by blocking some ports. On the network shown in Figure 1, after RouterA, SwitchA, SwitchB, SwitchC and SwitchD running RSTP discover loops on the network by exchanging information with each other, they trim the ring topology into a loop-free tree topology by blocking an interface. In this manner, replication and circular propagation of packets are prevented on the network and the switching devices are released from processing duplicated packets, thereby improving their processing performance.


15

Figure 1 - Networking diagram of configuring basic RSTP functions



Configuration Roadmap


The configuration roadmap is as follows:


1. Configure basic RSTP functions, including:

a. Configure the RSTP mode for the ring network.

b. Configure primary and secondary root bridges.

c. Set path costs for ports to block certain ports.

d. Enable RSTP to eliminate loops, including:


  • Enable RSTP globally.


  • Enable RSTP on all the interfaces except the interfaces connected to terminals.


i_f42.gifRSTP is not required on the interfaces connected to terminals because these interfaces do not need to participate in RSTP calculation.


2. Configure RSTP protection functions, for example, configure root protection on a designated port of a root bridge.


Procedure


1. Configure basic RSTP functions.

    

    a. Configure the RSTP mode for the devices on the ring network.


    # Configure the RSTP mode on RouterA.

<Huawei> system-view
[Huawei] sysname RouterA
[RouterA] stp mode rstp            

    # Configure the RSTP mode on SwitchASwitchBSwitchC and SwitchD.


    b. Configure primary and secondary root bridges.


    # Configure RouterA as the primary root bridge.


[RouterA] stp root primary


    # Configure SwitchA as a second root bridge. (The detailed configuration is not provided here.)


 c. Set path costs for the interface to be blocked.


i_f42.gifThe values of path costs depend on path cost calculation methods. This example uses the Huawei proprietary calculation method and sets the path cost to 200000.


All switching devices on a network must use the same path cost calculation method. Refer to STP List of path costs to get standard of other calculation methods. 


    # On RouterA, configure the path cost calculation method as the Huawei proprietary method.

[RouterA] stp pathcost-standard legacy


    # On SwitchASwitchBSwitchC and SwitchD, configure the path cost calculation method as the Huawei proprietary method. (The detailed configuration is not provided here.)


    # As shown in Figure 1set the path cost of Eth0/0/4 on SwitchC and SwitchD to 200000. (The detailed configuration is not provided here.)


    d. Enable RSTP to eliminate loops.


  • Disable RSTP on interfaces connected to PCs.


    # Disable RSTP on interfaces connected to terminals for SwitchC and SwitchD.


  • Enable RSTP globally.

    

    # Enable RSTP globally on RouterA

[RouterA] stp enable


     # Enable RSTP globally on other switching devices.


  • Enable RSTP on all the interfaces except the interfaces connected to terminals.


    # Enable RSTP on RouterA Ethernet2/0/0 and Ethernet2/0/1

[RouterA] interface ethernet 2/0/0
[RouterA-Ethernet2/0/0] stp enable
[RouterA-Ethernet2/0/0] quit
[RouterA] interface ethernet 2/0/1
[RouterA-Ethernet2/0/1] stp enable
[RouterA-Ethernet2/0/1] quit


    # Enable STP on all the interfaces except the interfaces connected to terminals for SwitchASwitchBSwitchC and SwitchD.


2. Configure RSTP protection function.


 # Enable root protection on Eth2/0/0 and Eth2/0/1 of RouterA.

[RouterA] interface ethernet 2/0/0
[RouterA-Ethernet2/0/0] stp root-protection
[RouterA-Ethernet2/0/0] quit
[RouterA] interface ethernet 2/0/1
[RouterA-Ethernet2/0/1] stp root-protection
[RouterA-Ethernet2/0/1] quit


3. Verify the configuration.


After the previous configurations, run the following commands to verify the configuration when the network is stable:


# Run the display stp brief command on RouterA to view the interface status and protection type. The displayed information is as follows:


[RouterA] display stp brief
   
   MSTID     Port                      Role         STP State             Protection

   0     Ethernet2/0/0                 DESI         FORWARDING             ROOT

   0     Ethernet2/0/1                 DESI         FORWARDING             ROOT


After RouterA is configured as a root bridge, Ethernet2/0/0 connected to SwitchA and Ethernet2/0/1 connected to SwitchB are elected as designated ports during spanning tree calculation.


Configuration Files


  • Configuration file of RouterA

#
sysname RouterA
#
stp mode stp
stp instance 0 root primary
stp pathcost-standard legacy
#
interface Ethernet2/0/0
stp root-protection
#
interface Ethernet2/0/1
stp root-protection
#
return          


  • Configuration file of SwitchA

#
sysname SwitchA
#
stp mode stp
stp instance 0 root secondary
stp pathcost-standard legacy
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
#
interface Ethernet0/0/3
#
return           


  • Configuration file of SwitchB

#
sysname SwitchB
#
stp mode stp
stp pathcost-standard legacy
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
#
interface Ethernet0/0/3
#
return


  • Configuration file of SwitchC

#
sysname SwitchC
#
stp mode stp
stp pathcost-standard legacy
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
stp disable
#
interface Ethernet0/0/3
stp disable
#
interface Ethernet0/0/4
stp instance 0 cost 200000
#
return


  • Configuration file of SwitchD

#
sysname SwitchD
#
stp mode stp
stp pathcost-standard legacy
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
stp disable
#
interface Ethernet0/0/3
stp disable
#
interface Ethernet0/0/4
stp instance 0 cost 200000
#
return



--- End

  • x
  • convention:

Saqib123
Created May 3, 2021 17:47:47

Thanks for sharing
View more
  • x
  • convention:

Saqib123
Created May 3, 2021 17:47:58

Understanding of STP - Example for Configuring Basic RSTP Functions-3918329-1
View more
  • x
  • convention:

clecio_pinange
Created May 3, 2021 17:50:54

Show! Excelent!
View more
  • x
  • convention:

carlosalcosta
Created May 3, 2021 17:59:34

Super complete! Thanks for that thing.
View more
  • x
  • convention:

Vlada85
MVE Author Created May 3, 2021 18:16:11

Thank you for sharing!
View more
  • x
  • convention:

Vlada85
MVE Author Created May 3, 2021 18:16:20

Understanding of STP - Example for Configuring Basic RSTP Functions-3918379-1
View more
  • x
  • convention:

BAZ
MVE Author Created May 3, 2021 18:57:09

Waiting for MSTP and comparison
View more
  • x
  • convention:

wissal
MVE Created May 3, 2021 19:17:19

Learned, well done
View more
  • x
  • convention:

Alex_Nazzari
Created May 3, 2021 23:43:50

Thanks
View more
  • x
  • convention:

123
Back to list

Comment

You need to log in to comment to the post Login | Register
Comment

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."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.