0501路由器的管理与基本配置_第1页
0501路由器的管理与基本配置_第2页
0501路由器的管理与基本配置_第3页
0501路由器的管理与基本配置_第4页
0501路由器的管理与基本配置_第5页
已阅读5页,还剩66页未读 继续免费阅读

下载本文档

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

文档简介

1、 2004,Enhan info, Inc. All rights reserved., 2002, Cisco Systems, Inc. All rights reserved.,2,路由器的管理与基本配置 刘道军,目标,通过本章的学习,你将能做到以下内容: 了解路由器外观和各接口 描述路由器的启动顺序并解释如何判断路由器是否正确启动 识别Cisco路由器及交换机的内部组件,路由器的外观,前面板上有两个LED指示灯: System Power LED:设备电源指示灯,开机后此灯一般是持续绿色。 System Activity LED:发送或接收任何数据包以及监控系统有活动的时候,此灯会不断

2、闪烁。,路由器的后面板,路由器的组成,中央处理器(CPU):负责路由器的配置管理及数据包的转发处理工作 路由器的内存 接口,路由器的内存,运行期间,Cisco路由器中的RAM用来保存路由表,ARP缓存,快速交换缓存,分组缓存区和分组队列,使路由器能迅速访问这些信息。除此之外,还包括运行配置(running-config文件)、正在执行的代码、IOS操作系统程序和一些临时数据信息。RAM中的内容在断电或重启时将会被丢失。,ROM保存着路由器的开机诊断程序、引导程序和最小的IOS(互联网操作系统)。,闪存是可读可写的非易失性存储器,被用来保存IOS软件,维持路由器的正常工作,用来引导路由器的IOS

3、软件的默认位置。,用于保存启动配置文件(Startup-config),NVRAM的内容在断电或重启后内容不会丢失。,总结,ROM 功能,包含了微代码用于基本操作,路由器 加电/启动 顺序,加电自检 (POST). 加载并运行bootstrap 代码. 查找 Cisco IOS 软件. 加载 Cisco IOS软件. 发现查找配置信息. 实施配置信息. 运行,路由器 加电/启动 顺序,1、加电自检 (POST).: POST被用来检测各组件是否能够正常工作,如检验其CPU、RAM和NVRAM。 当路由器首次或重新装载时,将会显示如下信息(以Cisco 1841为例):,System Boots

4、trap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1) Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.,路由器 加电/启动 顺序,2、加载并运行bootstrap 代码: Bootstrap的主要目的就是定位IOS,并把IOS加载到RAM中。,Self decompressing the image : # OK,路由器 加电/启动 顺序,3、定位和装载IOS: 可能被存放ROM或闪存中,甚至可能被存放在网络上。因此,需要定位。下面列出了路由器的Register值及对应的加载

5、位置。,路由器 加电/启动 顺序,下面以实例显示了IOS加载位置的设置方法:,Routerenable Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#boot system flash falsh:c1841-ipbase-mz.123.14.T7.bin (加载flash中指定的IOS文件) Router(config)#boot system flash t/c1841-ipbase-mz.123.14.T7.bin(从T

6、FTP加载IOS),路由器 加电/启动 顺序,2、加载并运行bootstrap 代码: Bootstrap的主要目的就是定位IOS,并把IOS加载到RAM中。,Self decompressing the image : # OK,从Flash存储器中加载 Cisco IOS 软件,Falsh中存储的文件被放到RAM中解压缩,加载配置信息,从NVRAM里加载并执行配置文件. 如果NVRAM里没有配置文件, 进入到配置模式.,查看当前配置里的配置寄存器的值,wg_ro_a#show version Cisco Internetwork Operating System Software IOS

7、(tm) 2500 Software (C2500-JS-L), Version 12.0(3), RELEASE SOFTWARE (fc1) Copyright (c) 1986-1999 by cisco Systems, Inc. Compiled Mon 08-Feb-99 18:18 by phanguye Image text-base: 0 x03050C84, data-base: 0 x00001000 ROM: System Bootstrap, Version 11.0(10c), SOFTWARE BOOTFLASH: 3000 Bootstrap Software

