CCNP交换实验步聚

上传人:沈*** 文档编号:84464428 上传时间:2022-05-03 格式:DOC 页数:7 大小:182.50KB
收藏 版权申诉 举报 下载
CCNP交换实验步聚_第1页
第1页 / 共7页
CCNP交换实验步聚_第2页
第2页 / 共7页
CCNP交换实验步聚_第3页
第3页 / 共7页
资源描述:

《CCNP交换实验步聚》由会员分享,可在线阅读,更多相关《CCNP交换实验步聚(7页珍藏版)》请在装配图网上搜索。

1、wordCP交换实验HSRP/STP/PAGP实验要求:本拓扑按典型中小企业网冗余备份与生成树环境进展搭建,通过配置 HSRP 与 STP 来 保证交换网络的冗余备份。 1、SW1 规划 VLAN1、VLAN2、VLAN3,SW1 作为 VTP 的 Server,域名为 sovand 2、SW2 规划为 VTP 的 client,域名与server 统一 3、SW1 和 SW2 之间进展 etherchannel 配置,采用 PAGP 协商,确保三台交换机的链路为 trunk 4、VLAN1 作为三个交换机的管理VLAN,PC1 划入 VLAN2,PC2 划入 VLAN3 5、SW1、SW2

2、使用 PVST+,SW1 作为奇数 VLAN 的主根,SW2 作为偶数 VLAN 主根 6、SW3 开启 uplinkfast 和 portfast 7、在 SW1 和 SW2 上各起 3 个 VLAN 的 SVI,并规划处 HSRP 的虚拟 IP 8、规划 HSRP 的 active 设备与 STP 主根统一 9、测试 PC 之间的联通性,保证 PC 可以 telnet 任何一个交换机 10、拔掉实际传输链路,测试备份链路传输切换性能 附加实验: 1、把 PVST+改为 MSTP,奇数 VLAN 绑定为实例 1,偶数 VLAN 绑定为实例 2 2、实例 1 的主根为 SW1,实例 2 的主根

3、为 SW2 3、修改 etherchannel 的协商协议,改为 LACP 的 active 模式 实验拓扑: 实验步骤: 1、 在配置 VLAN 和 VTP 协议 SW1: SW1(config)#vlan 2 SW1(config-vlan)#vlan 3 SW1(config-vlan)#exit SW1(config)#int f0/1 SW1(config-if)#switchport trunk encapsulation dot1q /在三层接口上封装 802.1Q 协议 SW1(config-if)#switchport mode trunk SW1(config)#vtp d

4、omain sovand /配置 VTP 域名为 sovand SW1(config)#vtp mode server /设置 VTP 服务器模式 SW2: SW2(config)#int f0/1 SW2(config-if)#switchport trunk encapsulation dot1q SW2(config-if)#switchport mode trunk SW2(config)#vtp domain sovand SW2(config)#vtp mode client SW3: SW3(config)#int f0/1 SW3(config-if)#switchport m

5、ode trunk SW3(config)#int f0/2 SW3(config-if)#switchport mode trunk SW3(config-if)#int f0/3 SW3(config-if)#switchport mode access SW3(config-if)#switchport access vlan 2 SW3(config-if)#int f0/4 SW3(config-if)#switchport mode access SW3(config-if)#switchport access vlan 3 SW3(config)#vtp domain sovan

6、d SW3(config)#vtp mode client 2、配置 PAGP 链路聚合协议 SW1: SW1(config)#int range f0/19 - 20 SW1(config-if-range)channel-protocal pagp /使用 pagp 协议 SW1(config-if-range)#channel-group 1 mode desirable /设置为自动协商模式 SW2: SW1(config)#int range f0/23 - 24 SW1(config-if-range)channel-protocal pagp SW1(config-if-rang

7、e)#channel-group 1 mode desirable 查看链路会聚状态: SW2#show etherchannel summary Number of channel-groups in use: 1 Number of aggregators: 1 Group Port-channel Protocol Ports -+-+-+- 1 Po1(SU) PAgP Fa0/23(P) Fa0/24(P) SW1#show etherchannel summary Number of channel-groups in use: 1 Number of aggregators: 1

