ImageVerifierCode 换一换
你正在下载:

lab21.docx

[预览]
格式:DOCX , 页数:53 ,大小:277.04KB ,
资源ID:28242511      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/28242511.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(lab21.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

lab21.docx

1、lab21一.连接路由器、熟悉路由器的IOS1.1实验目的1. 熟悉IOS的基本操作和基本命令的使用;2. 掌握路由器的各种模式以及模式间的转换;3. 掌握静态路由和默认路由的配置方法;4. 掌握telnet的配置方法;5. 初步了解网络的基本架构。1.2实验内容 路由器配置模式及其转换 组合键编辑 一些常用的状态查询命令(在特权模式下输入命令) 配置路由器 使用ping命令 查看路由表 配置静态路由 配置默认路由 telnet的配置 IP host命令配置/域名翻译配置1.3实验步骤实验拓扑及器材 图1 实验拓扑实验拓扑如上图所示,需要路由器3台、主机3台以及若干必要的连线。其中路由器之间用

2、串行线相连,串行线的一端是DCE,另一端则是DTE;主机与路由器端口直接相连用交叉线。1 连接路由器 a. 先启动路由器,等待OK灯不闪烁; b. 用console线(反转线,注意与网线的比较)把计算机的COM口与路由器的console口直接相连; c. 点击“开始程序附件通讯超级终端”,建立连接,在连接设置的 波特率选择9600,其余为默认选项; d. 终端会话屏幕将出现路由器启动信息,按回车进入。2 路由器配置模式及其转换路由器的几种配置模式:1) 用户模式(user mode) router2) 特权模式(privileged mode) router#3) 全局配置模式(golbal

3、configuration mode): router(config)#4) Setup模式(setup mode):5) ROM Monitor 模式(ROM Monitor Mode): 或rommon。6) RXBoot模式(RXBoot mode): Router(注:前3种模式是该实验需要用到的)7) 用户模式(user mode):该模式下只能查看路由器基本状态和普通命令,不能更改路由器配置。此时路由器名字后跟一个“”符号,表明是在用户模式下。如:router8) 特权模式(privileged mode):该模式下可查看各种路由器信息及修改路由器配置。在用户模式下以enable命

4、令登陆,此时“”将变成“#”,表明是在privileged mode .如:router#9) 全局配置模式(golbal configuration mode):该模式下可进行更高级的配置,并可由此模式进入各种配置子模式。其提示符如:router(config)#10)Setup模式(setup mode):该模式通常是在配置文件(configuration file)丢失的情况下进入的,以进行手动配置。在此模式下只保存着配置文件的最小子集,再以问答的形式由管理员选择配置。11) ROM Monitor 模式(ROM Monitor Mode):当路由器启动时没有找到IOS时,自动进入该模式

5、。提示符为 或rommon。12)RXBoot模式(RXBoot mode):该模式通常用于密码丢失时,要进行破密时进入。其提示符如:Router路由模式之间的转换: Routerenable /由user mode 进入privileged modeRouter#Router#configure terminal /由privileged mode 进入 global configuration modeRouter(config)#Router(config)#interface e0 /可能是e0,也可能是f0,可以通过show interface 查看Router(config-if)

6、#3 组合键编辑Ctrl+A:光标回到命令行的最开头Ctrl+E:光标回到命令行的最后Ctrl+B:光标向左移一个字符位置Ctrl+F:光标向右移一个字符位置Ctrl+P(or 上箭头):使用上一条用过的命令,免去键入麻烦。Ctrl+N(or下箭头):使用下一条用过的命令。(必须使用过Ctrl+P或上箭头后才可用)Ctrl+Z:(在其他模式下)保存设置并退出到特权模式可以使用terminal no editing来使组合键失效,要使组合键重新生效,可用terminal editing命令注: Tab键的功用:完成一个命令的输入。在超级终端中,可能不支持某些组合键。 4 一些常用的状态查询命令(

7、在特权模式下输入命令)show version 查看IOS版本号,已启动时间,flash中的IOS的文件名,router里面共有什么的端口,寄存器的值等等。show protocol 显示与IP 有关的路由协议信息。各个端口的情况。show flash 查看flash中的内容,IOS的长度,文件名,剩余空间,总空间。show running-config 查看路由器当前的配置信息。show startup-config 查看nvram 中的路由器配置信息。show interface 查看路由器上的各个端口的状态信息。(很多重要信息)show controller 查看接口控制器的状态,可看到

8、连接的是DTE还是DCEshow history 查看history buffer 里面的命令列表show controller s0 查看s0是DCE口还是DTE口show ip route 查看路由器的路由配置情况show hosts 查看IP host 表 5 配置路由器1)按拓扑结构图给路由器命名 /以Router1为例命令: Router# config t /“config terminal”的简写,进入全局配置模式Router(config)# hostname Router1 / 把该路由器命名为Router1 注:如果名字含有空格的话,要用双引号括起来。2) 路由器的IP配置