8、(IGS-BOOT-R), Version 11.0(10c), RELEASE SOFTWARE (fc1) wg_ro_a uptime is 20 minutes System restarted by reload System image file is flash:c2500-js-l_120-3.bin -More- Configuration register is 0 x2102,通过show version命令查看配置寄存器的值,配置寄存器位 3, 2, 1, 和 0 设置启动选项. 通过show version命令来检查配置寄存器的值.,配置寄存器的值,show vers

9、ion 命令,Router#show version Cisco Internetwork Operating System Software IOS (tm) C2600 Software (C2600-JS-M), Version 12.0(7a), RELEASE SOFTWARE (fc1) Copyright (c) 1986-2002 by cisco Systems, Inc. Compiled Tue 05-Feb-02 01:48 by pwade Image text-base: 0 x80008088, data-base: 0 x80B0404C ROM: System

10、 Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1) Router uptime is 1 minute System restarted by reload System image file is flash:c2600-js-mz.120-7a.bin cisco 2610 (MPC860) processor (revision 0 x300) with 53248K/12288K bytes of memory. Processor board ID JAD06090BMD (2719249260) M860 processor

11、: part number 0, mask 49 Bridging software. X.25 software, Version 3.0.0. SuperLAT software (copyright 1990 by Meridian Technology Corp). TN3270 Emulation software. Basic Rate ISDN software, Version 1.1. 1 Ethernet/IEEE 802.3 interface(s) 2 Serial(sync/async) network interface(s) 1 ISDN Basic Rate i

12、nterface(s) 32K bytes of non-volatile configuration memory. 16384K bytes of processor board System flash (Read/Write) Configuration register is 0 x2102,show flash 命令,wg_ro_a#show flash System flash directory: File Length Name/status 1 10084696 c2500-js-l_120-3.bin 10084760 bytes used, 6692456 availa

13、ble, 16777216 total 16384K bytes of processor board System flash (Read ONLY),show running-config 和 show startup-config 命令,wg_ro_c#show startup-config Using 1359 out of 32762 bytes ! version 12.0 ! - More -,wg_ro_c#show running-config Building configuration. Current configuration: ! version 12.0 ! -

14、More -,In NVRAM,In RAM,显示当前的和已保存的信息,路由器的操作基础,路由器的操作基础,根据包含有关配置文件的数据流的传输途径的不同,大致可以两种:带外控制(Out-Band)和带内控制(In-Band)。带外控制就是指通常通过console口或AUX口进行的配置,带内控制包括:Telnet、HTTP和HTTPS、SSH、TFTP等,控制台连接,控制台连接,线缆正确连接后,执行“开始”“程序”“附件”“通信”“超级终端”命令。,控制台连接,控制台连接,注意:现在很多新款笔记本电脑已不再集成COM口,只能通过USB转COM口的转接线器来解决。另外,Windows Vista没

15、有超级终端,可以使用Secure CRT或Putty代替。,路由器的安装模式,当启动路由器后,将会在NVRAM中查找所需要的配置文件,如果NVRAM中没有路由器所需的配置文件,将出现“Continue with configuration dialog? yes/no: ”,安装模式显示结果,- System Configuration Dialog - Continue with configuration dialog? yes/no: y(是否要进行配置对话?) At any point you may enter a question mark ? for help. Use ctrl

16、-c to abort configuration dialog at any prompt. Default settings are in square brackets . Basic management setup configures only enough connectivity for management of the system, extended setup will ask you to configure each interface on the system Would you like to enter basic management setup? yes

17、/no: y (是否要进行基本管理安装?) Configuring global parameters: (全局参数配置) Enter host name Router: Router_A (输入路由器的名字) The enable secret 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: ccna

