欢迎来到天天文库
浏览记录
ID:1208696
大小:66.89 KB
页数:4页
时间:2017-11-08
《思科设备交换机stp(生成树协议)配置》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、本次讲解STP(生成树协议)配置方法:当交换机之间有多个VLAN时Trunk线路负载会过重,这时需要设置多个Trunk端口,但这样会形成网络环路。而STP协议便可以解决这个问题。本例配置模型图命令行:SwitchA配置如下:SwitchA#vlandatabaseSwitchA(vlan)#vtpdomaintztSwitchA(vlan)#vtpserverSwitchA(vlan)#vlan2nameVLAN2VLAN2added:Name:VLAN2SwitchA(vlan)#vlan3nameVLAN3VLAN3added:N
2、ame:VLAN3SwitchA(vlan)#vlan4nameVLAN4VLAN4added:Name:VLAN4SwitchA(vlan)#exitSwitchA#configureterminalSwitchA(config)#interfacef0/1//配置switchA的f0/1端口为trunk模式,允许所有vlan通过SwitchA(config-if)#switchportmodetrunkSwitchA(config-if)#switchporttrunkallowedvlanallSwitchA(config-if
3、)#exitSwitchA(config)#interfacef0/2//配置switchA的f0/1端口为trunk模式,允许所有vlan通过SwitchA(config-if)#switchportmodetrunkSwitchA(config-if)#switchporttrunkallowedvlanallSwitchA(config-if)#endSwitchA#writeSwitchA#configureterminal//将模型图中switchA对应端口划分到各vlan中SwitchA(config)#interface
4、f0/4SwitchA(config-if)#switchportmodeaccessSwitchA(config-if)#switchportaccessvlan2SwitchA(config-if)#exitSwitchA(config)#interfacef0/5SwitchA(config-if)#switchportmodeaccessSwitchA(config-if)#switchportaccessvlan3SwitchA(config-if)#exitSwitchA(config)#interfacef0/6Swit
5、chA(config-if)#switchportmodeaccessSwitchA(config-if)#switchportaccessvlan4SwitchA(config-if)#exitSwitchA(config-if)#endSwitchA#writeSwitchA#showvlan//查看vlan信息VLANNameStatusPorts----------------------------------------------------------------------------1defaultactiveFa
6、0/3,Fa0/8,Fa0/9,Fa0/10Fa0/11,Fa0/12,Fa0/13,Fa0/14Fa0/15,Fa0/16,Fa0/17,Fa0/18Fa0/19,Fa0/20,Fa0/21,Fa0/22Fa0/23,Fa0/24,Gig1/1,Gig1/22VLAN2activeFa0/43VLAN3activeFa0/54VLAN4activeFa0/65VLAN5activeFa0/7//在交换机SwitchA设置各VLAN在Trunk端口的STP值SwitchA(config)#interfacef0/1SwitchA(co
7、nfig-if)#spanning-treevlan1port-priority16SwitchA(config-if)#spanning-treevlan2port-priority16SwitchA(config-if)#exitSwitchA(config)#interfacef0/2SwitchA(config-if)#spanning-treevlan3port-priority16SwitchA(config-if)#spanning-treevlan4port-priority16SwitchA(config-if)#e
8、ndSwitchA#copyrunning-configstartup-configSwitchA配置如下:在交换机SwitchB上配置VTPClient学习VLAN信息并配置VLANTrunkSwitchB#vland
此文档下载收益归作者所有