9、(其中包括以太网口配置和串口的配置)命令: Router(config)# ip address 配置以太网口: /以Router2为例命令: Router2# config t Router2(config)# int e0 / 如果是快速以太网口则输入:int f0Router2(config-if)# ip address 192.168.3.1 255.255.255.0 /配置以太网口Router2(config-if)# no shut / 启用该以太网口 注:配置路由器的串口要区分是DCE口还是 DTE口。例如观察s0哪种接口,可以在特权模式下输入命令:show controll

10、er s0配置串行DCE: /以Router2为例,并且还要配置s1命令: Rouer2 # config tRouter2(config)# int s0 Router2(config-if)# clock rate 56000 / 配置时钟Router2(config-if)# bandwidth 56 /设置接口带宽,可选配置Router2(config-if)# ip address 192.168.2.1 255.255.255.0Router2(config-if)# no shut / 启用该串行口配置串行DTE: / 以Router1为例命令: Rouer1 # config

11、tRouter1(config)# int s0Router1(config-if)# bandwidth 56(可选配置)Router1(config-if)# ip address 192.168.2.1 255.255.255.0注:DCE 和 DTE 配置区别:DCE 要配时钟,而DTE 则不必。 6 使用ping命令命令: Router# ping Router# ping / 要先配置IP host表,见 11.分别从路由器和主机上使用ping命令 路由器间互ping:Router1 Router2Router2 Router3Router1 Router3 7 查看路由表 命令:

12、 Router# show ip route表内记录以C开头的记录为路由器直接连接的网段,只要配了端口地址,路由表就会有这条记录。虽然路由器可互通,但没有设置路由,主机是不能互相ping通。8 配置静态路由 命令: ip route network mask 示例: Router1(config)# ip route 192.168.3.0 255.255.255.0 192.168.2.1 /其中,目标网络是192.168.3.0,对应掩码是255.255.255.0,下一跳地址是192.168.2.1Router1(config)# ip route 192.168.4.0 255.255

13、.255.0 192.168.2.1Router1(config)# ip route 192.168.5.0 255.255.255.0 192.168.2.1 Router2(config)# ip route 192.168.5.0 255.255.255.0 192.168.4.2 Router2(config)# ip route 192.168.1.0 255.255.255.0 192.168.2.2 Router3(config)# ip route 192.168.1.0 255.255.255.0 192.168.4.1Router3(config)# ip route 1

14、92.168.2.0 255.255.255.0 192.168.4.1Router3(config)# ip route 192.168.3.0 255.255.255.0 192.168.4.1注: next-hop 为对方直接端口IP查看路由表 (命令:Router# show ip route)注: 以S开头的记录为静态路由记录 9 配置默认路由对于该实验的拓扑结构来说,只有Router1 和Router3 允许配置默认路由。首先应该删除静态路由的配置,才配置默认路由。以Router1 为例:Router1(config)# no ip route 192.168.3.0 255.25

15、5.255.0 192.168.2.1Router1(config)# no ip route 192.168.4.0 255.255.255.0 192.168.2.1Router1(config)# no ip route 192.168.5.0 255.255.255.0 192.168.2.1Router1(config)# ip route 0.0.0.0 0.0.0.0 192.168.2.1查看路由表 (命令: Router# show ip route)注:有*号表示默认路由 10 telnet的配置能进行telnet的前提: 1)主机能ping通路由器; 2)路由器设置了te

16、lnet密码; 3)路由器允许通过telnet登录; 4)如果需要进入特权模式,还需要配置enable密码。配置命令: Router# telnet Router# telnet / 要先配置IP host表,见 11.启动telnet:Router# config tRouter(config)# line vty 0 4 / 同时允许0-4共5个连接Router(config-line)# login /登录Router(config-line)# password cisco / 设置登录密码为cisco设置enable密码:Router(config)#enable password

17、cisco 11 IP host命令配置/域名翻译配置命令: Router# config tRouter(config)# ip host 查看ip host 表 (命令: Router# show hosts) 【实验注意事项】1 须确认线路连接正确后才能打开路由器电源,拔插串口线前请关闭电源。2 绝对不允许热插拔flash卡(用于装载IOS),否则易造成flash卡烧毁;不允许频繁开关路由器。3 对于路由器之间串口连接要区分是DCE口还是 DTE口。例如观察s0哪种接口,可以在特权模式下输入令:show controller s0。对于DCE 口要配置时钟。4 使用ip address

