11通信1王帅20110306136组网工程实验报告1实验一交换机、路由器实验一、实验目的:掌握NetSim模拟器的安装配置掌握交换机的工作原理以及交换机各项基本配置。二、实验内容及测试结果:您设计的拓扑图:图1测试结果:1.注销会话,再重新登录交换机,验证控制台密码S1(config-line)#exitS1(config)#exitS1#logoutRoutercon0isnowavailablePressRETURNtogetstarted.Password:Enterpassword:S1enable2.由用户模式进入特权模式,验证特权密码S1(config)#exitS1#exitRoutercon0isnowavailablePressRETURNtogetstarted.Password:11通信1王帅20110306136组网工程实验报告2Enterpassword:S1enableEnterpassword:S1#configt3.用show命令查看配置信息S1(config)#exitS1#showrunning-config!Version12.1servicetimestampsdebuguptimeservicetimestampsloguptimenoservicepassword-encryption!hostnameS1ipname-server0.0.0.0enablesecret5$sdf$6978yhg$jnb76sdenablepasswordabcde!!!ipsubnet-zerospanning-treeextendsystem-id!!!!interfaceFastEthernet0/1!interfaceFastEthernet0/2!11通信1王帅20110306136组网工程实验报告34.用ping命令检查PC1与PC2的连通性,以及PC机与交换机的连通性C:ping192.168.0.11Pinging192.168.0.11with32bytesofdata:Replyfrom192.168.0.11:bytes=32time=60msTTL=241Replyfrom192.168.0.11:bytes=32time=60msTTL=241Replyfrom192.168.0.11:bytes=32time=60msTTL=241Replyfrom192.168.0.11:bytes=32time=60msTTL=241Replyfrom192.168.0.11:bytes=32time=60msTTL=241Pingstatisticsfor192.168.0.11:Packets:Sent=5,Received=5,Lost=0(0%loss),Approximateroundtriptimesinmilli-seconds:Minimum=50ms,Maximum=60ms,Average=55msC:ping192.168.0.22Pinging192.168.0.22with32bytesofdata:Replyfrom192.168.0.22:bytes=32time=60msTTL=241Replyfrom192.168.0.22:bytes=32time=60msTTL=241Replyfrom192.168.0.22:bytes=32time=60msTTL=241Replyfrom192.168.0.22:bytes=32time=60msTTL=241Replyfrom192.168.0.22:bytes=32time=60msTTL=241Pingstatisticsfor192.168.0.22:Packets:Sent=5,Received=5,Lost=0(0%loss),Approximateroundtriptimesinmilli-seconds:Minimum=50ms,Maximum=60ms,Average=55ms5.保存配置文件,重启交换机,查看效果s1#copyrunning-configstartup-configDestinationfilename[startup-config]?Buildingconfiguration...[OK]11通信1王帅20110306136组网工程实验报告4s1enablePassword:Password:Enterpassword:s1#reload##########Simulatedfileinstalled,executing...BosonOperatingSimulationSystemBOSSC2950Software,Version12.1,RELEASESOFTWARECopyright(c)1998-2003byBosonSoftwareBOSSWS-C2950-12emulator(revision5.0)with20815Ksimulatedmemory.Lastresetfromsystem-resetSimulatingEnterpriseImage12FastEthernet/IEEE802.3interface(s)32Kbytesofsimulatednon-volatileconfigurationmemory.SimulatedBaseethernetMACAddress:00:0A:B7:A0:7F:00SimulatedModelnumber:WS-C2950-12三、算法或核心技术思考体会:算法:(1)按图所示连接网络;(2)配置交换机名字为S1;(3)设置交换机的控制台口令为12345;(4)设置交换机的远程登录口令为54321;(5)设置交换机的特权口令为abcde,特权密码为edcba;(6)配置交换机的管理IP为192.168.0.11/24;(7)配置交换机的默认网关为192.168.0.1;(8)配置PC1的IP地址为192.168.0.21/24,默认网关为192.168.0.1;(9)配置PC2的IP地址为192.168.0.22/24,默认网关为192.168.0.1。体会:这次实验使我进一步了解了路由器、交换机的基本工作原理和配置。11通信1王帅20110306136组网工程实验报告5四、附件(源代码)(可选)SwitchenableSwitch#configtEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Switch(config)#hostnames1s1(config)#lineconsole0s1(config-line)#loginlogindisabledonline0untilpasswordisset.s1(config-line)#password12345s1(config-line)#exits1(config)#linevty015s1(config-line)#loginlogindisabledonline0untilpasswordisset.logindisabledonline1untilpasswordisset.logindisabledonline2untilpasswordisset.logindisabledonline3untilpasswordisset.logindisabledonline4untilpasswordisset.logindisabledonline5untilpasswordisset.logindisabledonline6untilpasswordisset.logindisabledonline7untilpasswordisset.logindisabledonline8untilpasswordisset.logindisabledonline9untilpasswordisset.logindisabledonline10untilpasswordisset.logindisabledonline11untilpasswordisset.logindisabledonline12untilpasswordisset.logindisabledonline13untilpasswordisset.logindisabledonline14untilpasswordisset.logindisabledonline15untilpasswordisset.s1(config-line)#password54321s1(config-line)#exit11通信1王帅20110306136组网工程实验报告6s1(config)#enablepasswordabcdes1(config)#enablesecretedcbas1(config)#interfacevlan1s1(config-if)#ipaddress192.168.0.11255.255.255.0s1(config-if)#noshutdown%LINK-3-UPDOWN:InterfaceVlan1,changedstatetoupS1(config-if)#ipdefault-gateway192.168.0.1S1(config)#showrunning-config11通信1王帅20110306136组网工程实验报告7实验二路由器、交换机综合实验一、实验目的:掌握NetSim模拟器的使用掌握复杂情况下路由器、交换机的配置。二、实验内容及测试结果:您设计的拓扑图:图2图3测试结果:1.配置1:(1)注销会话,重新登录路由器,验证控制台密码:R1(config-if)#exitR1(config)#exitR1#exitRoutercon0isnowavailablePressRETURNtogetstarted.Password:Enterpassword:R1enable(2)由用户模式进入特权模式,验证特权密码:R1enableEnterpassword:11通信1王帅20110306136组网工程实验报告8R1#showrunning-config(3)用show命令查看路由器的配置文件、接口状态、路由表:R1#showrunning-configBuildingconfiguration...!Version12.1servicetimestampsdebuguptimeservicetimestampsloguptimenoservicepassword-encryption!hostnameR1enablesecret5$sdf$6978yhg$jnb76sdenablepasswordabcde!!!ipsubnet-zero!!!!interfaceSerial0noipaddressnoipdirected-broadcastshutdownR1#howipinterfacebrief%Invalidinputdetectedat'^'marker.R1#showipinterfacebrief11通信1王帅20110306136组网工程实验报告9InterfaceIP-AddressOK?MethodStatusProtocolSerial0unassignedYESunsetadministrativelydowndownSerial1unassignedYESunsetadministrativelydowndownEthernet0192.168.0.1YESunsetupupEthernet1192.168.1.1YESunsetupup(4)用ping命令检查PC1与PC2的连通性,以及PC机与路由器的连通性PC机与路由器ping:R1#ping192.168.0.11Typeescapesequencetoabort.Sending5,100-byte