8、 Group Port-channel Protocol Ports -+-+-+- 1 Po1(SU) PAgP Fa0/19(P) Fa0/20(P) 3、配置 STP SW1: SW1(config)#spanning-tree vlan 2 root secondery /设定 SW1 为 VLAN2 的辅助根桥 SW1(config)#spanning-tree vlan 3 root primary /设定 SW1 为 VLAN3 的主根桥 SW2: SW2(config)#spanning-tree vlan 2 root primary SW2(config)#spanning

9、-tree vlan 3 root secondery SW3: SW3(config)#spanning-tree vlan 2 SW3(config)#spanning-tree vlan 3 查看生成树状态: SW2#show spanning-tree VLAN0002 Spanning tree enabled protocol ieee Root ID Priority 24578 Address 0012.8077.3200 This bridge is the root /SW2 为 VLAN2 的根桥 Hello Time 2 sec Max Age 20 sec Forwa

10、rd Delay 15 sec Bridge ID Priority 24578 (priority 24576 sys-id-ext 2) Address 0012.8077.3200 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type - - - - - - Fa0/1 Desg FWD 19 128.1 P2p Po1 Desg FWD 12 128.65 P2p VLAN0003 Spanning tree enabled pr

11、otocol ieee Root ID Priority 8195 Address 0022.9062.7380 Cost 12 Port 65 (Port-channel2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 28675 (priority 28672 sys-id-ext 3) Address 0012.8077.3200 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Ro

12、le Sts Cost Prio.Nbr Type - - - - - - Fa0/1 Desg FWD 19 128.1 P2p Po1 Root FWD 12 128.65 P2p 开启 uplinkfast 和 portfast SW3: SW3(config)#spanning-tree uplinkfast SW3(config)#int f0/3 SW3(config-if)#spanning-tree portfast SW3(config)#int f0/4 SW3(config-if)#spanning-tree portfast 查看 uplinkfast 和 portfa

13、st: SW3#show spanning-tree uplinkfast UplinkFast is enabled Station update rate set to 150 packets/sec. UplinkFast statistics - Number of transitions via uplinkFast (all VLANs) : 15 Number of proxy multicast addresses transmitted (all VLANs) : 88 Name Interface List - - VLAN0001 Fa0/1(fwd), Fa0/2 VL

14、AN0002 Fa0/1(fwd), Fa0/2 VLAN0003 Fa0/2(fwd), Fa0/1 SW3#show spanning-tree int f0/3 portfast VLAN0002 enabled SW3#show spanning-tree int f0/4 portfast VLAN0003 enabled 4、将 VLAN1 配置为管理 VLAN SW1: /VLAN1 的网关 SW1(config)#line vty 0 4 SW1(config-line)#password cisco SW1(config-line)#login SW2: /网关指向 SW1

15、SW2(config)#line vty 0 4 SW2(config-line)#password cisco SW2(config-line)#login SW3: /网关指向 SW1 SW3(config)#line vty 0 4 SW3(config-line)#password cisco SW3(config-line)#login 5、外部启用 EIGRP 协议 SW1: SW1(config)#int f0/3 SW1(config-if)#no switchport /将内网通告进去 SW1(config-router)#no auto-summary SW2: SW2(c

16、onfig)#int f0/2 SW2(config-if)#no switchport SW2(config-if)#ip add 100.1.1.2 255.255.255.0 SW2(config-if)#no shut SW2(config)#router eigrp 1 SW2(config-router)#net 100.1.1.0 SW2(config-router)#net 192.168.2.0 SW2(config-router)#net 192.168.3.0 SW2(config-router)#no auto-summary R4: R4(config)#router

