STP配置实例.doc_第1页
STP配置实例.doc_第2页
STP配置实例.doc_第3页
STP配置实例.doc_第4页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

实验步骤按照顺序来1.SWA配置SWA#conf tSWA(config)#int rang f0/1 - 2SWA(config-if-range)#switchport mode trunkSWA(config-if-range)#channel-group 1 mode onSWA(config-if-range)#exitSWA(config)#int range f0/14 - 15SWA(config-if-range)#switchport mode trunkSWA(config-if-range)#endSWA#vlan databaseSWA(vlan)#vlan 2SWA(vlan)#vlan 3SWA(vlan)#vlan 4SWA(vlan)#exit2.SWB配置SWB#conf tSWB(config)#int range f0/1 - 2SWB(config-if-range)#switchport mode trunkSWB(config-if-range)#channel-group 1 mode onSWB(config-if-range)#exitSWB(config)#int range f0/14 - 15SWB(config-if-range)#switchport mode trunkSWB(config-if-range)#endSWB#vlan databaseSWB(vlan)#vlan 2SWB(vlan)#vlan 3SWB(vlan)#vlan 4SWB(vlan)#exit3.SWC配置SWC#conf tSWC(config)#int range f0/14 - 15SWC(config-if-range)#switchport mode trunkSWC(config-if-range)#endSWC#vlan databaseSWB(vlan)#vlan 2SWB(vlan)#vlan 3SWB(vlan)#vlan 4SWB(vlan)#exitSWC#show spanning-tree Port 15 (FastEthernet0/14) of VLAN1 is forwardingPort 16 (FastEthernet0/15) of VLAN1 is blockingPort 15 (FastEthernet0/14) of VLAN2 is forwardingPort 16 (FastEthernet0/15) of VLAN2 is blockingPort 15 (FastEthernet0/14) of VLAN3 is blockingPort 16 (FastEthernet0/15) of VLAN3 is forwardingPort 15 (FastEthernet0/14) of VLAN4 is blockingPort 16 (FastEthernet0/15) of VLAN4 is forwarding4.SWD配置SWD#conf tSWD(config)#int range f0/14 - 15SWD(config-if-range)#switchport mode trunkSWD(config-if-range)#endSWD#vlan databaseSWB(vlan)#vlan 2SWB(vlan)#vlan 3SWB(vlan)#vlan 4SWB(vlan)#exitSWD#show vtp statusVTP Version : 2Configuration Revision : 2Maximum VLANs supported locally : 256Number of existing VLANs : 9VTP Operating Mode : ClientVTP Domain Name : syVTP Pruning Mode : EnabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0xF8 0xB6 0x3B 0x3A 0xF4 0xBF 0xD9 0x1E Configuration last modified by 0.0.0.0 at 3-1-02 00:20:36SWD#show vlan-sw briefVLAN Name Status Ports- - - -1 default active Fa0/0, Fa0/1, Fa0/2, Fa0/3 Fa0/4, Fa0/5, Fa0/6, Fa0/7 Fa0/8, Fa0/9, Fa0/10, Fa0/11 Fa0/12, Fa0/132 VLAN0002 active 3 VLAN0003 active 4 VLAN0004 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active SWD#conf tSWD(config)#int f0/2SWD(config-if)#switchport access vlan 2SWD(config-if)#endSWD#conf tSWD(config)#spanning-tree uplinkfastSWD(config)#int range f0/1 - 13SWD(config-if-range)#spanning-tree portfastSWD(config-if-range)#endSWD#show spanning-tree summary UplinkFast is enabledSWD#show spanning-tree interface f0/2 The port is in the portfast modeSWD#show spanning-tree Port 15 (FastEthernet0/14) of VLAN1 is blockingPort 16 (FastEthernet0/15) of VLAN1 is forwardingPort 15 (FastEthernet0/14) of VLAN2 is blockingPort 16 (FastEthernet0/15) of VLAN2 is forwardingPort 15 (FastEthernet0/14) of VLAN3 is forwardingPort 16 (FastEthernet0/15) of VLAN3 is blockingPort 15 (FastEthernet0/14) of VLAN4 is forwardingPort 16 (FastEthernet0/15) of VLAN4 is blocking5.SWC配置SWC#conf tSWC(config)#int f0/2SWC(config-if)#switchport access vlan 2SWC(config-if)#endSWC#conf tSWC(config)#spanning-tree uplinkfast SWC(config)#int range f0/1 - 13SWC(config-if-range)#spanning-tree portfastSWC#show spanning-tree summary UplinkFast is enabledSWC#show spanning-tree interface fastEthernet 0/2 The port is in the portfast mode6.SWB配置SWB#conf tSWB(config)#spanning-tree vlan 3 root primarySWB(config)#spanning-tree vlan 4 root primarySWB(config)#endSWB#show spanning-tree summaryRoot bridge for: VLAN3, VLAN4.7.SWA配置SWA#conf tSWA(config)#spanning-tree vlan 2 root primary SWA(config)#spanning-tree vlan 1 root primarySWA(config)#endSWA#show spanning-tree summaryRoot bridge for: VLAN1, VLAN2.8.客户机配置HostA(VLAN2):IP:192.168.1.2/24HostB(VLAN2):ip:192.168.1.3/249.测试:HostA#ping 192.168.1.3Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 68/127/144 ms3台交换机,拓扑就不画了。只是注意下端口,用f0/1 - 3。交换机比较少,直接在三个交换机输入命令,创建vlan 2开始命令基本一样Switchen Switch#vlan dSwitch(vlan)#vlan 2Switch(vlan)#ZSwitch#conf tSwitch(config)#int rSwitch(config)#int range f0/1 - 3Switch(config-if-range)#sw mode tSwitch(config-if-range)#no shutdown 至此,vlan 2 在三台上设置好了,在SW1上设置vlan2 的根网桥SW1#conf terminal SW1(config)#spanning-tree vlan 2 root primary SW1(config)#Z设置好了,查看SW1#show spanning-tree vlan 2VLAN0002 Spanning tree enabled protocol ieee Root ID Priority 24578 Address 0009.7C82.5992 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 24578 (priority 24576 sys-id-ext 2) Address 0009.7C82.5992 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/1 Desg FWD 19 128.1 P2pFa0/2 Desg FWD 19 128.2 P2p拓扑概况:双核心交换机A、B,A为VLAN1-4的根桥,B为VLAN5-8的根桥,利用多生成树协议实现负载均衡。步骤一:VLAN1-4根桥的设置switch_A#conf tswitch_A(config)#spanning-tree -开启生成树协议,默认模式为MSTPswitch_A(config)#spanning-tree mst configuration switch_A(config-mst)# instance 1 vlan 1,2,3,4 -创建实例1,并关联VLAN1-4switch_A(config-mst)# instance 2 vlan 5,6,7,8 -创建实例2,并关联VLAN5-8switch_A(config)# spanning-tree mst 1 priority 4096-创设置A为实例1的根桥,即VLAN1-4的根桥步骤二:VLAN5-8根桥的设置switch_B#conf tswitch_B(config)#spanning-tree -开启生成树协议,默认模式为MSTPswitch_B(config)#spanning-tree mst configuration switch_B(config-mst)# instance 1 vlan 1,2,3,4 -创建实例1,并关联VLAN1-4switch_B(config-mst)# instance 2 vlan 5,6,7,8 -创建实例2,并关联VLAN5-8switch_B(config)# spanning-tree mst 2 priority 4096-创设置B为实例2的根桥,即VLAN5-8的根桥步骤三:其他分根桥交换机的设置switch_C#conf tswitch_C(config)#spanning-tree -开启生成树协议,默认模式为MSTPswitch_C(config)#spanning-tree mst configuration switch_C(config-mst)# instance 1 vlan 1,2,3,4 -创建实例1,并关联

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论