路由器基本配置_第1页
路由器基本配置_第2页
路由器基本配置_第3页
路由器基本配置_第4页
路由器基本配置_第5页
已阅读5页,还剩41页未读 继续免费阅读

下载本文档

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

文档简介

-路由器基本配置第1页,共46页,2023年,2月20日,星期四教学目标(Objectives

)1.路由器功能(FunctionofRouter)2.路由器组成(RouterComponents

)3.超级终端会话属性(HyperTerminalSessionProperties)4.Router配置模式(RouterConfigurationMode

5.路由器基本配置(BasicConfigurationofRouter)第2页,共46页,2023年,2月20日,星期四Router功能(FunctionofRouter)Router是第三层的网络设备(Routerislayer3device):1.路由选择和交换(RoutingandSwitching)2.网络分段(NetworkSegment)3.流量控制(FlowControl)4.隔离广播(IsolateBroadcast)5.广域网连接(WANConnection)第3页,共46页,2023年,2月20日,星期四路由选择和交换(RoutingandSwitching)第4页,共46页,2023年,2月20日,星期四网络分段(NetworkSegment)第5页,共46页,2023年,2月20日,星期四广域网连接(WANConnection)第6页,共46页,2023年,2月20日,星期四路由器内部组成(RouterInternalComponents

)第7页,共46页,2023年,2月20日,星期四RAM/DRAM1.主要存储路由表、ARP缓存、快速交换表和包队列等Storesroutingtables,ARPcache,fast-switchingcache,andpacketholdqueues;

2.存储正在运行的配置文件RAMalsoprovidestemporaryand/orrunningmemoryforarouter'sconfigurationfilewhiletherouterispowered;3.掉电或重启动内容丢失RAMcontentislostduringapowerdownorrestart

第8页,共46页,2023年,2月20日,星期四非易失性RAM(NVRAM

)1.非易失性RAM存储配置文件的备份Non-volatileRAMstorestherouter'sbackup/startupconfigurationfile;

2.掉电或重启动NVRAM内容不丢失NVRAMcontentisretainedduringpowerdownorrestart第9页,共46页,2023年,2月20日,星期四Flash

1.Flash是可擦除,可重新编程的ROM,它存储操作系统映像文件和微代码Erasable,reprogrammableROMthatholdstheoperatingsystemimageandmicrocode;2.Flash可以软件升级,不需要更换芯片Flashmemoryenablessoftwareupdateswithoutremovingandreplacingprocessorchips;

3.掉电或重启动Flash内容不丢失Flashcontentisretainedduringpowerdownorrestart;4.Flash可以存储多个版本的IOS软件FlashmemorycanstoremultipleversionsofIOSsoftware第10页,共46页,2023年,2月20日,星期四ROM

1.ROM包含开机自检程序、启动程序和操作系统软件ROMcontainspower-ondiagnostics,abootstrapprogram,andoperatingsystemsoftware;2.升级ROM中的软件需要更换路由器主板上的芯片SoftwareupgradesinROMrequireremovingandreplacingchipsontherouter'smotherboard第11页,共46页,2023年,2月20日,星期四2600系列路由器内部构成

(InternalComponentsof2600Router

)第12页,共46页,2023年,2月20日,星期四2600系列路由器外观

(ExternalConnectorson2600Router

)第13页,共46页,2023年,2月20日,星期四计算机连接到控制台接口

(ComputerConnecttoConsolePort)第14页,共46页,2023年,2月20日,星期四在计算机上配置超级终端软件

(ConfigureHyperTerminalsoftwareonthePC)第15页,共46页,2023年,2月20日,星期四超级终端会话属性

(HyperTerminalSessionProperties)第16页,共46页,2023年,2月20日,星期四配置路由器的方式

(ExternalConfigurationSource)路由器初始配置必须通过控制台接口进行。Whentherouterisfirstputintoservice,wemustconfigureitbyconsoleport.第17页,共46页,2023年,2月20日,星期四Router配置模式(RouterConfigurationMode

)1.用户模式(usermode)>2.特权模式(privilegedmode)#

3.全局模式(globalconfigmode)router(config)#4.子模式(sub-mode)接口模式(interfacemode):

router(config-if)#

线路模式(linemode):

router(config-line)#

路由模式(routermode):

router(config-router)#5.Setup模式6.RXBOOT模式7.ROMMON模式第18页,共46页,2023年,2月20日,星期四用户模式(UserMode

)这是一种“只能查看”的模式,用户只能查看一些有关路由器的信息,不能更改。Thisisalook-onlymodeinwhichtheusercanviewsomeinformationabouttherouter,butcannotmakechanges.