17、 eigrp 1 R4(config-router)#net 200.1.1.0 R4(config-router)#net 100.1.2.0 R4(config-router)#net 100.1.1.0 R4(config-router)#no auto-summary 6、使用 HSRP 进展会聚交换机的备份 SW1: /配置 VLAN2 的 IP SW1(config-if)#standby 1 priority 100 /配置 VLAN2 的虚拟网关 SW1(config-if)#standby 1 preempt /启用抢占模式 SW1(config-if)#standby 1

18、timers 1 3 /配置 VLAN3 的 IP SW1(config-if)#standby 1 priority 200 /配置 VLAN3 的虚拟网关 SW1(config-if)#standby 1 preempt /启用抢占模式 SW1(config-if)#standby 1 timers 1 3 SW2: /配置 VLAN2 的 IP SW2(config-if)#standby 1 priority 200 /配置 VLAN2 的虚拟网关 SW2(config-if)#standby 1 preempt /配置 VLAN3 的 IP SW2(config-if)#standb

19、y 1 priority 100 /配置 VLAN3 的虚拟网关 SW2(config-if)#standby 1 preempt /启用抢占模式 SW2(config-if)#standby 1 timers 1 3 查看 standby: SW2#show standby vlan 2 br P indicates configured to preempt. | Interface Grp Prio P State Active Standby Virtual IP Vl2 1 200 P Active local 192.168.2.101 192.168.2.1 由上面可见 SW2

20、为 VLAN2 的 Active 交换机,虚拟网关为 192.168.2.1 SW2#show standby vlan 3 br P indicates configured to preempt. | Interface Grp Prio P State Active Standby Virtual IP Vl3 1 100 Standby 192.168.3.101 local 192.168.3.1 由上面可见 SW1 为 VLAN3 的 Active 交换机,虚拟网关为 192.168.3.1 7、将 PVST+改为 MSTP SW1: SW1(config)#spanning-tr

21、ee mode mst /将生成树改为 MST 模式 SW1(config)#spanning-tree mst configuration /进入 MST 配置模式 SW1(config-mst)#name sovand /设置名字为 sovand SW1(config-mst)#revision 1 /修订号设为 1 SW1(config-mst)#instance 1 vlan 3 /在第一组里包含 VLAN3 SW1(config-mst)#instance 2 vlan 2 /在第二组里包含 VLAN2 SW1(config)#spanning-tree mst 1 root pri

22、mary /将 SW1 设为第一组的主根桥 SW1(config)# spanning-tree mst 2 root secondery /将 SW1 设为第二组的辅助根桥 SW2: SW2(config)#spanning-tree mode mst SW2(config)#spanning-tree mst configuration SW2(config-mst)#name sovand SW2(config-mst)#revision 1 SW2(config-mst)#instance 1 vlan 3 SW2(config-mst)#instance 2 vlan 2 SW2(c

23、onfig)#spanning-tree mst 1 root secondery /将 SW2 设为第一组的辅助根桥 SW2(config)#spanning-tree mst 2 root primary /将 SW2 设为第二组的主根桥 SW3: SW3(config)#spanning-tree mode mst SW3(config)#spanning-tree mst configuration SW3(config-mst)#name sovand SW3(config-mst)#revision 1 SW3(config-mst)#instance 1 vlan 3 SW3(c

24、onfig-mst)#instance 2 vlan 2 查看 MSTP 情况: SW1#show spanning-tree mst 2 # MST2 vlans mapped: 2 Bridge address 0022.9062.7380 priority 28674 (28672 sysid 2) Root address 0012.8077.3200 port Po1 priority cost 24578 (24576 sysid 2) 100000 rem hops 19Interface Role Sts Cost Prio.Nbr Type - - - - - - Fa0/2

25、 Desg FWD 200000 128.4 P2p Pre-STD-Rx Po1 Root FWD 100000 128.56 P2p SW2#show spanning-tree mst 2 # MST2 vlans mapped: 2 Bridge address 0012.8077.3200 priority 24578 (24576 sysid 2) Root this switch for MST2 /SW2 为第二组的主根桥 Interface Role Sts Cost Prio.Nbr Type - - - - - - Fa0/1 Desg FWD 200000 128.1

