1、中国科技网到中国电信网络线路使用分析报告 All rights reserved,路由器配置基础,2,2019/1/16,用户界面登录到路由器,Router con0 is now availablePress RETURN to get started. Router Routerenable Password: Router# Router#exit Router Routerlogout,3,2019/1/16,用户界面使用密码,A line access password A privileged EXEC mode password Encrypted Passwords IOS提
2、供加密存放密码的服务。,4,2019/1/16,用户界面用户方式命令列表,DUT? Exec commands:Session number to resumeaccess-enable Create a temporary Access-List entryaccess-profile Apply user-profile to interfaceattach attach to system componentclear Reset functionsconnect Open a terminal connectiondisable Turn off privileged commands
3、disconnect Disconnect an existing network connectionenable Turn on privileged commandsexit Exit from the EXEChelp Description of the interactive help systemlock Lock the terminallogin Log in as a particular userlogout Exit from the EXECmls exec mls router commandsmrinfo Request neighbor and version
4、information from a multicastroutermstat Show statistics after multiple multicast traceroutesmtrace Trace reverse multicast path from destination to sourcename-connection Name an existing network connectionpad Open a X.29 PAD connection-More-,5,2019/1/16,用户界面上下文相关帮助,DUTshow bootf DUTshow bootflash: ?
5、all show all possible flash infochips show flash chip informationfilesys Show file system information| Output modifiersDUTshow bootflash:,6,2019/1/16,用户界面使用编辑命令, 移动到命令行开头移动到命令行结束移动到上一个词开始移动到前一个字符移动到下一个字符移动到下一个词,7,2019/1/16,用户界面命令历史纪录,Router#show historyshow historyenableterminal hisitory size 10term
6、inal no editingterminal editing Router#, or UP arrow 上一个命令or Down arrow 下一个命令,8,2019/1/16,检查路由器状态,Internetwork Operating System,Program,Dynamic Configuration Information,Table And Buffers,Operating Systems,Backup Configuration File,I N T E R F A C E s,Router#show version,Router#show startup-conifg,R
7、outer#show interfaces,Router#show processes CPURouter#show protocols,Router#show running-config,Router#show mem Router#show ip route,Router#show flash,9,2019/1/16,检查路由器状态,show version显示系统的硬件配置,软件版本,配置文件的源和名字,以及启动镜像。show processes显示当前活动进程。show protocols显示已经配置的协议。show memory显示路由器的内存信息show ip route显示路由
8、表show flash显示闪存设备的信息show running-config显示当前活动配置show startup-config显示备份配置文件show interfaces显示已经配置的界面属性,10,2019/1/16,载入配置文件,RAM,NVRAM,Console or Terminal,TFTP Server,11,2019/1/16,载入配置配置文件,configure terminal从终端执行配置命令copy tftp running-config从tftp服务器将配置复制到RAM中copy tftp startup-config从tftp服务器将配置复制到NVRAM中co
9、py startup-config running-config从NVRAM将配置文件从NVRAM中复制到RAM,12,2019/1/16,载入配置文件,TFTP Server,RAM,Router#copy tftp running-config Host or network configuration file host? IP address of remote host 255.255.255.255? 131.108.2.155 Name of configuration file Router-config? P1R1.2 Booting P1R1.2 from 131.108.
10、2.155:!OK 874/16000 bytes P1R1#,13,2019/1/16,基本的路由器配置任务,Routerenable,Routerconfiguration terminal,Router(config)#,User EXEC Mode,Privieged EXEC Mode,Global configuration mode,Ctrl-Z(end),Exit,14,2019/1/16,基本的路由器配置任务,Interface mode支持对一个界面进行配置的命令 Subinterface mode支持对一个物理界面上的虚电路进行配置。 Controller mode支持配
11、置通道化的T1 Line mode支持配置终端线 Router mode配置IP路由协议 IPX-Router mode支持配置novell网络层协议 Router-map mode支持配置路由表(策略路由),15,2019/1/16,基本的路由器配置任务佩路由器身份信息,Router(config)#hostname P1R1 P1R1#,Router Name,P1R1(config)#banner motd# You have entered a secured system. Autherized access only!#,Message-of-the-Day Banner,P1R1
12、(config)#interface ethernet 0 P1R1(config-if)#description Engineering LAN, Blad. 18,16,2019/1/16,基本的路由器配置任务密码设定,主控台密码line console 0password abc 虚拟终端密码line vty 0 4password abc 特权模式密码enable secret abc,17,2019/1/16,基本的路由器配置任务配置和管理界面,interface commandinterface serial 0interface ethernet 1interface ether
13、net 1/0interface ethernet 1/0/0show interface commandshow interface ethernet 0,18,2019/1/16,基本的路由器配置任务确认界面状态,Operational Serial1 is up, line protocol is up Connection Problem Serial1 is up, line protocol is down Interface Problem Serial1 is down, line protocol is down Disable Serial1 is administrati
14、vely down, line protocol is down,19,2019/1/16,基本的路由器配置任务禁用一个界面,shutdown禁用一个界面no shutdown起用一个界面,20,2019/1/16,基本的路由器配置任务保存配置,write memorycopy running-config startup-configcopy running-config tftp,21,2019/1/16,基本的路由器配置任务管理配置环境,Router#configure terminal Router(config)#boot system flash c2500-js-1 Router
15、#copy running-config startup-config,Flash,Router#configure terminal Router(config)#boot system tftp test.exe 172.16.13.111 Router#copy running-config startup-config,Network,Router#configure terminal Router(config)#boot system rom Router#copy running-config startup-config,ROM,22,2019/1/16,基本的路由器配置任务密
16、码恢复,在路由器启动过程中 Break 更改过程 rommonconfreg Do you wish to change the configuration?y/nn:y Enable “ignore system config info”?y/nn:y Change the boot characteristics?y/nn:y Enter to boot: 2 Do you wish to change the configuration?y/nn:n rommonreset Would you like to enter the initial dialog?yes:noenableco
17、nfigure memory改密码configure register 0x2102,23,2019/1/16,基本的路由器配置任务备份IOS,copy flash tftp,24,2019/1/16,基本的路由器配置任务升级IOS,copy tftp flash,25,2019/1/16,基本的路由器配置任务使用setup进行快速设置,setup,26,2019/1/16,发现和访问其他Cisco设备,Cisco Discovery Protocol Cisco的特有协议,使得网络管理员能够发现相邻设备的平台和协议。 信息包括: 设备标识:如主机名及域名 地址列表:至少包含一个用于snmp协议。 端口标识:ethernet 0, serial 0 性能列表 版本 平台,27,2019/1/16,发现和访问其他Cisco设备,Router(config)# cdp run 启动CDP服务 Router(config-if)# no cdp enable 在某个界面禁止使用CDP Router(config)#cdp timer 30 多长时间发送一个CDP包 Router(config)#cdp holdtime 90 多长时间没有收到CDP包就认为该设备已经停止使用。,28,2019/1/16,发现和访问其他Cisco设备,show cdp neighbors,