您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 项目/工程管理 > HSRP实验过程及报告
1目录HSRP实验过程及报告.................................................................................................2实验环境:............................................................................................................2实验拓扑:............................................................................................................2实验目的:............................................................................................................2实验过程:............................................................................................................31配置交换机................................................................................................32测试HSRP.................................................................................................53测试HSRP跟踪.........................................................................................8实验总结:..........................................................................................................102HSRP实验过程及报告实验环境:DynamipsGUI模拟器模拟出4台cisco3640三层交换机。两台开启HSRP协议,设备之间使用Ethernetchannel绑定的两条线路互联。其余两台交换机分别连接到这两台交换机。实验拓扑:实验拓扑如图1实验目的:熟悉HSRP协议,验证HSRP网关冗余特性,测试HSRP抢占过程及HSRP接口跟踪。3实验过程: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-channelPo1*Mar101: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-channelPo1*Mar101:24:38.391:%EC-5-BUNDLE:InterfaceFa0/1joinedport-channelPo1SW2(config-if-range)#intport*Mar101:24:40.971:%LINEPROTO-5-UPDOWN:LineprotocolonInterfacePort-channel1,changedstatetoupSW2(config-if-range)#exitSW2(config)#intport-channel1SW2(config-if)#switchportmodetrunk4SW2(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-Standby*Mar103: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)IPredundancynameishsrp-Vl1-10(default)先配置HSRP的为活跃状态,抢占模式,优先级为110(手动配置)。5SW2(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)IPredundancynameishsrp-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,changedstatetoadministrativelydown*Mar104:21:20.066:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceVlan1,changedstatetodownSW1(config-if)#关闭了SW1上的VLAN1,查看交换机SW2上的HSRP情况。SW2#shstan*Mar104:21:06.262:%HSRP-5-STATECHANGE:Vlan1Grp10stateStandby-Active6SW2#shstanVlan1-Group10StateisActive8statechanges,laststatechange00:00:07VirtualIPaddressis192.168.1.100ActivevirtualMACaddressis0000.0c07.ac0aLocalvirtualMACaddressis0000.0c07.ac0a(v1default)Hellotime3sec,holdtime10secNexthellosentin1.828secsPreemptionenabledActiverouterislocalStandbyrouterisunknownPriority100(default100)IPredundancynameishsrp-Vl1-10(default)可以看到SW2的HSRP状态为Active,观察交换机SW3的ping包情况SW3#ping192.168.1.100repeat1000Typeescapesequencetoabort.Send
本文标题:HSRP实验过程及报告
链接地址:https://www.777doc.com/doc-6312857 .html