链路捆绑与STP_第1页
链路捆绑与STP_第2页
链路捆绑与STP_第3页
链路捆绑与STP_第4页
链路捆绑与STP_第5页
已阅读5页,还剩13页未读 继续免费阅读

付费下载

下载本文档

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

文档简介

1、实验五链路捆绑与STP一.实验目的1 .组网需求:采用两台核心交换机组网来提高网络可靠性, 为防止二 层环路,需要全网运行STP将SW倍B署为根网桥,SW2®署为备份根 网桥,并将接入PC的接口配置为portfast端口; SW1-SW2间使用 链路捆绑进一步提高可靠性。2 .分析STP的选举过程(根网桥、跟端口、指定端口、阻塞端口)。3 .测试STP切换,并分析STP的端口状态切换过程。二.实验拓扑SMI:STP根网桥Int vlan 81 典.16 氏8.12*5Int vlan 10192.1B8.10.V24int vlan ii192.l6S.11JmFaO/1SWFaO/

2、3TrunkFaO/1FaO/3SW2: STP否份根网格 Int vlan 9 192.1 B8.8.130725Fa0Trunk FaO/2Trun kFaOHFa0y1GVlan 10FaD/11Vian 11PC1 PC2ip :i92J&8.ia.womGW:192.168.1 D.1IP : 192.15S.10.100/24GW:192,10<JX1三.实验步骤1.基本信息配置SW1的基本信息配置(SW2 SW3勺基本配置与SW价目同)Switch>enable /进入特权模式Switch#config terminal/进入全局配置模式Switch(conf

3、ig)#hostname SW3 / 配置主机名SW3(config)#no ip domain-lookup 禁用域名查找SW3(config)#line console 0/ 进入 Console 线路模式SW3(config-line)#logging synchronous /配置Console信息显 示自动换行SW3(config-line)#no login配置口 Console 登录不认证SW3(config-line)#privilege level 15SW3(config-line)#line vty 0 4/ 进入 Vty 线路模式SW3(config-line)#no

4、login / 配置 Telnet 登录不认证SW3(config-line)#privilege level 15/ 配置为最高特权级别,enable不需要密码2 .二层网络全局配置(1) SW1 的 Vlan 配置SW1# vlan databaseSW1(vlan)#vtp transparent / 透明模式SW1(vlan)#vlan 8SW1(vlan)#vlan 10SW1(vlan)#vlan 11SW1#show vlan-sw briefVLAN Name Status Ports(2) SW2勺 Vlan 配置SW2# vlan databaseSW2(vlan)#vtp

5、 transparentSW2(vlan)#vlan 8SW2(vlan)#vlan 10查看Vlan信息PortsSW2(vlan)#vlan 11SW2#show vlan-sw brief /VLANNameStatus8 VLAN0008 active10VLAN0010active11VLAN0011active(3) SW3勺 Vlan 配置SW3# vlan databaseSW3(vlan)#vtp transparentSW3(vlan)#vlan 8SW3(vlan)#vlan 10查看Vlan信息PortsSW3(vlan)#vlan 11SW3#show vlan-sw

6、 brief /VLAN NameStatus8 VLAN0008 active(4) STP根网桥配置SW1(config)#spanning-tree vlan 8 priority 0SW1(config)#spanning-tree vlan 10 priority 0SW1(config)#spanning-tree vlan 11 priority 0(5) STP备份根网桥配置SW2(config)#spanning-tree vlan 8 priority 4096SW2(config)#spanning-tree vlan 10 priority 4096SW2(config

7、)#spanning-tree vlan 11 priority 40963 .二层网络接口配置及链路测试(1)核心交换机SW1-SW链路捆绑配置及调测SW1(config)#interface range fa0/1 -2/ 以太网接口 1 和 2,注意1后面要空格SW1(config-if-range)#switchport trunk encapsulation dot1qSW1(config-if-range)#switchport mode trunkSW1(config-if-range)#switchport trunk allowed vlan allSW1(config-if

8、-range)#channel-group 2 mode on 手动捆绑:组 2SW2(config)#interface range fa0/1 -2/ 以太网接口 1 和 2,注意1后面要空格SW2(config-if-range)#switchport trunk encapsulation dot1qSW2(config-if-range)#switchport mode trunkSW2(config-if-range)#switchport trunk allowed vlan allSW2(config-if-range)#channel-group 2 mode on手动捆绑:

9、组 2SW1#show etherchannel summary / 查看以太网通道信息 Flags: D - down P - in port-channel I - stand-alone s - suspende R - Layer3 S - Layer2 U - in use Group Port-channel Ports +2 Po2(SU) Fa0/1(P) Fa0/2(P)SW2#show etherchannel summary / 查看以太网通道信息Flags: D - down P - in port-channel I - stand-alone s - suspend

