计算机网络课程设计-交换机、路由器配置_第1页
计算机网络课程设计-交换机、路由器配置_第2页
计算机网络课程设计-交换机、路由器配置_第3页
计算机网络课程设计-交换机、路由器配置_第4页
计算机网络课程设计-交换机、路由器配置_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

南通大学计算机科学与技术学院计算机网络课程设计报 告 书课 题 名 交换机、路由器配置 班 级_计 091_ 姓 名_ 学 号 指导教师 日 期 2012.1.5 2012.1.9 目录一 设计目的1二 设计内容1三 设计要求1四 实验拓扑2五 设计步骤3六 实验结果12七 设计小结与心得15一、 设计目的1.交换机VLAN划分实验(1) 了解VLAN原理;(2) 熟练掌握二层交换机VLAN的划分方法;(3) 了解如何验证VLAN的划分。2. 跨交换机相同VLAN间通讯(1)了解IEEE802.1q的实现方法,掌握跨二层交换机相同VLAN间通信的调试方法;(2)了解交换机接口的trunk模式和access模式;(3)了解交换机的tagged端口和untagged端口的区别。3. 路由器静态路由的配置(1)掌握静态态路由的配置方法;(2)理解静态路由的工作过程和使用环境4. 单区域OSPF基本配置(1)掌握单区域OSPF的配置(2)理解链路状态路由协议的工作过程(3)掌握实验环境中虚拟接口的配置二、 设计内容 1. 交换机VLAN划分实验2. 跨交换机相同VLAN间通讯3. 路由器静态路由的配置4. 单区域OSPF基本配置三、 设计要求1.交换机VLAN划分实验在交换机上划分两个基于端口的VLAN:VLAN100,VLAN200。VLAN 端口成员 10018200916使得VLAN100的成员能够互相访问,VLAN200的成员能够互相访问;VLAN100和VLAN200成员之间不能互相访问。PC1和PC2的网络设置为:设备IP地址Mask交换机A 192.168.1.11 255.255.255.0 PC1 192.168.1.101 255.255.255.0 PC2 192.168.1.102 255.255.255.0 PC1、PC2接在VLAN100的成员端口18上,两台PC互相可以ping通;PC1、PC2接在VLAN的成员端口916上,两台PC互相可以ping通;PC1接在VLAN100的成员端口18上,PC2接在VLAN200的成员端口916上,则互相ping不通。若实验结果和理论相符,则本实验完成。2. 跨交换机相同VLAN间通讯在交换机A和交换机B上分别划分两个基于端口的VLAN:VLAN100,VLAN200。1VLAN 端口成员 10018200916Trunk口24使得交换机之间VLAN100的成员能够互相访问,VLAN200的成员能够互相访问;VLAN100和VLAN200成员之间不能互相访问。PC1和PC2的网络设置为:设备IP地址Mask交换机A 192.168.1.11 255.255.255.0 交换机B192.168.1.12255.255.255.0PC1 192.168.1.101 255.255.255.0 PC2 192.168.1.102 255.255.255.0 PC1、PC2分别接在不同交换机VLAN100的成员端口18上,两台PC互相可以ping通;PC1、PC2分别接在不同交换机VLAN的成员端口916上,两台PC互相可以ping通;PC1和PC2接在不同VLAN的成员端口上则互相ping不通。若实验结果和理论相符,则本实验完成。3. 路由器静态路由的配置配置表Router-ARouter-BRouter-CS1/1(DCE)192.168.1.1S/1/0(DTE)192.168.1.2F0/0192.168.2.2F0/0192.168.0.1F0/0192.168.2.1E1/0192.168.3.14. 单区域OSPF基本配置ROUTER-AROUTER-BS1/1192.168.1.1/24S1/0192.168.1.2/24Loopback010.10.10.1/24Loopback010.10.11.1/24四、 实验拓扑1. 交换机VLAN划分实验2. 跨交换机相同VLAN间通讯23. 路由器静态路由的配置4. 单区域OSPF基本配置五、 设计步骤1. 交换机VLAN划分实验第一步:交换机恢复出厂设置switch#set default switch#write switch#reload 3第二步:给交换机设置IP地址即管理IP。switch#config switch(Config)#interface vlan 1 switch(Config-If-Vlan1)#ip address 192.168.1.11 255.255.255.0 switch(Config-If-Vlan1)#no shutdown switch(Config-If-Vlan1)#exit switch(Config)#exit 第三步:创建vlan100和vlan200。switch(Config)#switch(Config)#vlan 100switch(Config-Vlan100)#exitswitch(Config)#vlan 200switch(Config-Vlan200)#exitswitch(Config)#验证配置:switch#show vlanVLAN Name Type Media Ports- - - - -1 default Static ENET Ethernet0/0/1 Ethernet0/0/2 Ethernet0/0/3 Ethernet0/0/4 Ethernet0/0/5 Ethernet0/0/6 Ethernet0/0/7 Ethernet0/0/8 Ethernet0/0/9 Ethernet0/0/10 Ethernet0/0/11 Ethernet0/0/12 Ethernet0/0/13 Ethernet0/0/14 Ethernet0/0/15 Ethernet0/0/16 Ethernet0/0/17 Ethernet0/0/18 Ethernet0/0/19 Ethernet0/0/20 Ethernet0/0/21 Ethernet0/0/22 Ethernet0/0/23 Ethernet0/0/24100 VLAN0100 Static ENET !已经创建了vlan100,vlan100中没有端口;200 VLAN0200 Static ENET !已经创建了vlan200,vlan200中没有端口;第四步:给vlan100和vlan200添加端口。switch(Config)#vlan 100 !进入vlan 100switch(Config-Vlan100)#switchport interface ethernet 0/0/1-8 !给vlan100加入端口1-8Set the port Ethernet0/0/1 access vlan 100 successfullySet the port Ethernet0/0/2 access vlan 100 successfullySet the port Ethernet0/0/3 access vlan 100 successfullySet the port Ethernet0/0/4 access vlan 100 successfullySet the port Ethernet0/0/5 access vlan 100 successfullySet the port Ethernet0/0/6 access vlan 100 successfullySet the port Ethernet0/0/7 access vlan 100 successfullySet the port Ethernet0/0/8 access vlan 100 successfullyswitch(Config-Vlan100)#exitswitch(Config)#vlan 200 !进入vlan 200switch(Config-Vlan200)#switchport interface ethernet 0/0/9-16!给vlan200加入端口9-16Set the port Ethernet0/0/9 access vlan 200 successfully4Set the port Ethernet0/0/10 access vlan 200 successfullySet the port Ethernet0/0/11 access vlan 200 successfullySet the port Ethernet0/0/12 access vlan 200 successfullySet the port Ethernet0/0/13 access vlan 200 successfullySet the port Ethernet0/0/14 access vlan 200 successfullySet the port Ethernet0/0/15 access vlan 200 successfullySet the port Ethernet0/0/16 access vlan 200 successfullyswitch(Config-Vlan200)#exit验证配置:switch#show vlanVLAN Name Type Media Ports- - - - -1 default Static ENET Ethernet0/0/17 Ethernet0/0/18 Ethernet0/0/19 Ethernet0/0/20 Ethernet0/0/21 Ethernet0/0/22 Ethernet0/0/23 Ethernet0/0/24100 VLAN0100 Static ENET Ethernet0/0/1 Ethernet0/0/2 Ethernet0/0/3 Ethernet0/0/4 Ethernet0/0/5 Ethernet0/0/6 Ethernet0/0/7 Ethernet0/0/8200 VLAN0200 Static ENET Ethernet0/0/9 Ethernet0/0/10 Ethernet0/0/11 Ethernet0/0/12 Ethernet0/0/13 Ethernet0/0/14 Ethernet0/0/15 Ethernet0/0/16第五步:验证实验。PC1位置PC2位置动作结果1-8端口PC1 ping 192.168.1.11不通9-16端口PC1 ping 192.168.1.11不通17-24端口PC1 ping 192.168.1.11通1-8端口1-8端口PC1 ping PC2通1-8端口9-16端口PC1 ping PC2不通1-8端口17-24端口PC1 ping PC2不通2. 跨交换机相同VLAN间通讯第一步:交换机恢复出厂设置switch#set default switch#write switch#reload 第二步:给交换机设置标示符和管理IP。交换机A:switch(Config)#hostname switchAswitchA(Config)#interface vlan 1switchA(Config-If-Vlan1)#ip address 192.168.1.11 255.255.255.0switchA(Config-If-Vlan1)#no shutdownswitchA(Config-If-Vlan1)#exitswitchA(Config)#5交换机B:switch(Config)#hostname switchBswitchB(Config)#interface vlan 1switchB(Config-If-Vlan1)#ip address 192.168.1.12 255.255.255.0switchB(Config-If-Vlan1)#no shutdownswitchB(Config-If-Vlan1)#exitswitchB(Config)#第三步:在交换机中创建vlan100和vlan200,并添加端口。交换机A:switchA(Config)#vlan 100switchA(Config-Vlan100)#switchA(Config-Vlan100)#switchport interface ethernet 0/0/1-8switchA(Config-Vlan100)#exitswitchA(Config)#vlan 200switchA(Config-Vlan200)#switchport interface ethernet 0/0/9-16switchA(Config-Vlan200)#exitswitchA(Config)#验证配置:switchA#show vlanVLAN Name Type Media Ports- - - - -1 default Static ENET Ethernet0/0/17 Ethernet0/0/18 Ethernet0/0/19 Ethernet0/0/20 Ethernet0/0/21 Ethernet0/0/22 Ethernet0/0/23 Ethernet0/0/24100 VLAN0100 Static ENET Ethernet0/0/1 Ethernet0/0/2 Ethernet0/0/3 Ethernet0/0/4 Ethernet0/0/5 Ethernet0/0/6 Ethernet0/0/7 Ethernet0/0/8200 VLAN0200 Static ENET Ethernet0/0/9 Ethernet0/0/10 Ethernet0/0/11 Ethernet0/0/12 Ethernet0/0/13 Ethernet0/0/14 Ethernet0/0/15 Ethernet0/0/16switchA#交换机B:配置与交换机A一样。第四步:设置交换机trunk端口交换机A:switchA(Config)#interface ethernet 0/0/24switchA(Config-Ethernet0/0/24)#switchport mode trunkSet the port Ethernet0/0/24 mode TRUNK successfullyswitchA(Config-Ethernet0/0/24)#switchport trunk allowed vlan allset the port Ethernet0/0/24 allowed vlan successfullyswitchA(Config-Ethernet0/0/24)#exitswitchA(Config)#6验证配置:switchA#show vlanVLAN Name Type Media Ports- - - - -1 default Static ENET Ethernet0/0/17 Ethernet0/0/18 Ethernet0/0/19 Ethernet0/0/20 Ethernet0/0/21 Ethernet0/0/22 Ethernet0/0/23 Ethernet0/0/24(T)100 VLAN0100 Static ENET Ethernet0/0/1 Ethernet0/0/2 Ethernet0/0/3 Ethernet0/0/4 Ethernet0/0/5 Ethernet0/0/6 Ethernet0/0/7 Ethernet0/0/8 Ethernet0/0/24(T)200 VLAN0200 Static ENET Ethernet0/0/9 Ethernet0/0/10 Ethernet0/0/11 Ethernet0/0/12 Ethernet0/0/13 Ethernet0/0/14 Ethernet0/0/15 Ethernet0/0/16 Ethernet0/0/24(T)switchA#24口已经出现在vlan1、vlan100和vlan200中,并且24口不是一个普通端口,是tagged端口。交换机B:配置同交换机A第五步:验证实验。交换机Aping交换机B:switchA#ping 192.168.1.12Type c to abort.Sending 5 56-byte ICMP Echos to 192.168.1.12, timeout is 2 seconds.!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 msswitchA#表明交换机之前的trunk链路已经成功建立。按下表验证,PC1插在交换机A上,PC2插在交换机B上:PC1位置PC2位置动作结果1-8端口PC1 ping 交换机B不通9-16端口PC1 ping交换机B不通17-24端口PC1 ping交换机B通1-8端口1-8端口PC1 ping PC2通1-8端口9-16端口PC1 ping PC2不通3.路由器静态路由的配置第一步:参照实验三,按照上表配置所有接口的IP地址,保证所有接口全部是up状态,测试连通性第二步:查看ROUTER-A的路由表Router-A#show ip route7Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2 OE1 - OSPF external type 1, OE2 - OSPF external type 2 DHCP - DHCP typeVRF ID: 0C 192.168.0.0/24 is directly connected, FastEthernet0/0!直连的路由C 192.168.1.0/24 is directly connected, Serial1/1!直连的路由第三步:查看ROUTER-B的路由表Router-B#show ip routeCodes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2 OE1 - OSPF external type 1, OE2 - OSPF external type 2 DHCP - DHCP typeVRF ID: 0C 192.168.1.0/24 is directly connected, Serial1/0C 192.168.2.0/24 is directly connected, FastEthernet0/0第四步:查看ROUTER-C的路由表Router-B#show ip routeCodes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2 OE1 - OSPF external type 1, OE2 - OSPF external type 2 DHCP - DHCP typeVRF ID: 0C 192.168.1.0/24 is directly connected, Serial1/0C 192.168.2.0/24 is directly connected, FastEthernet0/0第五步:在ROUTER-A上PING 路由器CRouter-A#ping 192.168.2.2PING 192.168.2.2 (192.168.2.2): 56 data bytes.- 192.168.2.2 ping statistics -5 packets transmitted, 0 packets received, 100% packet loss!不通第六步:在路由器A上配置并查看路由表Router-A_config#ip router 192.168.2.0 255.255.255.0 192.168.1.2!配置192.168.2.0 的路由Router-A_config#ip router 192.168.3.0 255.255.255.0 192.168.1.2!配置192.168.3.0 的路由Router-A#sh ip routeCodes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2 OE1 - OSPF external type 1, OE2 - OSPF external type 2 DHCP - DHCP type8VRF ID: 0S 192.168.2.0/24 1,0 via 192.168.1.2S 192.168.3.0/24 1,0 via 192.168.1.2C 192.168.0.0/24 is directly connected, FastEthernet0/0C 192.168.1.0/24 is directly connected, Serial1/1注意到出现刚才配置的静态路由。第七步:在路由器B上配置并查看路由表Router-B_config#ip router 192.168.0.0 255.255.255.0 192.168.1.1Router-B_config#ip router 192.168.3.0 255.255.255.0 192.168.2.2Router-B#2004-1-1 00:15:58 Configured from console 0 by DEFAULTRouter-B#show ip routeCodes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2 OE1 - OSPF external type 1, OE2 - OSPF external type 2 DHCP - DHCP typeVRF ID: 0S 192.168.0.0/24 1,0 via 192.168.1.1S 192.168.3.0/24 1,0 via 192.168.2.2C 192.168.1.0/24 is directly connected, Serial1/0C 192.168.2.0/24 is directly connected, FastEthernet0/0第八步:在路由器C上配置并查看路由表Router-C_config# ip router 192.168.0.0 255.255.255.0 192.168.2.1Router-C_config# ip router 192.168.1.0 255.255.255.0 192.168.2.1Router-C_config_rip#ZRouter-C#show ip routeCodes: C - connected, S - static, R - RIP, B - BGP D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2 OE1 - OSPF external type 1, OE2 - OSPF external type 2S 192.168.0.0/24 1,0 via 192.168.2.1S 192.168.1.0/24 1,0 via 192.168.2.1C 192.168.2.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, Ethernet1/04. 单区域OSPF基本配置第一步:路由器环回接口的配置(其他接口配置请参见实验三)路由器A:Router-A_config#interface loopback0Router-A_config_l0#ip address 10.10.10.1 255.255.255.0路由器B:Router-B#configRouter-B_config#interface loopback0Router-B_config_l0#ip address 10.10.11.1 255.255.255.0第二步:验证接口配置Router-B#sh interface loopback0Loopback0 is up, line protocol is up Hardware is Loopback Interface address is 10.10.11.1/24 MTU 1514 bytes, BW 8000000 kbit, DLY 500 usec9 Encapsulation LOOPBACK第三步:路由器的OSPF配置A的配置:Router-A_config#router ospf 2!启动OSPF进程,进程号为2Router-A_config_ospf_1#network 10.10.10.0 255.255.255.0 area 0!注意要写掩码和区域号Router-A_config_ospf_1#network 192.168.1.0 255.255.255.0 area 0B的配置:Router-B_config#router ospf 1Router-B_config_ospf_1#network 10.10.11.0 255.255.255.0 area 0Router-B_config_ospf_1#network 192.168.1.0 255.255.255.0 area 0第四步:查看路由表路由器A:Router-A#sh ip routeCodes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2 OE1 - OSPF external type 1, OE2 - OSPF external type 2 DHCP - DHCP typeVRF ID: 0C 10.10.10.0/24 is directly connected, Loopback0O 10.10.11.1/32 110,1600 via 192.168.1.2(on Serial1/1)!注意到环回接口产生的是主机路由C 192.168.1.0/24 is directly connected, Serial1/1路由器B:Router-B#show ip routeCodes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2 OE1 - OSPF external type 1, OE2 - OSPF external type 2 DHCP - DHCP typeVRF ID: 0O 10.10.10.1/32 110,1601 via 192.168.1.1(on Serial1/0)!注意管理距离为110C 10.10.11.0/24 is directly connected, Loopback0C 192.168.1.0/24 is directly connected, Serial1/0第五步:其他验证命令Router-B#sh ip ospf 1!显示该OSPF进程的信息OSPF process: 1, Router ID: 192.168.2.1Distance: intra-area 110, inter-area 110, external 150 SPF schedule delay 5 secs, Hold time between two SPFs 10 secsSPFTV:11(1), TOs:24, SCHDs:27All Rtrs support Demand-Circuit.Number of areas is 1 AREA: 0 Number of interface in this area is 2(UP: 3) Area authentication type: None All Rtrs in this area support Demand-Circuit.10Router-A#show ip ospf interace!显示OSPF接口状态和类型Serial1/1 is up, line protocol is up Internet Address: 192.168.1.1/24 Nettype: Point-to-Point OSPF process is 2, AREA: 0, Router ID: 192.168.1.1 Cost: 1600, Transmit Delay is 1 sec, Priority 1 Hello interval is 10, Dead timer is 40, Retransmit is 5 OSPF INTF State is IPOINT_TO_POINT Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 192.168.1.2Loopback0 is up, line protocol is up Internet Address: 10.10.10.1/24 Nettype: Broadcast !环回接口的网络类型默认为广播 OSPF process is 2, AREA: 0, Router ID: 192.168.1.1 Cost: 1, Transmit Delay is 1 sec, Priority 1 Hello interval is 10, Dead timer is 40, Retransmit is 5 OSPF INTF State is ILOOPBACK Neighbor Count is 0, Adjacent neighbor count

温馨提示

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

评论

0/150

提交评论