HSRP实验过程及报告
本作品内容为HSRP实验过程及报告,格式为 docx ,大小 47085 KB ,页数为 10页
('目录HSRP实验过程及报告.................................................................................................2实验环境:............................................................................................................2实验拓扑:............................................................................................................2实验目的:............................................................................................................2实验过程:............................................................................................................31配置交换机.................................................................................................32测试HSRP..................................................................................................53测试HSRP跟踪.........................................................................................8实验总结:..........................................................................................................101HSRP实验过程及报告实验环境:DynamipsGUI模拟器模拟出4台cisco3640三层交换机。两台开启HSRP协议,设备之间使用Ethernetchannel绑定的两条线路互联。其余两台交换机分别连接到这两台交换机。实验拓扑:实验拓扑如图1实验目的:熟悉HSRP协议,验证HSRP网关冗余特性,测试HSRP抢占过程及HSRP接口跟踪。2实验过程:1配置交换机在交换机SW1配置F0/0.F0/1接口加入channel-group1并将port-channel1配置为trunk模式。SW1(config)#intrangef0/0-1SW1(config-if-range)#channel-group1modeonCreatingaport-channelinterfacePort-channel1SW1(config-if-range)#Mar101:23:58.639:%EC-5-BUNDLE:InterfaceFa0/0joinedport-channelPo1Mar101:23:58.935:%EC-5-BUNDLE:InterfaceFa0/1joinedport-channelPo1SW1(config-if-range)#Mar101:24:01.415:%LINEPROTO-5-UPDOWN:LineprotocolonInterfacePort-channel1,changedstatetoupSW1(config-if-range)#exitSW1(config)#intport-channel1SW1(config-if)#switchportmodetrunkSW1(config-if)#endSW1#shetherchannelsuFlags:D-downP-inport-channelI-stand-alones-suspendedR-Layer3S-Layer2U-inuseGroupPort-channelPorts-----+------------+-----------------------------------------------------------1Po1(SU)Fa0/0(P)Fa0/1(P)在交换机SW2上同样的配置。.SW2(config)#intrangef0/0-1SW2(config-if-range)#chanSW2(config-if-range)#channel-group1modeonCreatingaport-channelinterfacePort-channel1SW2(config-if-range)#Mar101:24:38.119:%EC-5-BUNDLE:InterfaceFa0/0joinedport-channelPo1Mar101:24:38.391:%EC-5-BUNDLE:InterfaceFa0/1joinedport-channelPo1SW2(config-if-range)#intportMar101:24:40.971:%LINEPROTO-5-UPDOWN:LineprotocolonInterfacePort-channel1,changedstatetoupSW2(config-if-range)#exitSW2(config)#intport-channel13SW2(config-if)#switchportmodetrunkSW2(config-if)#endSW2#shSW2#shetherchannelsummaryFlags:D-downP-inport-channelI-stand-alones-suspendedR-Layer3S-Layer2U-inuseGroupPort-channelPorts-----+------------+-----------------------------------------------------------1Po1(SU)Fa0/0(P)Fa0/1(P)配置HSRPSW1(config)#intvl1SW1(config-if)#ipadd192.168.1.11255.255.255.0SW1(config-if)#standby10ip192.168.1.100SW1(config-if)#standby10priority110SW1(config-if)#standby10preemptSW1(config-if)#Mar103:57:44.467:%HSRP-5-STATECHANGE:Vlan1Grp10stateSpeak->StandbyMar103:57:44.967:%HSRP-5-STATECHANGE:Vlan1Grp10stateStandby->Active查看HSRP状态Vlan1-Group10StateisActive2statechanges,laststatechange00:00:59VirtualIPaddressis192.168.1.100ActivevirtualMACaddressis0000.0c07.ac0aLocalvirtualMACaddressis0000.0c07.ac0a(v1default)Hellotime3sec,holdtime10secNexthellosentin0.936secsPreemptionenabledActiverouterislocalStandbyrouterisunknownPriority110(configured110)IPredundancynameis"hsrp-Vl1-10"(default)先配置HSRP的为活跃状态,抢占模式,优先级为110(手动配置)。4SW2(config)#intvl1SW2(config-if)#ipadd192.168.1.22255.255.255.0SW2(config-if)#standby10ip192.168.1.100SW2(config-if)#standby10preemptSW2(config-if)#Mar104:01:09.207:%HSRP-5-STATECHANGE:Vlan1Grp10stateSpeak->Standby查看SW2的HSRP状态Vlan1-Group10StateisStandby1statechange,laststatechange00:00:50VirtualIPaddressis192.168.1.100ActivevirtualMACaddressis0000.0c07.ac0aLocalvirtualMACaddressis0000.0c07.ac0a(v1default)Hellotime3sec,holdtime10secNexthellosentin0.908secsPreemptionenabledActiverouteris192.168.1.11,priority110(expiresin8.792sec)StandbyrouterislocalPriority100(default100)IPredundancynameis"hsrp-Vl1-10"(default)该设备为standby状态,配置了抢占模式,优先级为默认的100。2测试HSRP使用SW3尝试不停ping虚拟IP192.168.1.100,期间切换主备交换机,产看切换情况。SW1(config)#intvl1SW1(config-if)#shutSW1(config-if)#Mar104:21:17.062:%HSRP-5-STATECHANGE:Vlan1Grp10stateActive->InitSW1(config-if)#Mar104:21:19.066:%LINK-5-CHANGED:InterfaceVlan1,changedstatetoadministrativelydownMar104:21:20.066:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceVlan1,changedstatetodownSW1(config-if)#关闭了SW1上的VLAN1,查看交换机SW2上的HSRP情况。SW2#shstanMar104:21:06.262:%HSRP-5-STATECHANGE:Vlan1Grp10stateStandby->5ActiveSW2#shstanVlan1-Group10StateisActive8statechanges,laststatechange00:00:07VirtualIPaddressis192.168.1.100ActivevirtualMACaddressis0000.0c07.ac0aLocalvirtualMACaddressis0000.0c07.ac0a(v1default)Hellotime3sec,holdtime10secNexthellosentin1.828secsPreemptionenabledActiverouterislocalStandbyrouterisunknownPriority100(default100)IPredundancynameis"hsrp-Vl1-10"(default)可以看到SW2的HSRP状态为Active,观察交换机SW3的ping包情况SW3#ping192.168.1.100repeat1000Typeescapesequencetoabort.Sending1000,100-byteICMPEchosto192.168.1.100,timeoutis2seconds:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!中间黄色部分为中断过程,是由于HSRP自动切换了活跃设备所引起的,由于切换了活跃交换机,所以导致有一个包是被丢弃的。当SW1失去响应时,HSRP的hello包检测到交换机SW1没有响应。SW2将切为active状态,保证了网络的可靠性。当SW1恢复运行状态,由于SW1配置了抢占且SW1的优先级高于SW2的优先级,所以SW1会成为主,而SW2将成为备。SW1(config-if)#noshutSW1(config-if)#Mar104:27:56.090:%LINK-3-UPDOWN:InterfaceVlan1,changedstatetoupSW1(config-if)#Mar104:27:56.170:%HSRP-5-STATECHANGE:Vlan1Grp10stateListen->ActiveMar104:27:57.090:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceVlan1,changedstatetoupSW1(config-if)#endSW1#shstanvl1Vlan1-Group10StateisActive8statechanges,laststatechange00:01:106VirtualIPaddressis192.168.1.100ActivevirtualMACaddressis0000.0c07.ac0aLocalvirtualMACaddressis0000.0c07.ac0a(v1default)Hellotime3sec,holdtime10secNexthellosentin1.548secsPreemptionenabledActiverouterislocalStandbyrouteris192.168.1.22,priority100(expiresin9.688sec)Priority110(configured110)IPredundancynameis"hsrp-Vl1-10"(default)交换机SW1状态切为Active。SW2#shstanVlan1-Group10StateisStandby10statechanges,laststatechange00:00:24VirtualIPaddressis192.168.1.100ActivevirtualMACaddressis0000.0c07.ac0aLocalvirtualMACaddressis0000.0c07.ac0a(v1default)Hellotime3sec,holdtime10secNexthellosentin2.808secsPreemptionenabledActiverouteris192.168.1.11,priority110(expiresin8.728sec)StandbyrouterislocalPriority100(default100)IPredundancynameis"hsrp-Vl1-10"(default)如果不配置抢占模式,当SW1恢复状态是不会自动切为Active状态的。SW1(config)#intvl1SW1(config-if)#nostandby10preSW1(config-if)#shutSW1(config-if)#Mar104:31:50.102:%HSRP-5-STATECHANGE:Vlan1Grp10stateActive->InitMar104:31:52.110:%LINK-5-CHANGED:InterfaceVlan1,changedstatetoadministrativelydownMar104:31:53.110:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceVlan1,changedstatetodownSW1(config-if)#noshutSW1(config-if)#Mar104:31:59.890:%LINK-3-UPDOWN:InterfaceVlan1,changedstatetoupMar104:32:00.890:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceVlan1,changedstatetoup7SW1(config-if)#endSW1#shstanvl1Vlan1-Group10StateisStandby10statechanges,laststatechange00:00:20VirtualIPaddressis192.168.1.100ActivevirtualMACaddressis0000.0c07.ac0aLocalvirtualMACaddressis0000.0c07.ac0a(v1default)Hellotime3sec,holdtime10secNexthellosentin0.152secsPreemptiondisabledActiverouteris192.168.1.22,priority100(expiresin8.304sec)StandbyrouterislocalPriority110(configured110)IPredundancynameis"hsrp-Vl1-10"(default)在没有配置抢占模式时,当SW1恢复正常运行状态后,是无法将自己切为Active状态的。SW2会继续保持Active状态。SW2#shstanVlan1-Group10StateisActive11statechanges,laststatechange00:02:25VirtualIPaddressis192.168.1.100ActivevirtualMACaddressis0000.0c07.ac0aLocalvirtualMACaddressis0000.0c07.ac0a(v1default)Hellotime3sec,holdtime10secNexthellosentin1.884secsPreemptionenabledActiverouterislocalStandbyrouteris192.168.1.11,priority110(expiresin7.736sec)Priority100(default100)IPredundancynameis"hsrp-Vl1-10"(default)可以看到即使SW1的优先级110比SW2的优先级100高,但由于没有配置抢占模式,SW1依然无法切为Active状态。3测试HSRP跟踪配置HSRP跟踪SW1(config)#intvl1SW1(config-if)#standby10trackfastEthernet0/3308对交换机SW1的F0/3接口连接的线路进行跟踪,F0/3连接着交换机SW4的F0/3接口。如果当这条线路出现问题时,会自动将该交换机的优先级降低30。由于备机的优先级为默认(100)同时配置了抢占模式,所以该交换机会切为standby状态。SW1(config)#intf0/3SW1(config-if)#shutSW1(config-if)#Mar104:56:32.046:%TRACKING-5-STATE:1interfaceFa0/3line-protocolUp->DownMar104:56:32.546:%DTP-5-NONTRUNKPORTON:PortFa0/3hasbecomenon-trunkSW1(config-if)#Mar104:56:33.258:%HSRP-5-STATECHANGE:Vlan1Grp10stateActive->SpeakMar104:56:33.914:%LINK-5-CHANGED:InterfaceFastEthernet0/3,changedstatetoadministrativelydownSW1(config-if)#Mar104:56:34.914:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceFastEthernet0/3,changedstatetodownSW1(config-if)#查看HSRP状态SW1#shstandbyvl1Vlan1-Group10StateisStandby18statechanges,laststatechange00:01:58VirtualIPaddressis192.168.1.100ActivevirtualMACaddressis0000.0c07.ac0aLocalvirtualMACaddressis0000.0c07.ac0a(v1default)Hellotime3sec,holdtime10secNexthellosentin1.856secsPreemptionenabledActiverouteris192.168.1.22,priority100(expiresin7.856sec)StandbyrouterislocalPriority80(configured110)TrackinterfaceFastEthernet0/3stateDowndecrement30IPredundancynameis"hsrp-Vl1-10"(default)降低后的优先级为80,低于交换机SW2的优先级100,所以交换机SW2为standby状态。Vlan1-Group109StateisActive20statechanges,laststatechange00:04:45VirtualIPaddressis192.168.1.100ActivevirtualMACaddressis0000.0c07.ac0aLocalvirtualMACaddressis0000.0c07.ac0a(v1default)Hellotime3sec,holdtime10secNexthellosentin2.284secsPreemptionenabledActiverouterislocalStandbyrouteris192.168.1.11,priority80(expiresin7.320sec)Priority100(default100)IPredundancynameis"hsrp-Vl1-10"(default)接口跟踪的目的是防止数据包被丢弃,由于启用了HSRP,ICMP重定向被禁用。交换机SW1和虚拟路由器都不会发送ICMP重定向,同时交换机SW1的F0/3接口运行不正常,但仍会从接口F0/2向SW3发送hello消息,指出交换机SW1仍为活跃路由器,这种情况下,发送个虚拟路由器去往SW4的数据包将被丢弃。接口跟踪就是防止了这种情况的发生。实验总结:通过这系列实验,熟悉了HSRP的协议,加深了理解。测试了HSRP的接口跟踪过程。完成了对HSRP的学习。有一点遗憾,是由于使用的是模拟器,有部分功能无法测试。比如,再测试HSRP跟踪的时候,应该测试关闭SW4与SW1相连的接口,导致SW1的F0/3接口lineprotocolisdown。但在模拟器中,即使关闭了SW4的F0/3接口,SW1的F0/3接口仍然为up状态。10',)
提供HSRP实验过程及报告会员下载,编号:1700773947,格式为 docx,文件大小为10页,请使用软件:wps,office word 进行编辑,PPT模板中文字,图片,动画效果均可修改,PPT模板下载后图片无水印,更多精品PPT素材下载尽在某某PPT网。所有作品均是用户自行上传分享并拥有版权或使用权,仅供网友学习交流,未经上传用户书面授权,请勿作他用。若您的权利被侵害,请联系963098962@qq.com进行删除处理。