版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、路由器的基本配置,完成本章的学习后,您可以完成下面的任务: 创建一个 启动或 运行配置文件 在全局配置模式下对路由器进行配置 配置一个串口 选择下载IOS文件的路径 如何备份路由器的IOS文件 使用setup mode对路由器进行一些基本配置,目标,使用 Setup 模式配置路由器,在Setup模式中配置全局参数,Configuring global parameters: Enter host name Router:P1R1 The enable secret is a one-way cryptographic secret used instead of the enable pass
2、word when it exists. Enter enable secret : Enter enable password : % Please choose a password that is different from the enable secret Enter enable password :cisco Enter virtual terminal password : Configure SNMP Network Management? no: Configure IP? yes: Configure IGRP routing? yes: Your IGRP auton
3、omous system number 1:,. . .,在Setup模式配置端口,Setup 模式下的配置一览功能,路由器操作模式一览,用户模式 用户特权模式 全局配置模式,配置模式,提示符,端口 Router(config-if)# 子端口 Router(config-subif)# 控制器 Router(config-controller)# 终端线 Router(config-line)# 路由 Router(config-router)# IPX-路由 Router(config-ipx-router)# Route-map Router(config-route-map)#,如何改
4、变路由器的标识,为路由器或具体端口配置相应的标识,配置密码,Router(config)#line console 0 Router(config-line)#login Router(config-line)#password cisco,Console 密码,虚终端密码,Router(config)#line vty 0 4 Router(config-line)#login Router(config-line)#password cisco,Enable 密码,Router(config)#enable password cisco,Secret 密码,Router(config)#e
5、nable secret ccna,其他命令,Router(config)#service password-encryption,给所有密码加密,Router(config)#line console 0 Router(config-line)#exec-timeout 0 0,防止自动退出特权模式,Router(config)#line console 0 Router(config-line)#logging synchronous,防止命令中断,Router(config)#interface type number Router(config-if)#,端口的配置,端口类型包括 se
6、rial, ethernet, token ring, fddi, hssi, loopback, dialer, null, async, atm, bri, tunnel number用来标识具体的端口,退出当前的端口配置模式,Router(config)#interface type number Router(config-if)#,端口的配置(续),type includes serial, ethernet, token ring, fddi, hssi, loopback, dialer, null, async, atm, bri, and tunnel number is u
7、sed to identify individual interfaces,show interfaces 命令,. . .,. . .,Router#show interface serial 1 Serial1 is up, line protocol is up Hardware is cxBus Serial Description: 56Kb Line San Jose - MP : : : : : : : : : :,协议正常,载波检测正常,端口状态的解释,配置一个串口,进入全局配置模式,进入具体端口配置模式,设置DCE 时钟速率,设置带宽,检查 DCE/DTE 状态,检查所做的修
8、改,Router#show interfaces serial 1 Serial1 is up, line protocol is up Hardware is MK5025 MTU 1500 bytes, BW 56 Kbit, DLY 20000 usec, rely 255/255, load 9/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input 0:00:00, output 0:00:01, output hang never Last clearing of show interf
9、ace counters never Output queue 0/40, 0 drops; input queue 0/75, 0 drops Five minute input rate 1000 bits/sec, 0 packets/sec Five minute output rate 2000 bits/sec, 0 packets/sec 331885 packets input, 62400237 bytes, 0 no buffer Received 230457 broadcasts, 0 runts, 0 giants 3 input errors, 3 CRC, 0 f
10、rame, 0 overrun, 0 ignored, 0 abort 403591 packets output, 66717279 bytes, 0 underruns 0 output errors, 0 collisions, 8 interface resets, 0 restarts 45 carrier transitions,其它端口的配置,选择以太网端口的介质类型,重新打开一个人为关闭的端口,Router#configure term Router(config)#interface serial 1 Router(config-if)#shutdown %LINEPROTO
11、-5-UPDOWN: Line Protocol on Interface Serial1, changed state to down %LINK-5-CHANGED: Interface Serial, changed state to administratively down,关闭一个端口,在不改变配置的情况下人为地关闭一个端口,Router#configure term Router(config)#interface serial 1 Router(config-if)#no shutdown %LINK-3-UPTOWN: Interface Serial, changed st
12、ate to up %LINEPROTO-5-UPDOWN: Line Protocol on Interface Serial1, changed state to up,检查对路由器所做的修改 (10.3+版本),Yes,对路由器进行配置,检测结果 Router#show running-config,结果是否正确,保存配置 Router#copy running-config startup-config Router#copy running-config tftp,检查保存文件 Router#show startup-config,No,删除修改,覆盖修改,Router(config
13、)#no. Router#copy start run Router#copy TFTP run,Router#reload Router#copy TFTP start Router#reload,重启,清除NVRAM,Router#erase start Router#reload,保存配置文件 (10.3+版本),RAM,使用 Telnet 登陆到远程设备,RouterA,RouterB,,,S0,S1,查看Telnet 连接,RouterA,RouterB,,,S0,S1,RouterB显示当前用户,暂停一个Telent
14、会话,RouterA,RouterB,,,S0,S1,暂停连接,继续连接,RouterA显示连接会话,RouterA#disconnect Closing connection to confirm RouterB#clear line vtynumber confirm OK,中止一个Telent 会话,在远程设备上终止TELNET,在本地终止TELNET会话,RouterA,RouterB,,,S0,S1,Router#show version IOS (tm) 2500 Software (C2500-JS
15、-L), Version 11.2 (6), RELEASE SOFTWARE (fc1) Copyright (c) 1986-1997 by cisco Systems, Inc. Compiled Tue 06-May-97 16:17 by kuong Image text-base: 0 x0303ED8C, data-base: 0 x00001000 ROM: System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE ROM: 3000 Bootstrap Software (IGS-RXBOOT), version 10.2 (8a
16、), RELEASE SOFTWARE (fc1) Router uptime is 21 hours, 13 minutes System restarted by reload System image file is flash:c2500-js-l.112-6.bin, booted via flash Configuration register is 0 x2102,设置配置寄存器的值,. . .,配置寄存器中第0到第3bit用来指定如何下载IOS 用 show version 命令检查配置寄存器的值,配置寄存器,配置寄存器值,0 x2100,0 x2102 到 0 x210F,0
17、 x2101,含义,启动后进入 ROM monitor状态,到NVRAM 中寻找有没有boot system 命令(0 x2 为缺省值 ),从ROM中的IOS子集启动,路由器密码的恢复:,冷关机,然后再开机并在60秒内按+进入ROM监视器模式 o/r 0 x2142 confreg 0 x2142 I(重新启动) router enable router# copy startup-config running-config router# configure terminal router(config)# enable secret New-Password router(config)#
18、 config-register 0 x2102 router(config)# z router# copy running-config startup-config router# reload,利用网络备份一个IOS映像文件,路由器,检查服务器剩余空间,检查映像文件的命名方式,检查服务器的可达性,网络服务器,Router#show flash System flash directory: File Length Name/status 1 7871172 c2500-js-l.112-6.bin 7871236 bytes used, 517372 available, 838860
19、8 total 8192K bytes of processor board System flash (Read ONLY),察看flash的相关内容,察看flash中的剩余空间,Router#show flash System flash directory: File Length Name/status 1 7871172 c2500-js-l.112-6.bin 7871236 bytes used, 517372 available, 8388608 total 8192K bytes of processor board System flash (Read ONLY),IOS映
20、像文件名,创建一个IOS的备份文件,在更新 Flash前做一个备份文件,copy flash tftp,下载配置文件 (10.3+及以后版本),Console or Terminal,RAM,TFTP Server,configure terminal,copy startup-config running-config,copy tftp running-config,copy tftp startup-config,从TFTP Server下载配置文件,Router#copy tftp running-config Host or network configuration file ho
21、st? IP address of remote host 55? 55 Name of configuration file Router-confg? P1R1.2 Configure using P1R1.2 from 55? confirm y Booting P1R1.2 from 55:! OK - 874/16000 bytes P1R1#,TFTP Server,从网络升级IOS,系统会在下载新的版本前首先抹掉旧Flash,Network Server,FLASH,覆盖现存的版本,对于那
22、些新,旧映像文件版本相同的情况,网络服务器,FLASH,Router#copy tftp flash IP address or name of remote host 55? 11 Name of tftp filename to copy into flash ? c4500-js-l.112-6 File c4500-js-l.112-6 already exists; it will be invalidated! Copy c4500-js-l.112-6 from 11 into flash memory? co
23、nfirm xxxxxxxx bytes available for writing without erasure. erase flash before writing? confirm Clearing and initializing flash memory (please wait)#.# Loading from 11: ! !(text omitted) OK - 324572/524212 bytes Verifying checksum. VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
24、VVVVVVVVVVVVVVVV VVVVVV(text omitted) Flash verification successful. Length = 1204637, checksum = 0 x95D9,路由器基本配置一览,把配置文件下载到RAM 改变路由器的个性化标识 配置访问密码 配置路由器相应的端口 把配置文件保存到NVRAM,路由器启动顺序,1.先进行POST,测试硬件 2.bootstrap 查找和加载IOS 3.IOS 在NVRAM 中查找有效的startup-comfig 配置文件 4.如果在NVRAM 里查找到了这个配置文件,router 就可操作;如果文件不存在,ro
25、uter 进到setup 模式,进入ROM monitor状态,配置下载IOS文件的路径,配置寄存器 设置配置寄存器的值可以改变下载路由器IOS映像文件的路径,Router#configure terminal Router(config)#boot system flash IOS_filename Router(config)#boot system tftp IOS_filename tftp_address Router(config)# Ctrl-Z Router#copy running-config startup-config,当在 NVRAM中没找到Boot system命令
26、,缺省的到flash中去找IOS,如果flash是空的,缺省的再到 TFTP server中去找IOS,Router#configure terminal Router(config)#boot system flash c2500-js-l Ctrl-Z Router#copy running-config startup-config,从flash启动,从网络启动,Router#configure terminal Router(config)#boot system tftp test.exe 11 Ctrl-Z Router#copy running-config
27、 startup-config,多条 boot system 命令可以设定下载IOS的顺序,NVRAM中的boot system选项,Router(config)#,给主机名静态的指定一个IP地址 可以有多个IP地址与主机名对应,主机名,ip host name tcp-port-number address address ,ip host P1R1 ip host P1R2 ,指定一个或多个主机提供从主机名到逻辑地址的映射服务,Router(config)#,配置名字服务器,ip name-server server-address1 serv
28、er-address2 . server-address6 ,路由器缺省启用DNS 服务 关闭名字服务,Router(config)#,Router(config)#,名字系统,ip domain-lookup,no ip domain-lookup,显示主机名,Router# show hosts Default domain is not set Name/address lookup uses static mappings Host Flags Age Type Address(es) P1R1 (perm, OK) 5 IP 00 13
29、 P2R1 (perm, OK) 5 IP 01 P2R2 (perm, OK) * IP 00 7 P2R3 (perm, OK) * IP 1 -More-,检验配置的地址,Application,Transport,Internet,Network Interface,Hardware,Telnet,ICMP,trace,ping,Application,Transport
30、,Internet,Network Interface,Hardware,Telnet,ICMP,trace,telnet,trace,检查IP网络的连通性,简化的Ping,Router ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: .! Success rate is 80 percent, round-trip min/avg/max = 6/6/6 ms Router,很多协议都支持ping,扩展的
31、 Ping,Router# ping Protocol ip: Target IP address: 62 Repeat count 5: Datagram size 100: Timeout in seconds 2: Extended commands n: y Source address: Type of service 0: Set DF bit in IP header? no: yes Data pattern 0 xABCD: Loose, Strict, Record, Timestamp, Verbosenone: Sweep range of s
32、izes n: Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 62, timeout is 2 seconds: ! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/26/28 ms Router#,显示从源到目的所有经过端口的IP地址,IP Trace,Router# trace Type escape sequence to abort. Tracing the route to
33、 (3) 1 () 1000 msec 8 msec 4 msec 2 barrnet- () 8 msec 8 msec 8 msec 3 (25) 8 msec 4 msec 4 msec 4 () 8 msec 8 msec 8 msec 5 () 12 msec 12 msec 8 msec 6 () 21
34、6 msec 120 msec 132 msec 7 (3) 412 msec * 664 msec,Cisco 发现协议(CDP) Cisco Discovery Protocol,CDP 发现邻接路由器所有信息 物理介质必须支持子网地址协议Subnetwork Access Protocol (SNAP) 封装 会使你获得那些直接和想连的路由器、交换机或是其他的一些思科设备的信息,Upper-Layer Entry Addresses,Cisco Proprietary Data-Link Protocol,Media Supporting SNAP
35、,TCP/IP,Novell IPX,CDP discovers and shows information about directly connected Cisco devices,ATM,Others,LANs,Frame Relay,AppleTalk,Others,运行于Cisco IOS 10.3版本以后的IOS主要显示以下信息 包括: 设备标识 地址列表 端口标识 能力列表 平台,CDP,CDP,CDP,使用 CDP 显示邻居,使用 CDP,SwitchB,RouterA,RouterB,SwitchA,,,,,1
36、,,S0,S1,RouterA#sh cdp ? entry Information for specific neighbor entry interface CDP interface status and configuration neighbors CDP neighbor entries traffic CDP statistics RouterA(config)#no cdp run RouterA(config)#interface serial0 RouterA(config-if)#no cdp enable,SwitchA also prov
37、ides its Mac address,使用命令 show cdp neighbor Command,RouterA#sh cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater Device ID Local Intrfce Holdtme Capability Platform Port ID RouterB Ser 0 148 R 2522 Ser 1 SwitchA0050BD855780 Eth 0 167 T S 1900 2,SwitchB,RouterA,RouterB,SwitchA,,,,,,,S0,S1,使用命令 show cdp entry Command,RouterA#sh cdp entry * - Device ID: RouterB Entry address(es): IP address: Platfo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025《祝福》中鲁镇社会的阶层结构课件
- 电器设备使用操作规定培训
- 2026年广州体育职业技术学院单招综合素质考试题库含答案详解(满分必刷)
- 2026年广东省江门市单招职业适应性考试题库及答案详解(易错题)
- 2025《烛之武退秦师》国际形势判断课件
- 2026年广东水利电力职业技术学院单招职业适应性考试题库附参考答案详解(能力提升)
- 2026年广东省韶关市单招职业适应性考试题库含答案详解(夺分金卷)
- 2026年广西工业职业技术学院单招职业技能测试题库附参考答案详解ab卷
- 作业场所职业安全规章制度培训
- 液压泵定期检修制度培训课件
- 《四川省老旧小区物业服务标准》
- 部编人教版小学4四年级《道德与法治》下册全册教案
- 固体制剂主题知识培训
- 烟草检验工物理国家职业技能标准
- 功能语言学简介(同名17)课件
- 太阳能供电系统设计
- 水下爆炸(理论)教材课件
- 内蒙古科技大学-王怡菲-答辩PPT模板
- 广东省电力行业协会
- T∕CAEPI 41-2022 在线水质荧光指纹污染预警溯源仪
- 快乐六一儿童节主题班会PPT模板
评论
0/150
提交评论