STP

STP
1: 实验拓扑图
2 :配置命令
1)  s1 配置:
enable
confgiure terminal
hostname s1
interface range fastethernet f0/1 �C 4
switchport trunk encapsulation dot1q
no shutdown
(crtl+Z)
vlan datebase
vlan 2 name 2
vlan 3 name 3
vlan 4 name 4
exit
confgure terminal
spanning-tree vlan 1
spanning-tree vlan 1 root primary
spanning-tree vlan 2
spanning-tree vlan 2 root primary
interface range fastethernet 0/3 �C 4
channel-group 1 mode on
no shutdown
2) s2 配置:
   enable
confirure terminal
hostname s2
interface range fastethernet 0/1 �C 4
switchport trunk encapsulation dot1q
no shutdown
(crtl+Z)
vlan datebase
vlan 2 name 2
vlan 3 name 3
vlan 4 name 4
exit
configure terminal
spanning-tree vlan 3
spanning-tree vlan 3 root primary
spanning-tree vlan 4
spanning-tree vlan 4 root primary
interface range fastethernet 0/3 �C 4
channel-group 1 mode on
no shutdown
3)s3 配置 :
enable
configure terminal
hostname s3
interface range fastethernet 0/1 �C 3
switchport trunk encapsulation dot1q
no shutdown
(ctrl+Z)
vlan datebase
vlan 2 name 2
vlan 3 name 3
vlan 4 name 4
exit
spanning-tree uplinkfast
interface fastethernet 0/3
spanning-tree portfast
4)s4 配置:
enable
configure terminal
hostname 4
interface range fastethernet 0/1 �C 3
switchport trunk encapsulation dot1q
no shutdown
(ctrl+Z)
vlan datebase
vlan 2 name 2
vlan 3 name 3
vlan 4 name 4
exit
spanning-tree uplinkfast
interface fastethernet 0/3
spanning-tree portfast
3: 配置查看
1)  查看 stp 配置
show spanning-tree
2 )查看某个 vlan stp 配置
   show spanning-tree vlan vlan detail
 

你可能感兴趣的:(职场,路由,休闲,STP)