18、 (输入加密的使能密码) The enable password is used when you do not specify an enable secret password, with some older software versions, and,安装模式显示结果(续),some boot images. Enter enable password: liu (输入使能密码,注意不能与secret密码相同) The virtual terminal password is used to protect access to the router over a network in

19、terface. Enter virtual terminal password: liu (输入虚拟终端密码) Current interface summary (当前接口汇总) Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES manual administratively down down FastEthernet0/1 unassigned YES manual administratively down down Vlan1 unassigned YES manual ad

20、ministratively down down Enter interface name used to connect to the management network from the above interface summary: FastEthernet0/0 (从上面汇总中选择一个接口来管理网络) Configuring interface FastEthernet0/0: Configure IP on this interface? yes: y (要配置这个接口吗?) IP address for this interface: (输入接口的IP地

21、址),安装模式显示结果(续),Subnet mask for this interface : (输入接口的子网掩码) The following configuration command script was created: (下面的配置命令脚本已经被创建) ! (部分省略) 0 Go to the IOS command prompt without saving this config.(选0,放弃保存并返回IOS命令行) 1 Return back to the setup without saving this config

22、. (选1,放弃保存,返回安装模式) 2 Save this configuration to nvram and exit. (选2,保存配置到NVRAM并退出) Enter your selection 2: 2 (输入你的选项) Building configuration.,管理配置文件,启运配置文件(Startup-Config) 运行配置文件(Running-Config) 查看和删除配置文件 保存配置文件,查看配置文件,Router_A#show running-config (查看运行配置文件) Building configuration. Current configura

23、tion : 455 bytes ! version 12.4 no service password-encryption ! hostname Router_A! ! enable secret 5 $1$mERr$Bok4KDfVutXOJolNq009M/ enable password liu! ! ip ssh version 1! ! interface FastEthernet0/0 ip address duplex auto -More- (一屏显示不完,如果按“Enter”键显示一行,按“空格”显示下一屏),删除配置文件

24、,Router_A#erase startup-conifg,保存配置文件,Copy使用方法如下: Copy running-config | startup-config | tftp running-config | startup-config | tftp running-config | startup-config | tftp,例:保存配置文件到TFTP,Router_A#copy startup-config tftp (保存启动配置文件到TFTP) Address or name of remote host ? 03 (输入TFTP服务器主机名或IP地

25、址) Destination filename Router_A-confg? ! 954 byes copied in 0.216 secs (4417 bytes/sec ) (文件大小及花费时间),路由器的操作模式,用户模式(User模式) 特权模式(Privileged 模式) 全局配置模式(Global configuration 模式) 其他配置模式,Router_Aenable Password: Router_A#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Rou

26、ter_A(config)#exit %SYS-5-CONFIG_I: Configured from console by console Router_A#disable Router_A,路由器的操作模式,用户模式(User模式) 特权模式(Privileged 模式) 全局配置模式(Global configuration 模式) 其他配置模式,CLI命令行的使用,CLI命令行的使用,1、CLI命令行的使用,Router_A#c? (C与?之间无空格) clear clock configure connect copy (显示了5个以c开头的命令) Router_A#c,2、命令的缩

27、写,Router_Aen Password: Router_A#conf t Enter configuration commands, one per line. End with CNTL/Z. Router_A(config)#,3、CLI命令行的使用错误提示,输入命令不完整,Router_A#clock % Incomplete command. Router_A#clock ? set Set the time and date Router_A#clock,输入错误命令,Router_A#cluck set % Invalid input detected at marker.,输

28、入命令不唯一,Router_A#con t % Ambiguous command: con t Router_A#conf t Enter configuration commands, one per line. End with CNTL/Z. Router_A(config)#,CLI命令行的使用,4、 CLI快捷键,CLI命令行的使用,5、配置历史缓存, 2002, Cisco Systems, Inc. All rights reserved.,44,配置一台路由器,目标,通过本章的学习,你将能做到以下内容: 给定一个Cisco路由器,通过使用CLI来配置路由器 给定一个Cisco