10、e R - Layer3 S - Layer2 U - in use Group Port-channel Ports +2 Po2(SU) Fa0/1(P) Fa0/2(P) (2) SW1-SW的Trunk链路调测SW1(config)#interface fa0/3SW1(config-if)#switchport trunk encapsulation dot1qSW1(config-if)#switchport mode trunkSW1(config-if)#switchport trunk allowed vlan allSW1#show interfaces trunk /查看

11、Trunk信息(只粘贴本步有用 信息) Port Mode Encapsulation Status Native vlanFa0/3 on802.1q trunking 1SW3(config)#interface fa0/1SW3(config-if)#switchport trunk encapsulation dotlqSW3(config-if)#switchport mode trunkSW3(config-if)#switchport trunk allowed vlan allSW3#show interfaces trunk /查看Trunk信息(只粘贴本步有用信息)Port

12、 Mode Encapsulation Status Native vlanFa0/1 on 802.1q trunking 1(3) SW2-SW的Trunk链路调测SW2(config)#interface fa0/3SW2(config-if)#switchport trunk encapsulation dot1qSW2(config-if)#switchport mode trunkSW2(config-if)#switchport trunk allowed vlan allSW2#show interfaces trunk / 查看 Trunk 信息Port Mode Encap

13、sulation Status Native vlanFa0/3 on 802.1q trunking 1SW3(config)#interface fa0/2SW3(config-if)#switchport trunk encapsulation dot1qSW3(config-if)#switchport mode trunkSW3(config-if)#switchport trunk allowed vlan allSW3#show interfaces trunk / 查看 Trunk 信息Port Mode Encapsulation Status Native vlanFa0/

14、2 on 802.1q trunking 1(4) SW3勺 Access 接 口配置SW3(config)#interface fa0/10/ 与 PC1 相连的接口SW3(config-if)#switchport mode accessSW3(config-if)#switchport access vlan 10SW3(config-if)#spanning-tree portfast配置成 Portfast 端口SW3(config-if)#exitSW3(config)#interface fa0/11/ 与 PC1 相连的接 口SW3(config-if)#switchport

15、mode accessSW3(config-if)#switchport access vlan 11SW3(config-if)#spanning-tree portfast配置成 Portfast 端口SW3#show vlan-sw brief / 查看 Vlan 信息VLAN Name Status Ports10 VLAN0010activeFa0/1011 VLAN0010activeFa0/11(5)二层设备网管地址配置/为SW配置网管接口SW2(config)#interface vlan 8SW2(config-if)#ip address 192.168.8.130 255

16、.255.255.128SW2(config-if)#no shutdownSW2(config-if)#exitSW2(config)#ip default-gateway 192.168.8.129/为sw:a已置网管接口SW3(config)#interface vlan 8SW3(config-if)#ip address 192.168.8.131 255.255.255.128SW3(config-if)#no shutdownSW3(config-if)#exitSW3(config)#ip default-gateway 192.168.8.129(6)二层网络ST朋测SW1#

17、show spanning-tree brief / 查看生成树简要信息VLAN8Spanning tree enabled protocol ieeeRoot ID Priority 0Address cc00.0ed8.0001This bridge is the rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge IDPriority0Addresscc00.0ed8.0001Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 0NamePo

18、rtIDPrioCostStsRoleFastEthernet0/3128.412819FWDDesgPort-channel2129.6512812FWDDesgDesignatedInterface/都为指定端口,转发状态VLAN10Spanning tree enabled protocol ieeeRoot ID Priority 0Address cc00.0ed8.0002This bridge is the rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID PriorityAddress0cc00.

19、0ed8.0002InterfaceNameFastEthernet0/3Hello Time 2 sec Max Age 20 sec Forward Delay 15secAging Time 0DesignatedPortID Prio Cost Sts Role128.412819 FWD DesgPort-channel2129.6512812FWD Desg/都为指定端口,转发状态Vlanll0 0 0 0 0 0SW2#show spanning-tree briefVLAN8Spanning tree enabled protocol ieeeRoot ID PriorityA

20、ddressCostPortHello Time secBridge ID PriorityAddresssecInterfaceNameFastEthernet0/30cc00.0ed8.000112321 (Port-channel2)2 sec Max Age 20 sec4096cc01.0ed8.0001Hello Time 2 sec Max Age 20 secAging Time 0DesignatedPort ID Prio CostForward Delay 15Forward Delay 15Sts Role128.412819 FWD DesgPort-channel2

