组网技术—路由器及交换机的配置实验.doc_第1页
组网技术—路由器及交换机的配置实验.doc_第2页
组网技术—路由器及交换机的配置实验.doc_第3页
组网技术—路由器及交换机的配置实验.doc_第4页
组网技术—路由器及交换机的配置实验.doc_第5页
已阅读5页,还剩34页未读 继续免费阅读

下载本文档

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

文档简介

组网技术实验实验一:路由器基本配置一、 实验目的: 1.掌握boson netsim的安装和使用方法; 2.学习用boson netsim制作网络拓扑;3.掌握路由器的基本配置方法。二、 实验要求: 掌握模拟器boson netsim的基本用法,能亲自用“boson network designer”设计一个网络结构;能对路由器进行基本的配置;配置直连路由。三、 实验内容:1.安装 boson netsim 安装boson netsim之前,要保证该机中已经安装了adobe acrobat程序(查看pdf文件的程序)。(1).下载boson.network.simulator.7.for.ccnp并解压,双击ccnp_netsim7.exe程序开始安装。安装过程都选择默认即可。 (2). 安装完成后,把crack文件夹下的mscon43demo.dll放到c:documents and settingsall usersapplication databoson softwareboson netsim for ccnp 7.0下。可以把“c:documents and settingsall usersapplication databoson softwareboson netsim for ccnp 7.0”复制到地址栏中,然后把mscon43demo.dll替换原来的mscon43demo.dll文件。安装完之后,桌面上出现了两个图标boson network designer 7.0和boson netsim for ccnp 7.0。(3)启动boson netsim for ccnp 7.0时,会弹出对话框 选择“use demo version”进入。boson network designer 7.0和boson netsim for ccnp 7.0的具体使用方法可以参考“boson netsim入门进阶i.pdf”或者是 “netsim使用方法”2、boson的应用 使用boson network designer 7.0绘制下列拓扑图,路由器使用具有两个ethernet接口的800系列的806路由器,再添加两个win 98的pc机。把他们通过ethernet端口连接起来。然后把该拓扑图保存起来。打开boson netsim for ccnp 7.0,把保存的拓扑图导入进来(也可以选择boson network designer 7.0中的file下的load netmap into the simulator)。然后到路由器的配置模式下,熟悉讲义中的各个配置模式和路由器的命令。配置pc机。用工具栏中的“estations”按钮切换到pc1,使用winipcfg(或使用简化命令w)来配置pc机的相关信息。pc机的网关要设置成与它相连的路由器接口的ip地址。3.配置直连路由熟悉以上的过程之后,在此拓扑图上配置直连路由(具体过程详见课件)。实验二:模拟静态路由、默认路由实验一、 实验目的: 1.掌握静态路由和默认路由的配置方法; 2.理解静态路由和默认路由的意义和特点。二、 实验要求: 利用静态路由、默认路由实现不同子网的通信。三、 实验内容: 基本概念路由器在没有配置路由时,只能实现与它直连的网络间的通信,为了实现在更大范围的网络间通信,需要进行路由配置,路由包括静态路由、默认路由和动态路由几类。(1)、静态路由是一种由网管手工配置的路由路径,网管必需了解路由器的拓扑连接,通过手工方式指定路由路径,而且在网络拓扑发生变动时,也需要网管手工修改路由路径。(2)、默认路由也是一种由网管手工配置的路由路径,它使路由器把所有地址不能识别的数据包通过指定的路径发送出去,由其它路由器进行处理。默认路由可看作是静态路由的特例,而且维护代价较低。(3)、动态路由是一种通过某种路由协议,由路由器自学习到的路由,它不需要手工配置,而且可自动随着网络环境的变化而变化,维护代价很低,特别适合大范围的路由。关键命令 本实验的关键命令:模式命令功能(config)#ip route address subnet-mask address设置静态路由(config)#no ip route address subnet-mask address删除静态路由(config)#ip route address设置默认路由(config)#no ip route address删除默认路由#show ip route 查看路由表#show ip interface brief查看端口简表表1如:图1网络/24连接在路由器r2上,如果路由器r1收到了发往该网络的数据包,它应该把它送往r2,也即r2的端口,这可以在r1上配置如下静态路由:ip route 该命令告诉r1,遇到目的网络为/24的数据包,就发送到。注意:在命令中前一个地址是个网络地址,其中的主机部分都写为0,它代表的是某个网络,而不是某台具体的设备。如果写成了某个主机的ip地址,则成了配置特定主机路由。另外也可以在r1上配置默认路由:ip route 该命令是告诉r1,遇到目的地址无法识别的数据包就发送到。以上两种只需配置一种就可以使路由器r1能与/24网络进行通信。2、配置静态路由(两个实验)静态路由实验1:按下图所示制作网络拓扑,路由器的型号自行选择(推荐805路由器),利用静态路由实现各网络间的通信。(假设r1的s0端口为dce端)router1的配置:routerrouterenrouter#conf trouter(config)#hostname router1router1(config)#interface e0router1(config-if)#ip address router1(config-if)#no shutrouter1(config-if)#interface s0router1(config-if)#ip address router1(config-if)#clock rate 6400 /假设在设计拓扑图是定义router1的serial 0端口为dce端。router1(config-if)#no shutrouter1(config-if)#endrouter1#config trouter1(config)#ip route /设定静态路由router1(config)#endrouter2的配置:routerenrouter#conf trouter#config trouter(config)#hostname router2router2(config)#interface s0router2(config-if)#ip address router2(config-if)#no shutrouter2(config-if)#interface e0router2(config-if)#ip address router2(config-if)#no shutrouter2(config-if)#endrouter2#config trouter2(config)#ip route router2(config)#endrouter2#ping /测试连通性router2#ping pc1的配置如下:c:ipconfig /ip /设置ip地址和子网掩码,或者输入“w”,按回车,也可以输入地址、子网掩码和网关。c:ipconfig /dg /指定网关为与本机直连的router1的e0口pc2 的配置如下:c:ipconfig /ip c:ipconfig /dg /把ip和网关设好c:ping c:ping c:ping c:ping c:ping 在各个路由器的特权模式下运行show ip route查看路由表。静态路由实验2:按图2所示制作网络拓扑,路由器的型号自行选择(推荐r1选择1005路由器,r2选择1601路由器,其广域网接口选择1个serial,r3选择1605路由器,广域网接口选择1个serial接口),dce端请自行定义(这里我们把r1的s0接口和r2的s1接口定义为dce端),利用静态路由实现各网络间的通信。图2提示:在图2的拓扑中共有6个网络:/16、/16、/24、/24、/24、/24,各路由器除了直连的网络外,其余的都由静态路由实现。一定要注意在dce端配置同步时钟。结果分析:配置完成后,用ping命令检查,所有pc机之间都是可以连通的,查看各路由器的路由表,应能看到所有6个网络。附:(1)r1的静态路由配置router router enrouter# conrouter(config)# hostname r1r1(config)# interface s0r1(config-if)# ip address r1(config-if)# no shutdown r1(config-if)# clock rate 64000 r1(config-if)# interface e0r1(config-if)# ip address r1(config-if)# no shutdown r1(config-if)# exitr1(config)# ip route r1(config)# ip route r1(config)# ip route r1(config)# ip route r1(config)# end查看r1的路由表:r1# show ip route c is directly connected, ethernet0s 1/0 via c is directly connected, serial0s 1/0 via s 1/0 via s 1/0 via (2)r2的静态路由配置routerrouter enrouter# conrouter(config)# hostname r2r2 (config)# interface s0r2 (config-if)# ip address r2(config-if)# no shutdown r2 (config-if)# exitr2 (config)# interface s1r2 (config-if)# ip address r2(config-if)# no shutdown r2 (config-if)# clock rate 64000 r2(config-if)# exitr2 (config)# interface e0r2(config-if)# ip address r2 (config-if)# no shutdown r2 (config-if)# exitr2 (config)# ip route r2r(config)# ip route r2 (config)# ip route r2(config)# end(2)r2的静态路由配置r2# show ip route c is directly connected, serial0s 1/0 via s 1/0 via s 1/0 via c is directly connected, ethernet0c is directly connected, serial1(3)r3的静态路由配置routerrouter enrouter# conrouter(config)# hostname r3r3(config)# interface s0r3(config-if)# ip address r3(config-if)# no shutdown r3(config-if)# exitr3(config)# interface e0r3(config-if)# ip address r3 (config-if)# no shutdown r3 (config-if)# interface e1r3(config-if)# ip address r3(config-if)# no shutdown r3(config-if)# exitr3(config)# ip route r3(config)# ip route r3(config)# ip route r3(config)# endr3# show ip route c is directly connected, serial0c is directly connected, ethernet0c is directly connected, ethernet1s 1/0 via s 1/0 via s 1/0 via pc机的配置略,但要注意pc1的网关为pc2的网关为pc3的网关为pc4的网关为3、默认路由的配置默认路由实验1:r1的配置:routerrouterenrouter#conf trouter(config)#hostname router1router1(config)#interface e0router1(config-if)#ip address router1(config-if)#no shutrouter1(config-if)#interface s0router1(config-if)#ip address router1(config-if)#clock rate 64000 /假定router1的s0端为dce端,也可以直接输入clock rate 64,按回车,配置的同步时钟也为64000。router1(config-if)#no shutrouter1(config-if)#exitrouter1(config)#ip route router1(config-if)#exitrouter1(config)#exitr2 的配置:routerenrouter#conf trouter(config)#hostname router2router2 (config)#interface s0router2 (config-if)#ip address router2 (config-if)#no shutrouter2 (config-if)#interface e0router2 (config-if)#ip address router2 (config-if)#no shutrouter2 (config-if)#exitrouter2 (config)#ip route router2 (config)#exitrouter2#ping /先试ping下路由 pc1的配置:c:ipconfig /ip c:ipconfig /dg pc2的配置:c:ipconfig /ip c:ipconfig /dg c:ping /开始检测c:ping c:ping c:ping 在各个路由器的特权模式下运行show ip route查看路由表。默认路由实验2:拓扑图仍使用静态路由实验2的拓扑图:路由器各个端口的配置同静态路由完全相同,在此省略,只写出默认路由配置部分取代静态路由的配置部分。r1的默认路由配置:r1(config)# ip route r2 与多个路由器相连,不适合配置默认路由,仍可使用静态路由。或者使用以下方法(不推荐)r2 (config)# ip route r2r(config)# ip route r3的默认路由配置:r3(config)# ip route 实验三 动态路由选择协议的配置一、 实验目的: 1. 掌握rip协议的基本配置;2掌握ospf(开放最短路经优生)协议的基本配置3掌握igrp协议的基本配置二、 实验要求: 通过对路由协议的配置进一步了解路由器的工作方式及路由器在网络中的地位。三、 实验内容:(1)rip协议的配置通过对rip路由选择协议的配置,实现全网的连通;查看路由表并理解相关字段含义。router1的配置:routerrouterenrouter#conf trouter(config)#interface e0router(config-if)#ip address router(config-if)#no shutrouter(config-if)#interface s0router(config-if)#ip address router(config-if)#clock rate 64000router(config-if)#no shutrouter(config-if)#exitrouter(config)#router riprouter(config-router)#network router(config-router)#network router(config-router)#exitrouter2 的配置:routerrouterenrouter#conf trouter(config)#interface s0router(config-if)#ip address router(config-if)#no shutrouter(config-if)#exitrouter(config)#interface e0router(config-if)#ip address router(config-if)#no shutrouter(config-if)#exitrouter(config)#router riprouter(config-router)#network router(config-router)#network router(config-router)#exitpc1的配置:c:ipconfig /ip c:ipconfig /dg pc2的配置:c:ipconfig ip c:ipconfig dg c:ping c:tracert 在路由器上执行show ip route,查看路由表,理解各个字段的含义。(2)igrp协议的配置通过对igrp路由选择协议的配置,实现全网的连通;查看路由表并理解相关字段含义。router1的配置:routerrouterenrouter#conf trouter(config)#interface e0router(config-if)#ip address router(config-if)#no shutrouter(config-if)#interface s0router(config-if)#ip address router(config-if)#clock rate 64000router(config-if)#no shutrouter(config-if)#exitrouter(config)#router igrp 100router(config-router)#network router(config-router)#network router(config-router)#exitrouter2 的配置:routerrouterenrouter#conf trouter(config)#interface s0router(config-if)#ip address router(config-if)#no shutrouter(config-if)#exitrouter(config)#interface e0router(config-if)#ip address router(config-if)#no shutrouter(config-if)#exitrouter(config)#router igrp 100router(config-router)#network router(config-router)#network router(config-router)#exitpc1的配置:c:ipconfig /ip c:ipconfig /dg pc2的配置:c:ipconfig ip c:ipconfig dg c:ping c:tracert 在路由器上执行show ip route,查看路由表,理解各个字段的含义。(3)ospf协议的配置通过对ospf路由选择协议的配置,实现全网的连通;查看路由表并理解相关字段含义。router1的配置:routerrouterenrouter#conf trouter(config)#interface e0router(config-if)#ip address router(config-if)#no shutrouter(config-if)#interface s0router(config-if)#ip address router(config-if)#clock rate 64000router(config-if)#no shutrouter(config-if)#exitrouter(config)#router ospf 1router(config-router)#network 55 area 0router(config-router)#network 55 area 0router(config-router)#exitrouter2 的配置:routerrouterenrouter#conf trouter(config)#interface s0router(config-if)#ip address router(config-if)#no shutrouter(config-if)#exitrouter(config)#interface e0router(config-if)#ip address router(config-if)#no shutrouter(config-if)#exitrouter(config)#router ospf 2router(config-router)#network 55 area 0router(config-router)#network 55 area 0router(config-router)#exitpc1的配置:c:ipconfig /ip c:ipconfig /dg pc2的配置:c:ipconfig ip c:ipconfig dg c:ping c:tracert 在路由器上执行show ip route,查看路由表,理解各个字段的含义。(4) 按下面的拓扑图,在路由器上首先配置rip协议,查看路由表,测试主机之间的连通性,接着配置igrp协议,查看路由表的变化。再取消igrp协议(在路由器上分别使用no router igrp 自治系统号),再查看路由表的变换。具体配置步骤略。实验四:交换机划分vlan一实验目的:理解vlan的用途,掌握vlan的端口配置方法;掌握多交换机的trunk配置方法。理解单臂路由的配置方法.二、实验内容:(1)在单交换机上配置vlan方法一:采用1912交换机(config)# vlan 2 name vlan2 (config)# vlan 3 name vlan3 (config)# interface e 0/6(config-if)# vlan-membership static 2(config-if)# interface e 0/7(config-if)# vlan-membership static 2(config-if)# interface e 0/8(config-if)# vlan-membership static 2 (config-if)# interface e 0/9(config-if)# vlan-membership static 3(config-if)# interface e 0/10(config-if)# vlan-membership static 3(config-if)# interface e 0/11(config-if)# vlan-membership static 3(config-if)# interface e 0/12(config-if)# vlan-membership static 3所有未分配的端口属于vlan1。定义完成后,退回到特权模式,可以用show vlan-membership命令或者show run命令查看vlan的配置情况。 方法二:交换机上的配置(采用2950或3550交换机)switch# vlan databaseswitch(vlan)# vlan 2 name vlan2switch(vlan)# vlan 3 name vlan3switch(vlan)# exitswitch# con tswitch(config)# interface f 0/6switch(config-if)# switchport access vlan 2switch(config-if)# interface f 0/7switch(config-if)# switchport access vlan 2switch(config-if)# interface f 0/8switch(config-if)# switchport access vlan 2switch(config-if)# interface f 0/9switch(config-if)# switchport access vlan 3switch(config-if)# interface f 0/10switch(config-if)# switchport access vlan 3switch(config-if)# interface f 0/11switch(config-if)# switchport access vlan 3switch(config-if)# interface f 0/12switch(config-if)# switchport access vlan 3(二)在多交换机上配置vlan方法一:直接配置switch1上的配置(采用2950交换机)switch# vlan databaseswitch(vlan)# vlan 10 name vlan10switch(vlan)# vlan 20 name vlan20 switch(vlan)# exitswitch# con tswitch(config)# interface f 0/1switch(config-if)# switchport access vlan 10switch(config-if)# interface f 0/2switch(config-if)# switchport access vlan 20switch(config-if)# interface f 0/12switch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation dot1q switch2上的配置(采用2950交换机)switch# con tswitch(config)# interface f 0/1switch(config-if)# switchport access vlan 10switch(config-if)# interface f 0/2switch(config-if)# switchport access vlan 20switch(config-if)# interface f 0/12switch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation dot1q方法二:使用vtp协议switch1上的配置(采用2950交换机)switch# vlan databaseswitch(vlan)# vlan 10 name vlan10switch(vlan)# vlan 20 name vlan20switch(vlan)# vtp serverswitch(vlan)# vtp domain ciscoswitch(vlan)# vtp password 111(这里密码不起作用) switch(vlan)# exitswitch# config terminalswitch(config)# interface f 0/1switch(config-if)# switchport access vlan 10switch(config-if)# interface f 0/2switch(config-if)# switchport access vlan 20switch(config-if)# interface f 0/12switch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation dot1qswitch2上的配置(采用2950交换机)switch# config terminalswitch(config)# vtp mode clientswitch(config)# vtp domain ciscoswitch(config)# interface f 0/1switch(config-if)# switchport access vlan 10switch(config-if)# interface f 0/2switch(config-if)# switchport access vlan 20switch(config-if)# interface f 0/12switch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation dot1q(三)配置vlan间路由如图: pc1和pc2分别属于vlan10和vlan20。s2950是一个cisco的二层交换机2950,欲实现vlan10和vlan20的通信,可以再额外增加一个路由器来路由vlan之间的数据包。配置步骤:1、交换机配置简单起见,在交换机s2950上新增两个vlan:10和20,pc1位于vlan 10,pc2位于vlan 20,各接口的连接情况如图所示。具体配置如下:2、路由器配置 单臂路由关键配置在于为端口f0/0新增两个子端口分别作为vlan 10和vlan 20的网关,同时启用802.1q协议。由于子端口是同一个端口的逻辑端口,相当于彼此直连,因此不用添加路由条目。具体配置如下:3、验证配置pc机:pc1(ip:/24,gateway:)pc2( ip:/24,gateway:)pc1(/24)能ping通pc2(/24),配置成功。实验五:dns服务器配置实验目的:1. 掌握dns服务器的架设方法。2. 了解dns服务器的基本管理操作。实验环境:微机两台。实验任务:1. 架设并测试dns服务器。2.为实验室的各台主机分配域名。实验方法:接入internet的每一台主机都至少有一个ip地址。ip地址由数字组成,便于网络设备(如路由器)处理,但ip地址不够直观,很难记住。如已知64是internet中的一台主机的ip地址,根据这个ip地址无法知道通过什么程序来访问这台主机,而且不容易记住。如果告诉这台主机internet网中的域名为,据此可知这是提供web服务的主机,可以通过浏览器来访问。如果知道南阳理工学院的缩写,可以知道这是南阳理工学院的主机。因而域名具有直观和便于记忆的优点。但域名不能被网络设备所识别,为解决这个矛盾,就产生了域名解析服务。需要通过域名与internet中的主机通信时,首先由解析服务器将域名翻译成ip地址,然后通过ip地址与该主机进行通信。domain name server是进行域名解析的服务器,简称dns。dns必须安装在拥有静态ip地址的主机上,以便dns客户端定位dns服务器。另外如果希望该dns服务器能够解析internet上的域名,还需保证该dns服务器能正常连接internet。下面以windows server 2003为例来说明dns服务器的架设和管理。一. 安装dns服务器与设置客户端(一)dns服务器的安装默认情况下windows server 2003系统中没有安装dns服务器,首先需要安装dns服务器。windows活动目录需要dns服务器的支持,如果前面安装活动目录时已经安装了dns,则在实验过程中可以跳过dns服务器的安装。安装dns可以通过以下两种方法:一是使用“配置您的服务器向导”,二是“添加/删除windows 组件”。使用“配置您的服务器向导”安装dns的步骤如下:1 依次单击“开始/管理工具/配置您的服务器向导”,在打开的向导页中依次单击“下一步”按钮。配置向导自动检测所有网络连接的设置情况,若没有发现问题则进入“服务器角色”向导页。提示:如果是第一次使用配置向导,则还会出现一个“配置选项”向导页,点选“自定义配置”单选框即可。2. 在“服务器角色”列表中单击“dns服务器”选项,并单击“下一步”按钮。打开“选

温馨提示

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

评论

0/150

提交评论