Experiment fast Spanning Tree configuration

Source: Internet
Author: User

Experiment fast Spanning Tree configuration

"Experiment Name"

The configuration of the fast spanning Tree protocol RSTP.

"Experimental Purpose"

Understand how the fast spanning Tree protocol RSTP works and how to configure a fast spanning tree on a switch.

"Background description"

A school in order to carry out computer teaching and network office, the establishment of a computer classroom and a school office area, the two

Network through the interconnection of two switches to form an internal campus network, in order to improve the reliability of the network administrator

Interconnect the switch with 2 links, and now configure the switch appropriately so that the network avoids loops.

"Demand Analysis"

Two switches with dual-link interconnection, need to enable RSTP to avoid loops, while providing redundant backup

Yes.

"Experimental Topology"

Figure 4‐1 Experimental topological diagram

When connecting to the network according to the topology diagram, note that when both switches are configured with RSTP, the two switches are connected

To. If the first line reconfiguration may cause a broadcast storm, it will affect the normal operation of the switch.

"Experimental Equipment"

Three-layer Switch 1 units

Two-layer switch 1 units

"Pre-knowledge"

Basic configuration method of the switch, how Trunk works and how to configure it, how to configure the SVI port, spanning tree

How the RSTP works and how to configure it

"Experimental principle"

Spanning-Tree Protocol (SPANNING-TREE), which provides redundant backup links in a switched network, and addresses the switching networks

The loop problem in the network.

Spanning tree protocol is the use of the SPA algorithm (spanning tree algorithm) to generate a non-ring in a network that has a switching loop

A tree-shaped network of roads. By using this algorithm, the backup link of the Switched network redundancy is logically disconnected, and when the main link fails,

can automatically switch to the backup link to ensure the normal forwarding of data.

Spanning Tree protocol is currently a common version of STP (Spanning Tree Protocol IEEE 802.1d), RSTP (Fast spanning Tree Association

IEEE 802.1w), MSTP (Multi Spanning Tree Protocol IEEE 802.1s).

Spanning tree protocol is characterized by a long convergence time. When the primary link fails, the switch to the backup link requires

Time of 50 seconds.

The Fast Spanning Tree Protocol (RSTP) adds two port roles based on the Spanning Tree protocol: replacement Port

(alternate port) and the backup port (the root port), respectively, and the specified port (designated

Port) for redundant ports. When a root port or a specified port fails, redundant ports do not need to converge for 50 seconds

, you can switch directly to the replacement port or the backup port. Thus, the RSTP protocol is less than 1 seconds fast convergence.

"Experimental Steps"

Step One: Configure the host name, management IP address, and Trunk of the two switches

Switch#configure Terminal

Enter configuration commands, one per line. End with cntl/z.

Switch (config) #hostname L2-SW

L2-SW (config) #interface vlan 1

L2-SW (config-if) #ip address 192.168.1.2 255.255.255.0

L2-SW (config-if) #no shutdown

L2-SW (config-if) #exit

L2-SW (config) #

L2-SW (config) #interface fastethernet 0/1

L2-SW (config-if) #switchport mode trunk

L2-SW (config-if) #exit

L2-SW (config) #

L2-SW (config) #interface fastethernet 0/2

L2-SW (config-if) #switchport mode trunk

L2-SW (config-if) #exit

L2-SW (config) #

S3750#configure Terminal

Enter configuration commands, one per line. End with cntl/z.

S3750 (config) #hostname L3-SW

L3-SW (config) #interface vlan 1

L3-SW (config-if) #Dec 2 23:15:26 l3-sw%7:%line PROTOCOL Change:

Interface VLAN 1, changed state to up

L3-SW (config-if) #ip address 192.168.1.1 255.255.255.0

L3-SW (config-if) #no shutdown

L3-SW (config-if) #exit

L3-SW (config) #

L3-SW (config) #interface fastethernet 0/1

L3-SW (config-if) #switchport mode trunk

L3-SW (config-if) #exit

L3-SW (config) #

L3-SW (config) #interface fastethernet 0/2

L3-SW (config-if) #switchport mode trunk