26、P2p Pre-STD-Rx Po1 Desg FWD 100000 128.66 P2p 8、将 PAGP 改成 LACP SW1: SW1(config)#lacp system-priority 100 SW1(config)#int range f0/19 - 20 SW1(config-if-range)channel-protocal lacp SW1(config-if-range)#channel-group 1 mode active SW1(config-if-range)#lacp port-priority SW2: SW1(config)#int range f0/2

27、3 - 24 SW1(config-if-range)channel-protocal lacp SW1(config-if-range)#channel-group 1 mode active 查看 LACP: SW2#show etherchannel summary Flags: D - down P - in port-channel I - stand-alone s - suspended H - Hot-standby (LACP only) R - Layer3 S - Layer2 U - in use f - failed to allocate aggregator u

28、- unsuitable for bundling w - waiting to be aggregated d - default port Number of channel-groups in use: 2 Number of aggregators: 2 Group Port-channel Protocol Ports -+-+-+- 1 Po1(SU) LACP Fa0/23(P) Fa0/24(P) 9、在 3560 交换机上配置 SLA 端口跟踪 在 SW1 的出口 F0/3 调用 SLA 进展跟踪,如果 F0/3 的出口链路出现问题,如此将 VLAN3 的 active 交换

29、机SW1的优先级减少 10595,比 standby 交换机SW2中的优先级100 要低。这时 SW2 的抢占功能开始发挥作用,VLAN3 将 SW2 作为新的 active 交换机。 SW1: SW1(config)# track 1 rtr 1 reachability /创建一个 track 对 SLA 1 进展跟踪 SW1(config)#ip sla 1 /使用 ICMP 报文测试两端的联通性 SW1(config-sla)#timeout 2000 /最大 dead 时间为 2000ms SW1(config-sla)#frequency 3 /频率设为 3 秒 SW1(confi

30、g-sla)#ip sla schedule 1 life forever start-time now /起始时间为从现在到永久 SW1(config)#int vlan 3 SW1(config-if)#standby 1 track 1 decrement 105 /在 VLAN3 中调用 truck,如果链路出现问题,如此 将 VLAN3 的优先级减少 105 测试备份链路的冗余功能: 首先在设备运行正常的时候,用 PC 对远端的服务器进展一个长 ping,然后再 ping 包 的过程中将 F0/3 shut 掉,查看交换机的冗余情况。 SW1#SHOW standby vlan 3

31、br P indicates configured to preempt. | Interface Grp Prio P State Active Standby Virtual IP Vl3 1 95 P Standby 192.168.3.100 local 192.168.3.1 可见 VLAN3 的 active 交换机优先级已经从 200 减少到了 95 SW2 03:49:02: %HSRP-6-STATECHANGE: Vlan3 Grp 1 state Active -> Speak 04:02:28: %HSRP-6-STATECHANGE: Vlan3 Grp 1 s

32、tate Standby -> Active /VLAN3 的备用交换机 SW2 开始发挥作用 SW1 *Mar 1 03:49:13.340: %HSRP-5-STATECHANGE: Vlan3 Grp 1 state Active -> Speak *Mar 1 03:49:16.343: %HSRP-5-STATECHANGE: Vlan3 Grp 1 state Speak -> Standby/ 原 active 交换机转变为 standbyPC2#ping 200.1.1.1 repeat 5000 Type escape sequence to abort. Sending 5000, 100-byte ICMP Echos to 200.1.1.1, timeout is 2 seconds: ! !.! ! . Success rate is 99 percent (4996/5000), round-trip min/avg/max = 1/2/20 ms 我们可以发现在 ping 包的过程中,如果中间出现了故障,HSRP 的冗余可以在极短的时间内对设备进展切换,使传输过程中丢失包的数量减到最少。可以通过修改 hello 和保持时间来控制,本实验设为1 秒和3 秒。实验完毕。7 / 7

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

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!