




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、一实验目标1、 组网需求:采用两台核心交换机组网来提高网络可靠性,为防止二层环路,需要全网运行STP;将SW1部署为跟网桥,SW2部署为备份跟网桥,并将接入PC的接口配置为portfast端口;SW1SW2之间使用链路捆绑进一步提高可靠性2、 分析STP的选举过程(跟网桥,根端口,制定端口,阻塞端口)3、 测试STP切换,并分析STP的端口状态切换过程。二、实验拓扑图 SW2备份根网桥int vlan 10 192.168.10.2/24int vlan 11192.168.11.2/24三、实验内容 1、基本信息配置 SW1 Switchenable /进入全局模式Switch(config
2、)#hostname SW1/进入特权模式SW1(config)#no ip domain lookup/禁用域名查找SW1(config)#enable password ip/设置进入特权模式密码SW1(config)#line console 0/连接到console线口 SW1(config-line)#logging synchronous/自动换行SW1(config-line)#exec-t 0/超时为0SW1(config-line)#password ip/设置进入console线口的密码SW1(config-line)#login/进入console线口是需要进行认证SW1
3、(config-line)#exit/退出console线口SW1(config)#line aux 0/进入线口SW1(config-line)#logging synchronous/自动换行SW1(config-line)#exec-t 0/超时为0SW1(config-line)#password bluefox/设置进入本线口的密码SW1(config-line)#login/设置进入线口是进行认证 SW1(config-line)#exit/退出线口SW1(config)#line vty 04/进入线口SW1(config-line)#logging synchronous /自
4、动换行SW1(config-line)#exec-t 0/超时为0 SW1(config-line)#password bluefox/设置进入密码SW1(config-line)#login/设置进入是进行认证SW1(config-line)#exit/退出线口SW2Switchenable Switch#config terminalSwitch(config)#hostname SW2SW2(config)#no ip domain lookupSW2(config)#enable password ipSW2(config)#line console 0 SW2(config-line
5、)#logging synchronousSW2(config-line)#exec-t 0SW2(config-line)#password ipSW2(config-line)#loginSW2(config-line)#exitSW2(config)#line aux 0SW2(config-line)#logging synchronousSW2(config-line)#exec-t 0SW2(config-line)#password bluefoxSW2(config-line)#login SW2(config-line)#exitSW2(config)#line vty 04
6、SW2(config-line)#logging synchronous SW2(config-line)#exec-t 0SW2(config-line)#password bluefoxSW2(config-line)#login SW2(config-line)#exitSW3Switchenable Switch#config terminalSwitch(config)#hostname SW3SW3(config)#no ip domain lookupSW3(config)#enable password ipSW3(config)#line console 0 SW3(conf
7、ig-line)#logging synchronousSW3(config-line)#exec-t 0SW3(config-line)#password ipSW3(config-line)#loginSW3(config-line)#exitSW3(config)#line aux 0SW3(config-line)#logging synchronousSW3(config-line)#exec-t 0SW3(config-line)#password bluefoxSW3(config-line)#login SW3(config-line)#exitSW3(config)#line
8、 vty 04SW3(config-line)#logging synchronous SW3(config-line)#exec-t 0SW3(config-line)#password bluefoxSW3(config-line)#login SW3(config-line)#exit2、创建vlan SW1 SW1#vlan database/进入vlan database模式SW1(vlan)#vlan 8/创建vlan8SW1(vlan)#vlan 10/创建vlan10SW1(vlan)#vlan 11/创建vlan11SW1(vlan)#exit/退出vlan database
9、模式、SW2SW2#vlan database/进入vlan database模式SW2(vlan)#vlan 8/创建vlan8SW2(vlan)#vlan 10/创建vlan10SW2(vlan)#vlan 11/创建vlan11SW2(vlan)#exit/退出vlan database模式SW3SW3#vlan database/进入vlan数据库SW3(vlan)#vlan 8/创建vlan8SW3(vlan)#vlan 10/创建vlan10SW3(vlan)#vlan 11/创建vlan11SW3(vlan)#exit/退出vlan database模式4、 跟网桥配置SW1(c
10、onfig)#spanning-tree vlan 8 priority 0/配置sw1为vlan8的跟网桥SW1(config)#spanning-tree vlan 10 priority 0/配置sw1为vlan10的跟网桥SW1(config)#spanning-tree vlan 11 priority 0/配置sw1为vlan11 的跟网桥注:模拟器上不支持批量配置vlan跟网桥,只能一个一个配置SW2(config)#spanning-tree vlan 8 priority 4096/配置sw2为vlan8的备份网桥SW2(config)#spanning-tree vlan
11、10 priority 4096/配置sw2为vlan10 的备份网桥SW2(config)#spanning-tree vlan 11 priority 4096/配置sw2为vlan11的备份网桥5、 二层链路捆绑SW1 SW1(config)#interface range fastEthernet 0/1 -2 /进入端口1和2SW1(config-if-range)#switchport trunk encapsulation dot1q/设置trunk封装协议为dot1q SW1(config-if-range)#switchport mode trunk/端口为trunk模式SW
12、1(config-if-range)#switchport trunk allowed vlan all/配置trunk允许所有vlan通过SW1(config-if-range)#channel-group 2 mode on/将端口1和2划分到通道组2中SW1(config-if-range)#exit/退出端口1和2SW2SW2(config)#interface range fastEthernet 0/1 -2/进入端口1 和2SW2(config-if-range)#switchport trunk encapsulation dot1q/配置trunk封装协议为dot1qSW2(
13、config-if-range)#switchport mode trunk/配置端口为trunk接口SW2(config-if-range)#switchport trunk allowed vlan all/配置trunk允许所有vlan通过SW2(config-if-range)#channel-group 2 mode on/将接口1和2 划分到通道组2中SW2(config-if-range)#exit/退出接口6、 二层接口配置SW1 SW1(config)#interface fastEthernet 0/3 /进入接口SW1(config-if)#switchport trun
14、k encapsulation dot1q/配置trunk封装协议为dot1qSW1(config-if)#switchport mode trunk/配置接口为trunk接口SW1(config-if)#switchport trunk allowed vlan all/配置trunk允许所有vlan通过SW1(config-if)#exit/退出端口SW2SW2(config)#interface fastEthernet 0/3/进入接口SW2(config-if)#switchport trunk encapsulation dot1q/配置trunk封装协议为dot1qSW2(con
15、fig-if)#switchport mode trunk/配置接口为trunk接口SW2(config-if)#switchport trunk allowed vlan all/配置trunk允许所有vlan通过SW2(config-if)#exit/退出接口SW3SW3(config)#interface fastEthernet 0/10/进入接口SW3(config-if)#switchport mode access/配置接口为access接入模式SW3(config-if)#switchport access vlan 10/将接口划分到vlan10 中SW3(config-if
16、)# spanning-tree portfast/设置接口为portfast模式,SW3(config-if)#exit /退出接口SW3(config)#interface fastEthernet 0/11/进入接口SW3(config-if)#switchport mode access/配置接口为access接入模式 SW3(config-if)#switchport access vlan 11/将接口划分到vlan11中SW3(config-if)# spanning-tree portfast/设置接口为portfast模式SW3(config-if)#exit/退出接口SW3
17、(config)#interface range fastEthernet 0/1 -2/进入接口1和2,此处为批量设置,因为两个接口的配置相同SW3(config-if-range)#switchport trunk encapsulation dot1q/配置trunk的封装协议为dot1qSW3(config-if-range)#switchport mode trunk/配置接口为trunk模式SW3(config-if-range)#switchport trunk allowed vlan all/配置trunk允许所有vlan通过SW3(config-if-range)#exit
18、/退出接口1和27、 二层设备网管配置SW2(config)#interface vlan 8/为sw2配置网管地址SW2(config-if)#ip address 192.168.8.130 255.255.255.128/配置ip地址SW2(config-if)#no shutdown/启用SW2(config-if)#exit/退出 SW3(config)#interface vlan 8/为sw3配置网管地址SW3(config-if)#ip address 192.168.8.132 255.255.255.128/配置ip地址SW3(config-if)#no shutdown/
19、启用端口SW3(config-if)#exit/退出8、 三层接口配置SW1(config)#ip routing/启用三层交换机路由功能,默认开启SW1(config)#interface vlan 8/vlan 8的路由点SW1(config-if)#ip address 192.168.8.129 255.255.255.128SW1(config-if)#no shutSW1(config-if)#exitSW1(config)#interface vlan 10/vlan10 的路由点SW1(config-if)#ip address 192.168.10.1 255.255.255
20、.0SW1(config-if)#no shutSW1(config-if)#exitSW1(config)#interface vlan 11/vlan11 的路由点SW1(config-if)#ip address 192.168.11.1 255.255.255.0SW1(config-if)#no shutSW1(config-if)#exitSW2(config)#ip routing/启用三层交换机路由功能,默认开启SW2(config)#interface vlan 10/vlan10 的路由点SW2(config-if)#ip address 192.168.10.2 255.
21、255.255.0SW2(config-if)#no shutSW2(config-if)#exitSW2(config)#interface vlan 11/vlan11 的路由点SW2(config-if)#ip address 192.168.11.2 255.255.255.0SW2(config-if)#no shutSW2(config-if)#exit四、实验结果 全网连通相互都能ping通 (SW 2必须配置Vlan 10和Vlan11的IP,否则与这二个Vlan的主机无法ping通)9、 STP切换测试测试前sw3上show信息SW3#show spanning-tree b
22、riefVLAN1 Spanning tree enabled protocol ieee- - - - - - - -FastEthernet0/1 128.2 128 19 FWD 0 32768 cc00.09ec.0000 128.4 FastEthernet0/2 128.3 128 19 BLK 12 32768 cc01.09ec.0000 128.4 VLAN8 Spanning tree enabled protocol ieee- - - - - - - -FastEthernet0/1 128.2 128 19 FWD 0 0 cc00.09ec.0001 128.4 F
23、astEthernet0/2 128.3 128 19 BLK 12 4096 cc01.09ec.0001 128.4 VLAN10 Spanning tree enabled protocol ieee- - - - - - - -FastEthernet0/1 128.2 128 19 FWD 0 0 cc00.09ec.0002 128.4 FastEthernet0/2 128.3 128 19 BLK 12 4096 cc01.09ec.0002 128.4 FastEthernet0/10 128.11 128 19 FWD 19 32768 cc02.09ec.0002 128
24、.11 VLAN11 Spanning tree enabled protocol ieeeInterface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/1 128.2 128 19 FWD 0 0 cc00.09ec.0003 128.4 FastEthernet0/2 128.3 128 19 BLK 12 4096 cc01.09ec.0003 128.4 FastEthernet0/11 128.12 128 19 FWD 19 32768 cc02.0
25、9ec.0003 128.12将sw3上SW3(config)#interface fastEthernet 0/1/进入接口SW3(config-if)#shutdown/关闭接口SW3#show spanning-tree briefVLAN1 Spanning tree enabled protocol ieee- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 0 32768 cc01.09ec.0000 128.4 VLAN8 Spanning tree enabled protocol ieee- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 12 4096 cc01.09ec.0001 128.4 VLAN10 Spanning tree enabled protocol ieee- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 12 4096 cc01.09ec.0002 128.4 FastEthernet0/10 128.11 128 19 FWD 31 32768 cc02.09ec.0002 128.11 VLAN11 Spanning tree enabled protoco
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年能源行业CCS项目经济性研究:国际合作与竞争态势
- 2025年教育领域创新案例研究:翻转课堂与混合式学习的实践探索
- 民兵工作面试题库及答案
- 教师招聘之《小学教师招聘》综合检测模拟卷一套附答案详解
- 2025年教师招聘之《小学教师招聘》练习题库及完整答案详解【历年真题】
- 2025年公共基础知识试题库附答案详解
- 教师招聘之《小学教师招聘》通关模拟卷带答案详解(能力提升)
- 2025年教师招聘之《小学教师招聘》考前冲刺测试卷包带答案详解(研优卷)
- 演出经纪人之《演出经纪实务》从业资格考试真题及一套参考答案详解
- 2025年教师招聘之《小学教师招聘》综合提升练习题附答案详解(综合卷)
- 网络安全检查表
- 《财税高薪就业陪跑训练营介绍》序-朱海明(中国最励志的讲师之一)著 - 2稿
- 高考语文复习:古诗鉴赏之人物形象
- DL∕T 1100.1-2018 电力系统的时间同步系统 第1部分:技术规范
- AQ/T 9009-2015 生产安全事故应急演练评估规范(正式版)
- 2024年大学试题(宗教学)-道教文化笔试考试历年典型考题及考点含含答案
- DZ∕T 0211-2020 矿产地质勘查规范 重晶石、毒重石、萤石、硼(正式版)
- 《电力建设施工技术规范 第3部分:汽轮发电机组》DLT 5190.3
- 重大版小学英语六年级上册全册教案
- 如何正确使用和佩戴劳动防护用品培训课件
- GB/T 43586-2023聚烯烃冷拉伸套管膜
评论
0/150
提交评论