L3-SW (config-if) #exit

Second step: Enable RSTP on both switches

L2-SW (config) #spanning-tree

! Enable spanning Tree protocol

L2-SW (config) #spanning-tree mode RSTP

! Modify the Spanning tree protocol type to RSTP

L2-SW (config) #

L3-SW (config) #spanning-tree

Enable Spanning-tree.

! Enable spanning Tree protocol

L3-SW (config) #spanning-tree mode RSTP

! Modify the Spanning tree protocol type to RSTP

L3-SW (config) #

After you have enabled RSTP by using the default parameters, you can use the show Spanning-tree command to observe the current two

The working state of the spanning tree on the switch:

L3-sw#show Spanning-tree

Stpversion:rstp

Sysstpstatus:enabled

Maxage:20

Hellotime:2

Forwarddelay:15

Bridgemaxage:20

Bridgehellotime:2

Bridgeforwarddelay:15

Maxhops:20

Txholdcount:3

Pathcostmethod:long

Bpduguard:disabled

Bpdufilter:disabled

bridgeaddr:00d0.f821.a542

priority:32768

Timesincetopologychange:0d:0h:0m:9s

Topologychanges:2

designatedroot:8000.00d0.f821.a542

rootcost:0

rootport:0

L2-sw#show Spanning-tree

Stpversion:rstp

Sysstpstatus:enabled

Basenumports:24

Maxage:20

Hellotime:2

Forwarddelay:15

Bridgemaxage:20

Bridgehellotime:2

Bridgeforwarddelay:15

Maxhops:20

Txholdcount:3

Pathcostmethod:long

Bpduguard:disabled

Bpdufilter:disabled

Bridgeaddr:00d0.f88b.ca34

priority:32768

timesincetopologychange:0d:0h:3m:54s

topologychanges:0

designatedroot:800000d0f821a542

rootcost:200000

Rootport:fa0/1

You can see that both switches have the RSTP protocol enabled, and because the MAC address is small, L3-SW is selected

As the root bridge, the priority is the root port on the 32768;L2-SW is FA0/1, and the path cost is calculated on both switches

methods are long integers.

In order to join the other switches in the network, L3-SW is still guaranteed to be able to elect the root bridge, need to improve

L3-SW the bridge priority.

Step three: Specify the three-layer switch as the root bridge, the F0/2 port of the two-layer switch is the root port, specify the

Port path Cost calculation method is short integer type

Port is the root port, specifying the two switches

Port path Cost calculation method is short integer type

L3-SW (config) #spanning-tree priority?

<0-61440> Bridge priority in increments of 4096

! View the configurable range of bridge priority, within 0~61440, and must be a multiple of 4096

L3-SW (config) #spanning-tree priority 4096

! Configure the bridge priority to 4096

L3-SW (config) #

L3-SW (config) #interface fastethernet 0/2

L3-SW (config-if) #spanning-tree port-priority?

<0-240> Port priority in increments of 16

! To view the configurable range of port priority, within 0~240, and must be a multiple of 16

L3-SW (config-if) #spanning-tree port-priority 96

! Modify the priority of the F0/2 port to 96

L3-SW (config-if) #exit

L3-SW (config) #spanning-tree Pathcost method Short

! The method for modifying the calculation path cost is a short integer type

L3-SW (config) #exit

L2-SW (config) #spanning-tree Pathcost method Short

! The method for modifying the calculation path cost is a short integer type

L2-SW (config) #exit

Fourth step: View the configuration of the spanning tree

L3-sw#show Spanning-tree

Stpversion:rstp

Sysstpstatus:enabled

Maxage:20

Hellotime:2

Forwarddelay:15

Bridgemaxage:20

Bridgehellotime:2

Bridgeforwarddelay:15

Maxhops:20

Txholdcount:3

Pathcostmethod:short

Bpduguard:disabled

Bpdufilter:disabled

bridgeaddr:00d0.f821.a542

priority:4096

timesincetopologychange:0d:0h:0m:34s

Topologychanges:7

designatedroot:1000.00d0.f821.a542

rootcost:0

rootport:0

l3-sw#

