STP Spanning Tree Protocol

1.1 PTS

Using two switches, connected in a loop, view port status, and transmits the data stream to see whether the loop is eliminated.

1.1.1 Topology

 

1.1.2 Configuration

1) Open the Spanning Tree model stp

xNet#configure terminal

xNet(config)#spanning-tree mode stp

xNet(config)#end

XNET #

2) The configuration of the switch into the same interfaces used by a VLAN, ge1 as trunk and ge48, ge25 access mode.

207 and 208 the same configuration:

xNet#con t

xNet(config)#vlan database

xNet(config-vlan)#vlan 2

xNet(config-vlan)#end

XNET #

xNet#con t

xNet(config)#interface ge1

xNet(config-if)#switchport

xNet(config-if)#switchport mode trunk

xNet(config-if)#switchport trunk allowed vlan add 2

xNet(config-if)#exit

xNet(config)#interface ge48

xNet(config-if)#switchport

xNet(config-if)#switchport mode trunk

xNet(config-if)#switchport trunk allowed vlan add 2

xNet(config-if)#exit

xNet(config)#interface ge25

xNet(config-if)#switchport

xNet(config-if)#switchport access vlan 2

xNet(config-if)#end

XNET #

 

3) View spanning tree port status:

ge1 207 and ge48 (ge1 as Forwarding, ge48 is Blocked):

 

 

208 ge1 and ge48 (ge1 to Forwarding, ge48 is Forwarding):

 

 

Seen from the show information, Root 208 is the machine

4) The machine 207 to Root, set its priority to:

207 No. machines:

xNet(config)#spanning-tree priority 0

xNet(config)#end

XNET #

View Root turned into a 207.

 

5) sends the packet PC-101, PC-91 No. packet receiving function.

6) on the interface to enable / disable spanning tree:

xNet#configure terminal

xNet(config)#interface ge25

xNet(config-if)#spanning-tree disable

 

 

1.1.3 results

Two switches connected in a loop, a port status change, block one of the ports, the loop has been eliminated by calculation protocol.

Guess you like

Origin www.cnblogs.com/niezhongle/p/11075315.html