第19页,共46页,2023年,2月20日,星期四特权模式(PrivilegedMode)这种模式支持调试和测试命令,支持对交换机的详细检查、对配置文件的操作,并且可以由此进入配置模式。Thismodesupportsthedebuggingandtestingcommands,detailedexaminationoftheswitch,manipulationofconfigurationfiles,andaccesstoconfigurationmodes.

第20页,共46页,2023年,2月20日,星期四全局配置模式(GlobalConfigurationMode

)这种模式提供了强大的单行命令,可以完成简单的配置任务。Thismodeimplementspowerfulone-linecommandsthatperformsimpleconfigurationtasks.

第21页,共46页,2023年,2月20日,星期四Setup模式(Setup

Mode)这种模式在控制台提供了交互式的对话,帮助新的用户创建初次的基本的配置。Thismodepresentsaninteractiveprompteddialogattheconsolethathelpsthenewusercreateafirst-timebasicconfiguration.

第22页,共46页,2023年,2月20日,星期四RXBOOT模式(RXBOOT

Mode)1.这是你可以使用的维护模式,可以用来恢复丢失的密码。Thisisthemaintenancemodethatyoucanuse,amongotherthings,torecoverfromlostpasswords.2.2600系列路由器没有此模式2600routershavenotthismode。第23页,共46页,2023年,2月20日,星期四ROMMON模式(ROMMON

Mode)这种模式可以用来恢复密码和升级IOS.ThismodeusetorecoverfromlostpasswordsandupdateIOSsoftware。第24页,共46页,2023年,2月20日,星期四Router工作模式转换

(ChangeRouterConfigurationMode)Router>Router>enableRouter#Router#configureterminalRouter(config)#Router(config)#interfacefa0/0Router(config-if)#exitRouter(config)#routerripRouter(config-router)#endRouter#disableRouter>第25页,共46页,2023年,2月20日,星期四工作模式切换命令注释

(Notes

ofChangingRouterModeCommand)进入特权命令状态enable

退出特权命令状态disable

进入设置对话状态setup

进入全局设置状态configterminal

退出全局设置状态end

进入端口设置状态interfacetypeslot/number

进入线路设置状态linetypeslot/number

进入路由设置状态routerprotocol

退出局部设置状态exit第26页,共46页,2023年,2月20日,星期四命名路由器(NametheRouter)Router(config)#hostnameLab-A第27页,共46页,2023年,2月20日,星期四配置enable密码(ConfiguringEnablePasswords

Lab-A(config)#enablepasswordcisco

showrunningenablepasswordcisco

(明文,未加密)Resultsin:第28页,共46页,2023年,2月20日,星期四配置enable密码(ConfiguringEnablePasswords

)Lab-A(config)#enablesecretcisco

Showrunenablesecret5$1$emBK$WxqLahy7YO(密码被加密)Resultsin:第29页,共46页,2023年,2月20日,星期四配置控制台密码(ConfiguringConsolePasswords

)router1(config)#lineconsole0router1(config-line)#passwordciscorouter1(config-line)#loginrouter1(config-line)#loggingsynchronous日志同步router1(config-line)#exec-timeout0防止自动清线router1(config-line)#endRouter1#exit第30页,共46页,2023年,2月20日,星期四配置VTY密码(ConfiguringVTYPasswords

)router1(config)#linevty0404:允许5个终端同时远程登录04:(permit5terminalsloginatthesametime)router1(config-line)#passwordciscorouter1(config-line)#loginrouter1(config-line)#privlevel15设置登录优先级(setpriority)第31页,共46页,2023年,2月20日,星期四配置串行口(ConfiguringaSerialInterface

)1.Rouer1#configt2.Router1(config)#interfaces0/0进入串行口模式(EnterSerialInterfaceMode

)3.Router1(config-if)#clockrate