L3-sw#show Spanning-tree Interface FastEthernet 0/1

Portadminportfast:disabled

Portoperportfast:disabled

Portadminlinktype:auto

Portoperlinktype:point-to-point

Portbpduguard:disable

Portbpdufilter:disable

Portstate:forwarding

portpriority:128

portdesignatedroot:1000.00d0.f821.a542

portdesignatedcost:0

portdesignatedbridge:1000.00d0.f821.a542

portdesignatedport:8001

Portforwardtransitions:2

Portadminpathcost:19

Portoperpathcost:19

Portrole:designatedport

l3-sw#

L3-sw#show Spanning-tree Interface FastEthernet 0/2

Portadminportfast:disabled

Portoperportfast:disabled

Portadminlinktype:auto

Portoperlinktype:point-to-point

Portbpduguard:disable

Portbpdufilter:disable

Portstate:forwarding

portpriority:96

portdesignatedroot:1000.00d0.f821.a542

portdesignatedcost:0

portdesignatedbridge:1000.00d0.f821.a542

portdesignatedport:6002

Portforwardtransitions:4

Portadminpathcost:19

Portoperpathcost:19

Portrole:designatedport

l3-sw#

It can be observed that the priority of the bridge priority has been modified to the 4096,FA0/2 port in L3-SW.

To 96, in the method of calculating the path cost of the short integer, the path cost of two ports is 19, which is now in the forward

State.

L2-sw#show Spanning-tree

Stpversion:rstp

Sysstpstatus:enabled

Basenumports:24

Maxage:20

Hellotime:2

Forwarddelay:15

Bridgemaxage:20

Bridgehellotime:2

Bridgeforwarddelay:15

Maxhops:20

Txholdcount:3

Pathcostmethod:short

Bpduguard:disabled

Bpdufilter:disabled

Bridgeaddr:00d0.f88b.ca34

priority:32768

timesincetopologychange:0d:0h:1m:38s

topologychanges:0

designatedroot:100000d0f821a542

Rootcost:19

Rootport:fa0/2

l2-sw#

L2-sw#show Spanning-tree Interface FastEthernet 0/1

Portadminportfast:disabled

Portoperportfast:disabled

Portadminlinktype:auto

Portoperlinktype:point-to-point

Portbpduguard:disabled

Portbpdufilter:disabled

Portstate:discarding

portpriority:128

portdesignatedroot:100000d0f821a542

portdesignatedcost:0

portdesignatedbridge:100000d0f821a542

portdesignatedport:8001

Portforwardtransitions:5

portadminpathcost:0

Portoperpathcost:19

Portrole:alternateport

l2-sw#

L2-sw#show Spanning-tree Interface FastEthernet 0/2

Portadminportfast:disabled

Portoperportfast:disabled

Portadminlinktype:auto

Portoperlinktype:point-to-point

Portbpduguard:disabled

Portbpdufilter:disabled

Portstate:forwarding

portpriority:128

portdesignatedroot:100000d0f821a542

portdesignatedcost:0

portdesignatedbridge:100000d0f821a542

portdesignatedport:6002

Portforwardtransitions:3

portadminpathcost:0

Portoperpathcost:19

Portrole:rootport

l2-sw#

In L2-SW, the bridge priority is also the default of 32768, the port priority is also the default of 128, the path cost

is 19, the Port FA0/2 is elected as the root port, in the forwarding state, while the FA0/1 is the replacement port, in the discard

State.

Fifth step: Verifying the configuration

On the three-layer switch L3-SW on the long ping two-layer switch L2-SW, during which the forwarding on the L2-SW is disconnected

Port FA0/2, then observe how long the replacement port can become the forwarding gate:

L3-sw#ping 192.168.1.2 Ntimes 1000

! To specify the number of pings by using the Ntimes parameter of the ping command

Sending, 100-byte ICMP echoes to 192.168.1.2, timeout is 2 seconds:

< Press CTRL + C to break >

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!! Dec 2 23:30:56 l3-sw%7:2008-12-2 23:30:56 topochange:topology

is Changed.%link changed:interface fastethernet 0/2, changed