21、129.6512812FWDRoot/Fa0/3为指定端口,Po2为跟端口,都为转发状态。Vlan 10 、Vlan 11SW3#show spanning-tree briefVLAN8Spanning tree enabled protocol ieeeRoot IDPriorityAddresscc00.0ed8.000119CostPort2 (FastEthernet0/1)Hello Time2 sec Max Age 20 secForward Delay 15secBridge IDPriority4096Addresscc02.0ed8.0001Hello Time2 sec

22、 Max Age 20 secForward Delay 15secInterfaceAging Time 0DesignatedFastEthernet0/1128.212819FWDRootFastEthernet0/2128.312819BLKAltn/Fa0/1 为根端口,转发状态;Fa0/2为其他端口,阻塞状态。VLAN10Spanning tree enabled protocol ieeeRoot IDPriorityAddresscc00.0ed8.0002Cost19secBridge IDPortHello TimePriorityAddressHello Time2 (F

23、astEthernet0/1)2 sec Max Age 20 secForward Delay 154096cc02.0ed8.00022 sec Max Age 20 secForward Delay 15secInterfaceAging Time 0NamePortIDPrioCostStsRoleFastEthernet0/1128.212819FWDRootFastEthernet0/2128.312819BLKAltnFastEthernet0/10128.1112819FWDDesgDesignated/Fa0/1为根端口,转发状态;Fa0/2为其他端口,阻塞状态;Fa0/10

24、 为指定端口,转发状态。Vlanll0 0 0 0 0 04.三层网络接口配置SW1(config)#ip routing /启动三层交换机的路由SW1(config)#interface vlan 8/Man 8的路由点SW1(config-if)#ip address 192.168.8.129 255.255.255.128SW1(config-if)#no shutdownSW1(config-if)#exitSW1(config)#interface vlan 10 /Vlan 10 的路由点SW1(config-if)#ip address 192.168.10.1 255.255

25、.255.0SW1(config-if)#no shutdownSW1(config-if)#exitSW1(config)#interface vlan 11 /Vlan 11 的路由点SW1(config-if)#ip address 192.168.11.1 255.255.255.0SW1(config-if)#no shutdownSW1(config-if)#exit5.STP切换测试SW3(config)#interface fa0/1SW3(config-if)#shutdownSW3(config-if)#endSW3#show spanning-tree briefVLAN

26、8Name Port ID Prio Cost StsFastEthernet0/2 128.312819 FWD/ 由 Blk 至U FWDVLAN10Name Port ID Prio Cost StsFastEthernet0/2 128.312819 FWD/ 由 Blk 至U FWDFastEthernet0/10 128.11 12819 FWDVLAN11Name Port ID Prio Cost StsFastEthernet0/2 128.312819 FWD/ 由 Blk 至U FWDFastEthernet0/11 128.12 12819 FWD/Fa0/1 shut

27、down 之前,Fa0/2通过 STP协议划为阻塞端口, shutdown 后,由于酉己置了 spanning-tree potrfast 命令,Fa0/2 绕 过监听、学习直接进入转发状态。四.实验测试1.Fa0/2为阻塞状态时,数据流只从 Fa0/1进出,不经过Fa0/2物理 接口。Fa0/1shutdown后,Fa0/2进入转发状态,数据流从 Fa0/2进 出。(以PC1PingPC如例)/Fa0/2为阻塞端口时,PC1ping通PC2数据流经过Fa0/1端口。kJ PCS 11?2.1G8_1L-100192.1£8.11.100192.1E8.11.100192,lfc8.

28、11.100192.lt8.li.100192.16S.il.iaBicrap_seq(=L time =17-000 ms icmp_se(=2 time=22.000 ms i仁time322_000 ms 1c np_3e (j=4 t ime -10 . 000 msicrip_se(j=5 tine =13.000msUPCS 1 >pin<j !?2A68A1.100 192.168.11.100 icmp_se(i=l time=lS.000mstL92.16S.ll.19Blcnip_seq|=2 timE=14.kiS0ms192.16S.il.100icrops

29、cqi=3 tline =21.808ms1?2,168.11.100icrap_se=4 time-15.000ms192.168.11.190icmp_se(i=5 time=16.000ms/Fa0/1shutdown 后,PC2在一段时间内,出现丢包现象(这段时间判断Fa0/1端口是否Down然后作出相应的决策,使 Fa0/2进入转发状态)JPCS 1 >plnff 192,its-IL.100 i72 * 168.11.130 icnp_se(f=l tineout 192,168.11.100 icnp_se(j=2 t Lneout 1?2.11.10S lcnp_&eq-3 tineouc 12.163.11.109 Lcnp_s:eq=4 tineoiit: 168,11,100 1&咆)-5;3=5 tintontUPGS 1 >pin9 1?2.168.11.100192 -168 . 11 13B icnp_se(i=L ttne

温馨提示

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

评论

0/150

提交评论