浙江XX大学计算机网络课程设计
计算机网络课程设计 (2013/2014第二学期-第18周)指导教师:张芳 舒挺班级:姓名:学号:一、目的和要求本课程设计的主要目的是通过实际操作和实验以及编程等,加深对课堂所学知识的理解,提高对网络系统的感性认识,培养动手技能和自学能力。本课程设计通过完成彼此具有独立性又相互联系的几个小实验,能够对网络相关设备和服务器进行安装和配置,对网络设计的概念有个比较完整的认识。二、实验环境本实验主要应用软件来仿真实际的路由网络,选用的软件有选用的软件包括RouterSim CCNA 2、Boson Netsim和RouterSim。三、具体内容1.熟悉实验环境通过参考软件中自带的帮助、参考资料和教师的讲解等,熟悉模拟器操作的常用命令。对配置模式、配置参数的查看、保存、清除等进行了解。2.网络拓扑图的设计熟悉不同网络设备以及相关的接口,如:路由器、交换机、主机,学习利用不同网络设备搭建网络系统。3.网络路由器不同端口的配置学习如何对网络路由器的以太网接口、快速以太网接口、串行接口以及相关参数的配置,以及环回接口、令牌环接口的配置。并且能够对配置结构进行验证。配置路由器的各种网络接口配置Ethernet接口配置路由器A与路由器2621的Ethernet接口,并通过ping来测试!4.静态路由的配置复习路由的概念,学习静态路由的设置,默认路由的设置,以及已有路由的删除。5动态路由的配置复习动态路由协议,深入掌握RIP协议的原理,能够进行动态RIP路由设置,并对设置的结果进行验证,查看。实验1 使用RouterSim CCNA配置路由器的各种网络接口(同时也使用了静态路由配置,使两端主机ping通)1.Switch1900Router Con0 is now availablePress RETURN to get started.PCA Number: 73-3122-04PCA Serial Number: FAB0337240KModel Number: WS-C1912-ASystem Serial Number: FAB0339U01UPower Supply S/N: PHI031803JKPCB Serial Number: FAB0337240K,73-3122-04-1 user(s) now active on Management Console. User Interface Menu M Menus K Command Line I IP ConfigurationEnter Selection: PCA Number: 73-3122-04PCA Serial Number: FAB0337240KModel Number: WS-C1912-ASystem Serial Number: FAB0339U01UPower Supply S/N: PHI031803JKPCB Serial Number: FAB0337240K,73-3122-04-1 user(s) now active on Management Console. User Interface Menu M Menus K Command Line I IP ConfigurationEnter Selection: PCA Number: 73-3122-04PCA Serial Number: FAB0337240KModel Number: WS-C1912-ASystem Serial Number: FAB0339U01UPower Supply S/N: PHI031803JKPCB Serial Number: FAB0337240K,73-3122-04-1 user(s) now active on Management Console. User Interface Menu M Menus K Command Line I IP ConfigurationEnter Selection: CLI session with the switch is open. To end the CLI session, enter Exit.Router>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname switch 1900A1900A(config)#hostname switch1900Aswitch1900A(config)#ip address 172.16.10.3 255.255.255.0switch1900A(config)#ip defalut-gateway 172.16.10.1% Invalid input detected at '' marker.switch1900A(config)#ip default-gateway 172.16.10.1switch1900A(config)#endswitch1900A#1.Router2621(由于第一次做的时候前面命名忘记了,在后面补的命名)Router Con0 is now availablePress RETURN to get started.Router>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface f0/1Router(config-if)#ip address 172.16.10.4 255.255.255.0Router(config-if)#no shut%LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRouter(config)#interface f0/0Router(config-if)#ip address 172.16.11.4 255.255.255.0Router(config-if)#no shut%LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#end%SYS-5-CONFIG_I: Configured from console by consoleRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#ip route 172.16.50.0 255.255.255.0 172.16.11.5(静态)Router(config)#ip route 172.16.40.0 255.255.255.0 172.16.11.5Router(config)#ip route 172.16.20.0 255.255.255.0 172.16.11.5Router(config)#endRouter#copy run startBuilding configuration.OKRouter#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODRGateway of last resort is not set 172.16.0.0/24 is subnetted, 5 subnetsS 172.16.50.0 1/0 via 172.16.11.5S 172.16.40.0 1/0 via 172.16.11.5S 172.16.20.0 1/0 via 172.16.11.5C 172.16.10.0 is directly connected, FastEthernet0/1C 172.16.11.0 is directly connected, FastEthernet0/0Router#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname route2621route2621(config)#endroute2621#1.RouterA(同样补了命名)Router Con0 is now availablePress RETURN to get started.Router>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface e0Router(config-if)#ip address 172.16.11.5 255.255.255.0Router(config-if)#no shut%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up%LINK-3-UPDOWN: Interface Ethernet0, changed state to upRouter(config-if)#exitRouter(config)#interface s0Router(config-if)#ip address 172.16.20.5 255.255.255.0Router(config-if)#no shut%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to upRouter(config-if)#end%SYS-5-CONFIG_I: Configured from console by consoleRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface s0Router(config-if)#encap pppRouter(config-if)#end%SYS-5-CONFIG_I: Configured from console by consoleRouter#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODRGateway of last resort is not set 172.16.0.0/24 is subnetted, 2 subnetsC 172.16.20.0 is directly connected, Serial0C 172.16.11.0 is directly connected, Ethernet0Router#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#ip route 172.16.10.0 255.255.255.0 172.16.11.4(静态)Router(config)#ip route 172.16.50.0 255.255.255.0 172.16.20.6Router(config)#ip route 172.16.40.0 255.255.255.0 172.16.20.6Router(config)#end%SYS-5-CONFIG_I: Configured from console by consoleRouter#copy run startBuilding configuration.OKRouter#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODRGateway of last resort is not set 172.16.0.0/24 is subnetted, 4 subnetsS 172.16.50.0 1/0 via 172.16.20.6S 172.16.10.0 1/0 via 172.16.11.4C 172.16.20.0 is directly connected, Serial0C 172.16.11.0 is directly connected, Ethernet0Router#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname routeArouteA(config)#end%SYS-5-CONFIG_I: Configured from console by consolerouteA#1.RouterBRouter Con0 is now availablePress RETURN to get started.Router>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface s0Router(config-if)#ip address 172.16.20.6 255.255.255.0Router(config-if)#no shut%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to upRouter(config-if)#encap pppRouter(config-if)#clock rate 64000Router(config-if)#end%SYS-5-CONFIG_I: Configured from console by consoleRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface s1Router(config-if)#ip address 172.16.40.6 255.255.255.0Router(config-if)#no shut%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to up%LINK-3-UPDOWN: Interface Serial1, changed state to upRouter(config-if)#encap pppRouter(config-if)#clock rate 64000Router(config-if)#end%SYS-5-CONFIG_I: Configured from console by consoleRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#ip route 172.16.10.0 255.255.255.0 172.16.20.5(静态)Router(config)#ip route 172.16.11.0 255.255.255.0 172.16.20.5Router(config)#ip route 172.16.50.0 255.255.255.0 172.16.40.7Router(config)#end%SYS-5-CONFIG_I: Configured from console by consoleRouter#copy running-config startup-configBuilding configuration.OKRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname routeBrouteB(config)#end%SYS-5-CONFIG_I: Configured from console by consolerouteB#1.RouterCRouter Con0 is now availablePress RETURN to get started.Router>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface s0Router(config-if)#ip address 172.16.40.7 255.255.255.0Router(config-if)#no shut%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to upRouter(config-if)#encap pppRouter(config-if)#exitRouter(config)#interface e0Router(config-if)#ip address 172.16.50.7 255.255.255.0Router(config-if)#no shut%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up%LINK-3-UPDOWN: Interface Ethernet0, changed state to upRouter(config-if)#end%SYS-5-CONFIG_I: Configured from console by consoleRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#ip route 172.16.10.0 255.255.255.0 172.16.40.6(静态)Router(config)#ip route 172.16.11.0 255.255.255.0 172.16.40.6Router(config)#ip route 172.16.20.0 255.255.255.0 172.16.40.6Router(config)#end%SYS-5-CONFIG_I: Configured from console by consoleRouter#copy running-config startup-configBuilding configuration.OKRouter#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODRGateway of last resort is not set 172.16.0.0/24 is subnetted, 4 subnetsS 172.16.20.0 1/0 via 172.16.40.6S 172.16.11.0 1/0 via 172.16.40.6C 172.16.40.0 is directly connected, Serial0C 172.16.50.0 is directly connected, Ethernet0Router#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname routeCrouteC(config)#end%SYS-5-CONFIG_I: Configured from console by consolerouteC#配置好的线路:结果:实验2 使用Boson Netsim和RouterSim模拟了实验一,同时使用动态配置完成,由于基本和上一实验过程相同,所以只留下了动态的过程。2.Router2621router2621(config)#router riprouter2621(config-router)#network 172.16.10.0(动态)router2621(config-router)#network 172.16.11.0router2621(config-router)#endrouter2621#copy run startDestination filename startup-config?Building configuration.OK2.RouterArouterA(config)#router riprouterA(config-router)#network 172.16.11.0(动态)routerA(config-router)#network 172.16.20.0routerA(config-router)#endrouterA#copy run startDestination filename startup-config?Building configuration.OK2.RouterBrouterB(config)#router riprouterB(config-router)#network 172.16.20.0(动态)routerB(config-router)#network 172.16.40.0routerB(config-router)#endrouterB#copy run startDestination filename startup-config?Building configuration.OK2.RouterCrouterC(config)#router riprouterC(config-router)#network 172.16.40.0(动态)routerC(config-router)#network 172.16.50.0routerC(config-router)#endrouterC#copy run startDestination filename startup-config?Building configuration.OK2.Switch1900 CLI session with the switch is open. To end the CLI session, enter Exit.>en#config tEnter configuration commands, one per line. End with CNTL/Z.(config)#hostname switch1900switch1900(config)#ip address 172.16.10.3 255.255.255.0switch1900(config)#ip default-gateway 172.16.10.1switch1900(config)#end2.Host1:Boson BOSS 5.0Copyright 1998-2003 Boson Software, Inc.Use the command help to get startedPress Enter to beginC:>winipcfgC:>ping 172.16.50.2Pinging 172.16.50.2 with 32 bytes of data:Reply from 172.16.50.2: bytes=32 time=60ms TTL=241Reply from 172.16.50.2: bytes=32 time=60ms TTL=241Reply from 172.16.50.2: bytes=32 time=60ms TTL=241Reply from 172.16.50.2: bytes=32 time=60ms TTL=241Reply from 172.16.50.2: bytes=32 time=60ms TTL=241Ping statistics for 172.16.50.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55ms主机配置2.Host2Boson BOSS 5.0Copyright 1998-2003 Boson Software, Inc.Use the command help to get startedPress Enter to beginC:>winipcfgC:>ping 172.16.10.2Pinging 172.16.10.2 with 32 bytes of data:Reply from 172.16.10.2: bytes=32 time=60ms TTL=241Reply from 172.16.10.2: bytes=32 time=60ms TTL=241Reply from 172.16.10.2: bytes=32 time=60ms TTL=241Reply from 172.16.10.2: bytes=32 time=60ms TTL=241Reply from 172.16.10.2: bytes=32 time=60ms TTL=241Ping statistics for 172.16.10.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55ms主机配置:实验3 模拟考试题,对给出的一个网络分子网.使用172.16.10.0的网络分成6个子网,我使用了1111四位来分,16,32,48,64,80,96Router2621Press Enter to StartRouter>Router>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname router2621router2621(config)#interface f0/1router2621(config-if)#ip address 172.16.10.20 255.255.255.240router2621(config-if)#no shut%LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to uprouter2621(config-if)#exitrouter2621(config)#interface f0/0router2621(config-if)#ip address 172.16.10.36 255.255.255.240router2621(config-if)#no shut%LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to uprouter2621(config-if)#endrouter2621#config tEnter configuration commands, one per line. End with CNTL/Z.router2621(config)#router riprouter2621(config-router)#network 172.16.10.16router2621(config-router)#network 172.16.10.32router2621(config-router)#endrouter2621#copy run startDestination filename startup-config?Building configuration.OKRouterAPress Enter to StartRouter>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname routerArouterA(config)#interface e0routerA(config-if)#ip address 172.16.10.37 255.255.255.240routerA(config-if)#no shut%LINK-3-UPDOWN: Interface Ethernet0, changed state to uprouterA(config-if)#exitrouterA(config)#interface s0routerA(config-if)#ip address 172.16.10.53 255.255.255.240routerA(config-if)#no shut%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to downrouterA(config-if)#encap ppprouterA(config-if)#end%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to uprouterA#config tEnter configuration commands, one per line. End with CNTL/Z.routerA(config)#router riprouterA(config-router)#network 172.16.10.32routerA(config-router)#network 172.16.10.48routerA(config-router)#endrouterA#copy run startDestination filename startup-config?Building configuration.OKRouterBPress Enter to StartRouter>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname routerBrouterB(config)#interface s0routerB(config-if)#ip address 172.16.10.54 255.255.255.240routerB(config-if)#no shut%LINK-3-UPDOWN: Interface Serial0, changed state to uprouterB(config-if)#encap ppp%LINK-3-UPDOWN: Interface Serial0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to downrouterB(config-if)#clock rate 64000routerB(config-if)#exit%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to uprouterB(config)#interface s1routerB(config-if)#ip address 172.16.10.70 255.255.255.240routerB(config-if)#no shut%LINK-3-UPDOWN: Interface Serial1, changed state to uprouterB(config-if)#encap ppp%LINK-3-UPDOWN: Interface Serial1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to downrouterB(config-if)#clock rate 64000routerB(config-if)#end%LINK-3-UPDOWN: Interface Serial1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to uprouterB#config tEnter configuration commands, one per line. End with CNTL/Z.routerB(config)#router riprouterB(config-router)#network 172.16.10.48routerB(config-router)#network 172.16.10.64routerB(config-router)#endrouterB#copy run startDestination filename startup-config?Building configuration.OKRouterCPress Enter to StartRouter>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname routerCrouterC(config)#interface s0routerC(config-if)#ip address 172.16.10.71 255.255.255.240routerC(config-if)#no shut%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to downrouterC(config-if)#encap ppp%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to uprouterC(config-if)#exitrouterC(config)#interface s1routerC(config-if)#ip address 172.16.10.87 255.255.255.240routerC(config-if)#no shut%LINK-3-UPDOWN: Interface Serial1, changed state to up%LINK-3-UPDOWN: Interface Serial1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to downrouterC(config-if)#encap ppprouterC(config-if)#clock rate 64000routerC(config-if)#end%LINK-3-UPDOWN: Interface Serial1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to uprouterC#config tEnter configuration commands, one per line. End with CNTL/Z.routerC(config)#router riprouterC(config-router)#network 172.16.10.64routerC(config-router)#network 172.16.10.80routerC(config-router)#endrouterC#copy run startDestination filename startup-config?Building configuration.OKRouterDPress Enter to StartRouter>enRouter#config rt% Invalid input detected at '' marker.Router#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface s0Router(config-if)#ip address 172.16.10.88 255.255.255.240Router(config-if)#no shut%LINK-3