构建简单的网络:第4章 操作与配置Cisco IOS_第1页
构建简单的网络:第4章 操作与配置Cisco IOS_第2页
构建简单的网络:第4章 操作与配置Cisco IOS_第3页
构建简单的网络:第4章 操作与配置Cisco IOS_第4页
构建简单的网络:第4章 操作与配置Cisco IOS_第5页
已阅读5页,还剩22页未读 继续免费阅读

下载本文档

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

文档简介

第四章

操作与配置

CiscoIOSCiscoIOS软件提供多种网络服务进而支持各种网络应用.Cisco互连网操作系统(IOS)软件硬件自检定位并加载CiscoIOS映象文件定位并运行配置文件Cisco设备的简单启动过程提供命令行界面在不同的网络设备上运行时有差别在命令模式下可以键入或粘贴命令

键入命令后回车,设备即解析和执行所键入的命令两个主要命令模式是用户模式和特权模式不同的命令模式有不同的提示符CiscoIOSCiscoIOS用户界面的基本特性特权(或enabled)模式对交换机和路由器更深入的操作有配置和监视权力是进入其它配置模式的前提命令提示符为

主机名#模式二(也是最常用的模式):CiscoIOS的主要命令模式(续)系统启动例程会初始化路由器如果需要,路由器可以有选择性地回退启动CheckhardwareFindandloadCiscoIOSsoftwareimage

Findandapplyrouterconfigurationinformation

LoadBootstrap1. 启动前确认正确连接线缆和控制线2. 按下电源开关3. 观察启动顺序 CiscoIOS输出到控制台上的内容Cisco路由器的初始启动没有配置文件与有配置文件的路由器启动对比 ---SystemConfigurationDialog---

Continuewithconfigurationdialog?[yes/no]:yes

Atanypointyoumayenteraquestionmark'?'forhelp.

Usectrl-ctoabortconfigurationdialogatanyprompt.

Defaultsettingsareinsquarebrackets'[]'.

Setup模式wg_ro_ccon0isnowavailablePressRETURNtogetstarted.用户模式提示wg_ro_c>路由器启动时在控制台上的输出内容控制台Setup:初始配置对话框Router#setup---SystemConfigurationDialog---Continuewithconfigurationdialog?[yes/no]:yAtanypointyoumayenteraquestionmark'?'forhelp.Usectrl-ctoabortconfigurationdialogatanyprompt.Defaultsettingsareinsquarebrackets'[]'.Basicmanagementsetupconfiguresonlyenoughconnectivityformanagementofthesystem,extendedsetupwillaskyoutoconfigureeachinterfaceonthesystemWouldyouliketoenterbasicmanagementsetup?[yes/no]:n设置全局参数初始化全局参数Configuringglobalparameters:Enterhostname[Router]:wg_ro_cTheenablesecretisapasswordusedtoprotectaccesstoprivilegedEXECandconfigurationmodes.Thispassword,afterentered,becomesencryptedintheconfiguration.Enterenablesecret:ciscoTheenablepasswordisusedwhenyoudonotspecifyanenablesecretpassword,withsomeoldersoftwareversions,andsomebootimages.Enterenablepassword:sanfranThevirtualterminalpasswordisusedtoprotectaccesstotherouteroveranetworkinterface.Entervirtualterminalpassword:sanjoseConfigureSNMPNetworkManagement?[no]:设置脚本的确认与应用Thefollowingconfigurationcommandscriptwascreated:hostnameRouterenablesecret5$1$/CCk$4r7zDwDNeqkxFO.kJxC3G0enablepasswordsanfranlinevty04passwordsanjosenosnmp-server!noappletalkroutingnodecnetroutingiproutingnoclnsroutingnoipxroutingnovinesroutingnoxnsroutingnoapolloroutingisdnswitch-typebasic-5essinterfaceBRI0shutdownnoipaddress!interfaceEthernet0noshutdownipaddress1nomopenabled!interfaceSerial0shutdownnoipaddress<textomitted>end[0]GototheIOScommandpromptwithoutsavingthisconfig.[1]Returnbacktothesetupwithoutsavingthisconfig.[2]Savethisconfigurationtonvramandexit.Enteryourselection[2]:Consolewg_ro_c>wg_ro_c>enablewg_ro_c#wg_ro_c#disablewg_ro_c>wg_ro_c>logoutwg_ro_ccon0isnowavailablePressRETURNtogetstarted.用户模式提示特权模式提示登入路由器只要所输命令串在全部命令中是唯一的,可以将一个命令尽可能地简写,路由器在用户模式下的命令清单wg_ro_c>?Execcommands:

access-enableCreateatemporaryAccess-Listentry

atmsigExecuteAtmSignallingCommands

cdChangecurrentdevice

clearResetfunctions

connectOpenaterminalconnection

dirListfilesongivendevice

disableTurnoffprivilegedcommands

disconnectDisconnectanexistingnetworkconnection

enableTurnonprivilegedcommands

exitExitfromtheEXEC

helpDescriptionoftheinteractivehelpsystem

latOpenalatconnection

lockLocktheterminal

loginLoginasaparticularuser

logoutExitfromtheEXEC

