stp原理和配置
原创
©著作权归作者所有:来自51CTO博客作者wdwy314的原创作品,请联系作者获取转载授权,否则将追究法律责任
3560-s1
Router>en
Router#conf t
Router(config)#no ip do lo关闭域名查找
Router(config)#lin 0
Router(config-line)#exec-t 0 0永不超时
Router(config-line)#logg sy禁止日志同步
Router(config-line)#ho 3560-s1
3560-s1(config)#int r f0/1 - 7
3560-s1(config-if-range)#sw m t
3560-s1(config-if-range)#int r f0/5 - 7
3560-s1(config-if-range)#ch 1 m o以太通道
Creating a port-channel interface Port-channel1
3560-s1(config-if-range)#end
3560-s1#sh int t查看trunk链路
Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 1
Fa0/2 on 802.1q trunking 1
Fa0/3 on 802.1q trunking 1
Po1 on 802.1q trunking 1
3560-s1#sh eth 1 s查看以太通道配置
Flags: D - down P - in port-channel
I - stand-alone s - suspended
R - Layer3 S - Layer2
U - in use
Group Port-channel Ports
-----+------------+-----------------------------------------------------------
1 Po1(SU) Fa0/5(P) Fa0/6(P) Fa0/7(P)
3560-s1#vl d
3560-s1(vlan)#vtp d haier
3560-s1(vlan)#vtp s
3560-s1(vlan)#vtp pa 111
3560-s1(vlan)#vtp v2-m
3560-s1(vlan)#vtp pr
3560-s1(vlan)#exi
3560-s1#sh vtp s
VTP Version : 2
Configuration Revision : 1
Maximum VLANs supported locally : 256
Number of existing VLANs : 5
VTP Operating Mode : Server
VTP Domain Name : haier
VTP Pruning Mode : Enabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0x8D 0x71 0xB3 0xA1 0x57 0xA2 0x9D 0xE9
3560-s1#vl d
3560-s1(vlan)#vl 2 na cwb
3560-s1(vlan)#vl 3 na glb
3560-s1(vlan)#vl 4 na xsb
3560-s1(vlan)#vl 5 na cgb
3560-s1(vlan)#vl 100 na srv
3560-s1(vlan)#exi
3560-s1#sh vlan-sw
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/0, Fa0/4, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15
2 cwb active
3 glb active
4 xsb active
5 cgb active
100 srv active
1002 fddi-default active
1003 trcrf-default active
1004 fddinet-default active
1005 trbrf-default active
3560-s1#conf t
3560-s1(config)#sp vl 1 r p
3560-s1(config)#sp vl 2 r p
3560-s1(config)#sp vl 3 r p
3560-s1(config)#sp vl 4 r s
3560-s1(config)#sp vl 5 r s
3560-s1(config)#sp vl 100 r s
3560-s1(config)#exi
3560-s1#sh run查看VLAN生成树优先级
!
spanning-tree vlan 1 priority 8192
spanning-tree vlan 2 priority 8192
spanning-tree vlan 3 priority 8192
spanning-tree vlan 4 priority 16384
spanning-tree vlan 5 priority 16384
spanning-tree vlan 100 priority 16384
!
!
!
3560-s1#
3560-s2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip do lo
Router(config)#lin 0
Router(config-line)#exec-t 0 0
Router(config-line)#logg sy
Router(config-line)#ho 3560-s2
3560-s2(config)#int r f0/1 - 7
3560-s2(config-if-range)#sw m t
3560-s2(config-if-range)#int r f0/5 - 7
3560-s2(config-if-range)#ch 1 m o
Creating a port-channel interface Port-channel1
3560-s2(config-if-range)#
*Mar 1 00:10:48.279: %EC-5-BUNDLE: Interface Fa0/5 joined port-channel Po1
*Mar 1 00:10:48.663: %EC-5-BUNDLE: Interface Fa0/6 joined port-channel Po1
*Mar 1 00:10:48.907: %EC-5-BUNDLE: Interface Fa0/7 joined port-channel Po1
3560-s2(config-if-range)#
*Mar 1 00:10:51.127: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-chann
el1, changed state to up
3560-s2(config-if-range)#end
3560-s2#sh
*Mar 1 00:10:55.031: %SYS-5-CONFIG_I: Configured from console by console
3560-s2#sh int t
Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 1
Fa0/2 on 802.1q trunking 1
Fa0/3 on 802.1q trunking 1
Po1 on 802.1q trunking 1
3560-s2#sh eth 1 s
Flags: D - down P - in port-channel
I - stand-alone s - suspended
R - Layer3 S - Layer2
U - in use
Group Port-channel Ports
-----+------------+-----------------------------------------------------------
1 Po1(SU) Fa0/5(P) Fa0/6(P) Fa0/7(P)
3560-s2#vl d
3560-s2(vlan)#vtp d haier
3560-s2(vlan)#vtp s
3560-s2(vlan)#vtp pa 111
3560-s2(vlan)#vtp v2-m
3560-s2(vlan)#vtp pr
3560-s2(vlan)#exi
3560-s2#sh vtp s
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 256
Number of existing VLANs : 10
VTP Operating Mode : Server
VTP Domain Name : haier
VTP Pruning Mode : Enabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0x00 0xF3 0xAE 0xBE 0x0A 0x05 0xA7 0x81
Configuration last modified by 0.0.0.0 at 3-1-02 00:08:48
Local updater ID is 0.0.0.0 (no valid interface found)
3560-s2#sh vlan-sw从2560-s1自动学习到得
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/0, Fa0/4, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15
2 cwb active
3 glb active
4 xsb active
5 cgb active
100 srv active
1002 fddi-default active
1003 trcrf-default active
1004 fddinet-default active
1005 trbrf-default active
3560-s2#conf t
3560-s2(config)#sp vl 1 r s
3560-s2(config)#sp vl 2 r s
3560-s2(config)#sp vl 3 r s
3560-s2(config)#sp vl 4 r p
3560-s2(config)#sp vl 5 r p
3560-s2(config)#sp vl 100 r p
3560-s2(config)#exi
3560-s2#sh run
!
!
spanning-tree vlan 1 priority 16384
spanning-tree vlan 2 priority 16384
spanning-tree vlan 3 priority 16384
spanning-tree vlan 4 priority 8192
spanning-tree vlan 5 priority 8192
spanning-tree vlan 100 priority 8192
!
!
!
上一篇:STP配置实验
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
stp配置及原理
介绍stp的配置及原理
stp配置及原理