Dec 2 23:30:57 l3-sw%7:%line PROTOCOL change:interface fastethernet

0/2, changed

Dec 2 23:30:57 l3-sw%7:2008-12-2 23:30:57 topochange:topology is

Changed.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Success rate is percent (998/1000), round-trip Min/avg/max = 1/1/10 ms

l3-sw#

From which you can see that the replacement port has become a forward port, lost 2 ping packets, and the interrupt time is less than

20ms.

"Precautions"

1, Ruijie switch is off by default Spanning-tree, if the network has a physical loop, you must manually open

Kai Spanning-tree.

2, Ruijie full range of switches by default is the MSTP protocol, when configured to pay attention to the version of the spanning tree protocol.

"Reference Configuration"

L3-sw#show Running-config

Building configuration ...

Current configuration:1386 bytes

!

Version Rgnos 10.1.00 (4), Release (18443) (Tue Jul 19:51:54 CST 2007-ubu6server)

Hostname L3-SW

!

VLAN 1

!

Spanning-tree

Spanning-tree Pathcost Method Short

Spanning-tree Mode RSTP

Spanning-tree MST 0 Priority 4096

Interface FastEthernet 0/1

Switchport mode Trunk

!

Interface FastEthernet 0/2

Switchport mode Trunk

Spanning-tree MST 0 port-priority 96

!

Interface FastEthernet 0/3

!

Interface FastEthernet 0/4

!

Interface FastEthernet 0/5

!

Interface FastEthernet 0/6

!

Interface FastEthernet 0/7

!

Interface FastEthernet 0/8

!

Interface FastEthernet 0/9

!

Interface FastEthernet 0/10

!

Interface FastEthernet 0/11

!

Interface FastEthernet 0/12

!

Interface FastEthernet 0/13

!

Interface FastEthernet 0/14

!

Interface FastEthernet 0/15

!

Interface FastEthernet 0/16

!

Interface FastEthernet 0/17

!

Interface FastEthernet 0/18

!

Interface FastEthernet 0/19

!

Interface FastEthernet 0/20

!

Interface FastEthernet 0/21

!

Interface FastEthernet 0/22

!

Interface FastEthernet 0/23

!

Interface FastEthernet 0/24

!

Interface Gigabitethernet 0/25

!

Interface Gigabitethernet 0/26

!

Interface Gigabitethernet 0/27

!

Interface Gigabitethernet 0/28

!

Interface VLAN 1

IP address 192.168.1.1 255.255.255.0

!

!

Line con 0

Line vty 0 4

Login

!

End

L2-sw#show Running-config

System software version:1.68 Build Apr Release

Building configuration ...

Current configuration:319 bytes

!

Version 1.0

!

Hostname L2-SW

VLAN 1

!

Spanning-tree Mode RSTP

Spanning-tree

Spanning-tree Pathcost Method Short

Interface FastEthernet 0/1

Switchport mode Trunk

!

Interface FastEthernet 0/2

Switchport mode Trunk

!

Interface VLAN 1

No shutdown

IP address 192.168.1.2 255.255.255.0

!

End

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8B/89/wKioL1hQ6NzAEXaOAABKr_AJLOw284.png-wh_500x0-wm_3 -wmp_4-s_2600316277.png "style=" Float:none; "title=" 1111.PNG "alt=" Wkiol1hq6nzaexaoaabkr_ajlow284.png-wh_50 "/>

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/8B/89/wKioL1hQ6NyhtqxSAACTgurRaxE926.png-wh_500x0-wm_3 -wmp_4-s_4112841910.png "style=" Float:none; "title=" 1111111112.PNG "alt=" wkiol1hq6nyhtqxsaactgurraxe926.png-wh_50 "/>

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8B/8D/wKiom1hQ6NzTVUjtAAAR4Qu5Jqc019.png-wh_500x0-wm_3 -wmp_4-s_2631465419.png "style=" Float:none; "title=" capture. PNG "alt=" Wkiom1hq6nztvujtaaar4qu5jqc019.png-wh_50 "/>


This article from the "12035317" blog, reproduced please contact the author!

Experiment fast Spanning Tree configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.