--More--wg_ro_c#?Execcommands:access-enableCreateatemporaryAccess-Listentryaccess-profileApplyuser-profiletointerfaceaccess-templateCreateatemporaryAccess-ListentrybfeFormanualemergencymodessettingcdChangecurrentdirectoryclearResetfunctionsclockManagethesystemclockconfigureEnterconfigurationmodeconnectOpenaterminalconnectioncopyCopyfromonefiletoanotherdebugDebuggingfunctions(seealso'undebug')deleteDeleteafiledirListfilesonafilesystemdisableTurnoffprivilegedcommandsdisconnectDisconnectanexistingnetworkconnectionenableTurnonprivilegedcommandseraseEraseafilesystemexitExitfromtheEXEChelpDescriptionoftheinteractivehelpsystem--More--路由器在特权模式下的命令清单只要输入部分命令串(唯一表示某个命令),紧接着按tab键就可以完整地输入一个命令showversion命令wg_ro_a#showversionCiscoInternetworkOperatingSystemSoftwareIOS(tm)2500Software(C2500-JS-L),Version12.0(3),RELEASESOFTWARE(fc1)Copyright(c)1986-1999byciscoSystems,Inc.CompiledMon08-Feb-9918:18byphanguyeImagetext-base:0x03050C84,data-base:0x00001000ROM:SystemBootstrap,Version11.0(10c),SOFTWAREBOOTFLASH:3000BootstrapSoftware(IGS-BOOT-R),Version11.0(10c),RELEASESOFTWARE(fc1)wg_ro_auptimeis20minutesSystemrestartedbyreloadSystemimagefileis"flash:c2500-js-l_120-3.bin"(outputomitted)--More--Configurationregisteris0x2102

查看配置情况控制台IOSSetuputilityshowstartup-configshowrunning-config将配置参数保存到NVRAM中ConfigConfigRAMNVRAMshowrunning

和showstartup

命令wg_ro_c#showstartup-configUsing1359outof32762bytes!version12.0! --More--wg_ro_c#showrunning-configBuildingconfiguration...

Currentconfiguration:

!

version12.0! --More--保存在NVRAM中保存在RAM中显示当前运行的和保存的配置情况路由器模式一览Router(config)#Router>enableRouter#configtermExitCtrl-Z(end)用户模式特权模式全局配置模式配置模式模式提示Interface Router(config-if)#Subinterface Router(config-subif)#Controller Router(config-controller)#Line Router(config-line)#Router Router(config-router)#IPXrouter Router(config-ipx-router)#保存配置wg_ro_c#wg_ro_c#copyrunning-configstartup-configDestinationfilename[startup-config]?Buildingconfiguration…wg_ro_c#将当前运行的配置复制到NVRAM中配置路由器的各种标识为路由器或其端口设置标识或信息路由器名Router(config)#hostnamewg_ro_cwg_ro_c(config)#开机时的固定显示信息wg_ro_c(config)#bannermotd#

AccountingDepartmentYouhaveenteredasecuredsystem.Authorizedaccessonly!

#配置路由器的各种标识为路由器或其端口设置标识或信息路由器名Router(config)#hostnamewg_ro_cwg_ro_c(config)#开机时的固定显示信息wg_ro_c(config)#bannermotd# AccountingDepartmentYouhaveenteredasecuredsystem.Authorizedaccessonly!

#端口描述wg_ro_c(config)#interfaceethernet0wg_ro_c(config-if)#descriptionEngineeringLAN,Bldg.18Router(config)#lineconsole0Router(config-line)#loginRouter(config-line)#passwordcisco控制台密码虚拟终端密码Router(config)#linevty04Router(config-line)#loginRouter(config-line)#passwordsanjose路由器密码配置Router(config)#lineconsole0Router(config-line)#loginRouter(config-line)#passwordcisco控制台密码虚拟终端密码Router(config)#linevty04Router(config-line)#loginRouter(config-line)#passwordsanjose特权模式明文密码Router(config)#enablepasswordcisco特权模式加密密码Router(config)#enablesecretsanfran

路由器密码配置其它控制台命令Router(config)#lineconsole0Router(config-line)#exec-timeout00Router(config)#lineconsole0Router(config-line)#loggingsynchronous禁止控制台会话自动退出重显被打乱的控制台输入Router(config)#interfacetypenumberRouter(config-if)#端口配置type

包括serial,ethernet,tokenring,fddi,hssi,loopback,dialer,null,async,atm,bri,andtunnelnumber

用来识别具体的单个端口Router(config-if)#exit从当前端口配置模式退出Router(config)#interfacetypeslot/portRouter(config-if)#模块化端口的表示法开启或关闭端口Router#configuretermRouter(config)#interfaceserial0

Router(config-if)#noshutdown%LINK-3-UPDOWN:InterfaceSeria0,changedstatetoup%LINEPROTO-5-UPDOWN:LineProtocolonInterfaceSerial0,changedstatetoup开启已经关闭的端口Router#configuretermRouter(config)#interfaceserial0

Router(config-if)#shutdown%LINK-5-CHANGED:InterfaceSerial0,changedstatetoadministrativelydown%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceSerial0,changedstatetodown人工关闭端口路由器的

showinterfaces

命令Router#showinterfacesEthernet0isup,lineprotocolisupHardwareisLance,addressis00e0.1e5d.ae2f(bia00e0.1e5d.ae2f)Internetaddressis1/24MTU1500bytes,BW10000Kbit,DLY1000usec,rely255/255,load1/255EncapsulationARPA,loopbacknotset,keepaliveset(10sec)ARPtype:ARPA,ARPTimeout04:00:00Lastinput00:00:07,output00:00:08,outputhangneverLastclearingof"showinterface"countersneverQueueingstrategy:fifoOutputqueue0/40,0drops;inputqueue0/75,0drops5minuteinputrate0bits/sec,0packets/sec5m

温馨提示

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

评论

0/150

提交评论