29、路由器, 检查路由器的默认配置 给定一个Cisco路由器, 完成初始化设备配置 给定一个Cisco路由器, 在路由器的接口上配置IP地址和IP子网掩码,路由器模式概述,保存配置,wg_ro_c# wg_ro_c#copy running-config startup-config Destination filename startup-config? Building configuration wg_ro_c#,拷贝当前的配置信息到 NVRAM,设置本地标识或登陆信息提示,配置路由器的标识,配置路由器密码,上述密码,除了启动加密密码是被加密以外,其他密码均为明文显示的,Router(con

30、fig)#service password-encryption,其他 Console-Line 命令,Router(config)#line console 0 Router(config-line)#exec-timeout 0 0,Router(config)#line console 0 Router(config-line)#logging synchronous,保持Console口会话不超时,重新显示打断后的console输入,Router(config)#interface type number Router(config-if)#,type 包括 serial, ether

31、net, token ring, fddi, hssi, loopback, dialer, null, async, atm, bri, tunnel, 等等 number 用来标识端口的唯一性,离开当前的接口和配置模式,Router(config)#interface type slot/port Router(config-if)#,对于模块化的路由器选择合适接口,配置一个接口,进入全局配置模式,Router(config-if)#clock rate 64000 Router(config-if)#,Router(config)#interface serial 0 Router(co

32、nfig-if)#,Router#configure terminal Router(config)#,Router(config-if)#bandwidth 64 Router(config-if)#exit Router(config)#exit Router#,指定接口,设置时钟频率 (只在DCE设备上),设置带宽 (recommended),配置串型接口,Router#configure terminal Router(config)#interface serial 0 Router(config-if)#no shutdown %LINK-3-UPDOWN: Interface S

33、eria0, changed state to up %LINEPROTO-5-UPDOWN: Line Protocol on Interface Serial0, changed state to up,启动一个接口,Router#configure terminal Router(config)#interface serial 0 Router(config-if)#shutdown %LINK-5-CHANGED: Interface Serial0, changed state to administratively down %LINEPROTO-5-UPDOWN: Line p

34、rotocol on Interface Serial0, changed state to down,管理关闭接口,启动或关闭接口,配置路由器的IP地址,wg_ro_c#configure terminal wg_ro_c(config)#interface ethernet 0 wg_ro_c(config-if)#ip address wg_ro_c(config-if)#no shutdown wg_ro_c(config-if)#exit,路由器 show interfaces 命令,Router#show interfaces E

35、thernet0 is up, line protocol is up Hardware is Lance, address is 00e0.1e5d.ae2f (bia 00e0.1e5d.ae2f) Internet address is 1/24 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255 Encapsulation ARPA, loopback not set, keepalive set (10 sec) ARP type: ARPA, ARP Timeout 04:00

36、:00 Last input 00:00:07, output 00:00:08, output hang never Last clearing of show interface counters never Queueing strategy: fifo Output queue 0/40, 0 drops; input queue 0/75, 0 drops 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 81833 packets input, 2

37、7556491 bytes, 0 no buffer Received 42308 broadcasts, 0 runts, 0 giants, 0 throttles 1 input errors, 0 CRC, 0 frame, 0 overrun, 1 ignored, 0 abort 0 input packets with dribble condition detected 55794 packets output, 3929696 bytes, 0 underruns 0 output errors, 0 collisions, 1 interface resets 0 babb

38、les, 0 late collision, 4 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out,Interpreting the Interface Status,检验一个串型接口配置,Router#show interface serial 0 Serial0 is up, line protocol is up Hardware is HD64570 Internet address is /24 MTU 1500 bytes, B

39、W 64 Kbit, DLY 20000 usec, rely 255/255, load 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input 00:00:09, output 00:00:04, output hang never Last clearing of show interface counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) 5 minute input rate 0 bits/sec, 0 pack

温馨提示

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

评论

0/150

提交评论