18、配置路由器的ip时,不要忘了子网掩码。5 配置路由器接口(ethernet,fastethernet,serial)后,要输入:Router(config-if)# no shut,以激活该接口。6 配置静态或默认路由时须明确next-hop 所指的是哪个端口。二. 路由的初始化1.1 实验目的掌握 setup模式。1.2 实验内容1.3 实验步骤按照下面的指示,连接网络设备1、 进入特许模式,键入setup Router#setup2、 按回车键确认;3、 设置全局参数;4、 设置接口参数;5、 为每个接口设置拓扑图指定的IP地址和掩码;6、 show rnning-config;7、 sh

19、ow startup-config;8、 copy run start;9、 再show startup-config。1.4实验参考:Setup的全过程Router#setup进入setup配置模式: - System Configuration Dialog -系统提示是否继续配置setup模式:Continue with configuration dialog? yes/no: yes回答yes后出现系统的补充说明:At any point you may enter a question mark ? for help.Use ctrl-c to abort configuratio

20、n dialog at any prompt.Default settings are in square brackets .Basic management setup configures only enough connectivityfor management of the system, extended setup will ask youto configure each interface on the system然后系统提示是否进入basic management setup配置模式,由于涉及管理方面,非本实训内容,所以选择no:Would you like to en

21、ter basic management setup? yes/no: no系统提示是否查看现在的接口配置的汇总信息:First, would you like to see the current interface summary? yes: y回答yes后出现现有接口配置的全信息:Interface IP-Address OK? Method Status ProtocolFastEthernet0/0 unassigned YES unset administratively down downSerial0/0 unassigned YES unset administrativel

22、y down downFastEthernet0/1 unassigned YES unset administratively down downSerial0/1 unassigned YES unset administratively down down随后设置全局参数:Configuring global parameters:配置路由器的主机名: Enter host name Router: LAB_E默认值为Router;然后提示系统密码的作用,以及enable password和enable secret密码的区别,前者没有加密,而后者加密: The enable secre

23、t is a password used to protect access to privileged EXEC and configuration modes. This password, after entered, becomes encrypted in the configuration. Enter enable secret: cisco The enable password is used when you do not specify an enable secret password, with some older software versions, and so

24、me boot images. Enter enable password: cisco由于两个密码的值相同,所以系统提出警告要求最好换一个密码:% Please choose a password that is different from the enable secret Enter enable password: class然后系统提示你输入虚拟终端登录系统的密码: The virtual terminal password is used to protect access to the router over a network interface. Enter virtual

25、 terminal password: cisco随后我们要配置的是我们的路由器是否使用SNMP协议和使用什么被动路由协议: Configure SNMP Network Management? no: n Configure DECnet? no: n Configure AppleTalk? no: n我们选择的是IP被动路由协议及相应的动态路由协议RIP: Configure IP? yes: y Configure IGRP routing? yes: n Configure RIP routing? no: y Configure bridging? no: n Configure

26、IPX? no: nAsync lines accept incoming modems calls. If you will haveusers dialing in via modems, configure these lines. Configure Async lines? yes: n下面是接口配置的提示符:Configuring interface parameters:下面是询问是否配置FastEthernet0/0这个接口,我们选择yes:Do you want to configure FastEthernet0/0 interface? no: y Use the 100

27、 Base-TX (RJ-45) connector? yes: Operate in full-duplex mode? no:配置接口的IP地址和它的子网掩码: Configure IP on this interface? no: y IP address for this interface: 210.93.105.2 Subnet mask for this interface 255.255.255.0 : Class C network is 210.93.105.0, 24 subnet bits; mask is /24然后是其他接口的配置,由于方法相同就不在多加说明了:Do

28、 you want to configure Serial0/0 interface? no: nDo you want to configure FastEthernet0/1 interface? no: nDo you want to configure Serial0/1 interface? no: nThe following configuration command script was created:随后系统会将你刚刚配置的信息汇总如下:hostname LAB_Eenable secret 5 $1$z0gR$WKWw/UtMuG3.teTpYJt/u.enable pa

29、ssword classline vty 0 4password ciscono snmp-server!no decnet routingno appletalk routingip routingno bridge 1no ipx routing!interface FastEthernet0/0no shutdownmedia-type 100BaseXhalf-duplexip address 210.93.105.2 255.255.255.0no mop enabled!interface Serial0/0shutdownno ip address!interface FastE

30、thernet0/1shutdownno ip address!interface Serial0/1shutdownno ip addressdialer-list 1 protocol ip permitdialer-list 1 protocol ipx permit!router ripredistribute connectednetwork 210.93.105.0!end最后系统给出几个选择,让管理员选择是否保存上面的配置:0 Go to the IOS command prompt without saving this config.1 Return back to the setup without saving this config.2 Save this configuration to nvram and exit.Enter your selectio

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1