64000DCE端配置时钟(SetclockrateifaDCEcableisconnected)4.Router1(config-if)#ipaddress192.168.100.1255.255.255.0配置接口IP地址和网络掩码(SpecifytheInterfaceAddressandSubnetMask

)5.Router1(config-if)#noshut开启接口(TurnontheInterface

)第32页,共46页,2023年,2月20日,星期四配置以太口(ConfiguringanEthernetInterface

)1.Router1#configt2.Router1(config)#interfacefa0/0进入以太口模式(EnterEthernetInterfaceMode

)3.Router1(config-if)#ipaddress10.1.1.1255.255.255.0配置接口IP地址和网络掩码(SpecifytheInterfaceAddressandSubnetMask

)4.Router1(config-if)#noshut开启接口(TurnontheInterface

第33页,共46页,2023年,2月20日,星期四配置接口描述(ConfiguringInterfaceDescription

)1.接口描述可以帮助网络用户记住特定的关于接口的信息Adescriptionofaninterfacecanhelpanetworkuserrememberspecificinformationabouttheinterface.2.描述仅仅是对接口的一个标记。Thedescriptionismeantsolelyasacommentabouttheinterface.Eg1interfacefa0/0descriptionLANEngineering,Bldg.2

Eg2interfaceserial0/0

descriptionABCnetwork1,Circuit1第34页,共46页,2023年,2月20日,星期四Router端口状态(StatusofInterface)第35页,共46页,2023年,2月20日,星期四配置登录提示信息(ConfiguringLoginBanners

)Router1(config)#bannermotd#WelcometoShenzhenPolytechnic#“#”:特定的分隔符号“#”:aspaceandadelimitingcharacter第36页,共46页,2023年,2月20日,星期四高级组合命令(EnhancedEditingCommands

)Ctrl+A:光标回到命令行的最开头(movetothebeginningofthecommandline)Ctrl+E:光标回到命令行的最后(movetotheendofthecommandline)Ctrl+B:光标向左移一字符位置(movebackonecharacter)Ctrl+F:光标向右移一字符位置(movefrowardonecharacter)※可以使用terminalnoediting命令来使组合键失效,要使组合键重新生效,可用terminalediting命令※

Todisableenhancededitingmode,typeterminalnoeditingattheprivilegedEXECmodeprompt.第37页,共46页,2023年,2月20日,星期四高级组合命令(EnhancedEditingCommands

)Ctrl+P(or上箭头):使用上一条用过的命令(recallpreviouscommand)Ctrl+N(or下箭头):使用下一条用过的命令(recallmostrecentcommand)第38页,共46页,2023年,2月20日,星期四使用“?”(use“?”)clockclock?clockset?clockset10:30:30?clockset10:30:3020oct?clockset10:30:3020oct2002?showclock第39页,共46页,2023年,2月20日,星期四1.保存配置文件(Saveconfigurationfile

)copyrunning-configstartup-configWrite2.删除配置文件(Deleteconfigurationfile)erasenvram或erasestartup-config3.查看配置文件(showconfigurationfile)showstartup-configshowrunning-config保存、删除、查看配置文件(Save,Delete,ShowConfigurationFile)第40页,共46页,2023年,2月20日,星期四各种show命令第41页,共46页,2023年,2月20日,星期四show命令第42页,共46页,2023年,2月20日,星期四Show命令(ShowCommand)1.showversion

这个命令可以查看IOS版本号,已启动时间,flash中的IOS的文件名,router里面共有什么的端口,寄存器的值等等。2.showprotocol

显示与ip有关的路由协议信息,各个端口的情况。3.showflash

查看flash中的内容,IOS的长度,文件名,剩余空间,总共空间。4.showrunning-config

查看路由器当前的配置信息。5.showstartup-config

查看nvram中的路由器配置信息。6.showinterface

查看路由器上的各个端口的状态信息。7.showcontroller

查看接口控制器的状态,可看到连接的是

温馨提示

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

评论

0/150

提交评论