Cisco 路由器基本配置.ppt
Configuring a Router,路由器的配置途径:,通过console进行设置,这种方式是用户对路由器的主要设置方式。通过AUX端口连接Modem进行远程配置通过Telnet方式进行配置。可以在网络中任一位置对路由器进行配置,只要你密码及其权力。通过网管工作站进行配置,这就需要在您的网络中有至少一台运行Ciscoworks及CiscoView等的网管工作站。需要另外购买网管软件。通过tftp服务器下载路由器配置文件。可以用任何没有特殊格式的纯文本编辑器编辑路由器配置文件。并将其存放在TFTP服务器的根目录下,采用手支方式或Autoinstall方式下载路由器配置文件。,例:利用Console口的设置,选择PC机的COM1或COM2中,选用RJ45-DB9或RJ45-DB25的转换头与COM口连接,再将Console线接入Console口中,采用Console100终端方式,超级终端的配置如图:,通过Console和AUX连接,通过Control连接,使用X-modem连接,配置Xmodem CCNAv3.1 Semester2-5-2-6,show version Command,wg_ro_a#show versionCisco Internetwork Operating System Software IOS(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 phanguyeImage text-base:0 x03050C84,data-base:0 x00001000ROM:System Bootstrap,Version 11.0(10c),SOFTWAREBOOTFLASH:3000 Bootstrap Software(IGS-BOOT-R),Version 11.0(10c),RELEASE SOFTWARE(fc1)wg_ro_a uptime is 20 minutesSystem restarted by reloadSystem image file is flash:c2500-js-l_120-3.bin(output omitted)-More-Configuration register is 0 x2102,演示show version,通过show version 得到的信息:IOS版本以及注释信息 Bootstrap 的信息 Boot Rom的信息 上一次启动的方式 系统镜像文件的位置 路由器型号 寄存器地址 接口信息等,路由器配置的用户界面,1.用户模式和特权模式:(分别用来查看和更改路由器的配置)R o u t e r(用户模式)R o u t e r#(特权模式)2.各种配置模式(用来进行各种配置操作)Router(config)#(全局模式)Router(config-router)#(路由协议模式)Router(config-if)#(路由接口模式)Router(config-subif)#(路由子接口配置模式)Router(config-line)#(配置line模式)典型的CLI界面,与DOS相似,提高了配置难度。,R o u t e r(用户模式),R o u t e r#(特权模式),Router(config)#(全局模式),Router(config-router)#(路由协议配置模式),Router(config-if)#(路由接口配置模式),Router(config-subif)#(路由子接口配置模式),Router(config-line)#(line配置模式),disable,enable,Configure terminal,exit或end或ctrl+z,exit,exit,exit,exit,subif sube0,int e0,router rip,Line vty0 4,Overview of Router Modes,Bootup Output from the Router,Unconfigured Versus Configured Router,Setup:The Initial Configuration Dialog,Router#setup-System Configuration Dialog-Continue with configuration dialog?yes/no:yesAt any point you may enter a question mark?for help.Use ctrl-c to abort configuration dialog at any prompt.Default settings are in square brackets.Basic management setup configures only enough connectivityfor management of the system,extended setup will ask youto configure each interface on the systemWould you like to enter basic management setup?yes/no:no,Setup Initial Global Parameters,Configuring global parameters:Enter host name Router:wg_ro_c 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:cisco 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:sanfran The virtual terminal password is used to protect access to the router over a network interface.Enter virtual terminal password:sanjose Configure SNMP Network Management?no:,Setup Initial Protocol Configurations,Configure LAT?yes:no Configure AppleTalk?no:Configure DECnet?no:Configure IP?yes:Configure IGRP routing?yes:no Configure RIP routing?no:Configure CLNS?no:Configure IPX?no:Configure Vines?no:Configure XNS?no:Configure Apollo?no:,Setup Script Review and Use,The following configuration command script was created:hostname Routerenable secret 5$1$/CCk$4r7zDwDNeqkxFO.kJxC3G0enable password sanfranline vty 0 4password sanjoseno snmp-server!no appletalk routingno decnet routingip routingno clns routingno ipx routingno vines routingno xns routingno apollo routingisdn switch-type basic-5ess,interface BRI0shutdownno ip address!interface Ethernet0no shutdownip address 10.1.1.31 255.255.255.0no mop enabled!interface Serial0shutdownno ip addressend0 Go to the IOS command prompt without saving this config.1 Return back to the setup without saving this config.2 Save this configuration to nvram and exit.Enter your selection 2:,演示 setup 模式配置,Logging In to the Router,Router User-Mode Command List,You can abbreviate a command to the fewest characters that make a unique character string.,wg_ro_c?Exec commands:access-enable Create a temporary Access-List entry atmsig Execute Atm Signalling Commands cd Change current device clear Reset functions connect Open a terminal connection dir List files on given device disable Turn off privileged commands disconnect Disconnect an existing network connection enable Turn on privileged commands exit Exit from the EXEC help Description of the interactive help system lat Open a lat connection lock Lock the terminal login Log in as a particular user logout Exit from the EXEC-More-,Router Privileged-Mode Command List,wg_ro_c#?Exec commands:access-enable Create a temporary Access-List entry access-profile Apply user-profile to interface access-template Create a temporary Access-List entry bfe For manual emergency modes setting cd Change current directory clear Reset functions clock Manage the system clock configure Enter configuration mode connect Open a terminal connection copy Copy from one file to another debug Debugging functions(see also undebug)delete Delete a file dir List files on a filesystem disable Turn off privileged commands disconnect Disconnect an existing network connection enable Turn on privileged commands erase Erase a filesystem exit Exit from the EXEC help Description of the interactive help system-More-,You can complete a command string by entering the unique character string,then pressing the Tab key.,Router Command-Line Help Facilities,Context-Sensitive Help,Console Error Messages,Identifies problems with router commands that are incorrectly entered so you can alter or correct them,Allows recall of long or complex commands or entries for reentry,review,or correction,Command History Buffer,Provides a list of commands and the arguments associated with a specific command,Router Context-Sensitive Help,Router#,clok,Translating CLOK,%Unknown command or computer name,or unable to find computer address,Router#,cl?,clear clock,Router#,clock,%Incomplete command.,Router#,clock?,set Set the time and date,Router#,clock set,%Incomplete command.,Router#,clock set?,hh:mm:ss Current Time,Symbolic Translation Command Prompting Last Command Recall,Router Context-Sensitive Help(cont.),Router#clok,Translating CLOK,%Unknown command or computer name,or unable to find computer address,Router#,clear clock,Router#,%Incomplete command.,Router#,set Set the time and date,Router#,%Incomplete command.,Router#,hh:mm:ss Current Time,Router#,clock set 19:56:00,%Incomplete command.,Router#,clock set 19:56:00?,Day of the month,MONTH Month of the year,Router#,clock set 19:56:00 04 8,%Invalid input detected at the marker,Router#,clock set 19:56:00 04 August,%Incomplete command.,Router#,clock set 19:56:00 04 August?,Year,Command PromptingSyntax CheckingCommand Prompting,演示clock配置,Saving Configurations,wg_ro_c#wg_ro_c#copy running-config startup-configDestination filename startup-config?Building configurationwg_ro_c#,Copies the current configuration to NVRAMNVRAM,非易失性内存,断电信息不会丢失,存储用户配置文件RAM,随机存储器,断电信息全部丢失startup-config 在每次路由器或是交换机启动时候,会主动加载,Configuring Router Identification,Sets the local identity or message for the accessed router or interface,Configuring a Router Password,Other Console-Line Commands,Router(config)#line console 0Router(config-line)#exec-timeout 0 0,Prevents console session timeout,Configuring an Interface,Router(config)#interface type numberRouter(config-if)#,type includes serial,ethernet,token ring,fddi,hssi,loopback,dialer,null,async,atm,bri,tunnel,and so onnumber is used to identify individual interfaces,Quits from current interface configuration mode,Router(config)#interface type slot/portRouter(config-if)#,For modular routers,selects an interface,Configuring a Serial Interface,Enter Global Configuration Mode,Router(config-if)#clock rate 64000Router(config-if)#,Router(config)#interface serial 0 Router(config-if)#,Router#configure terminalRouter(config)#,Router(config-if)#bandwidth 64Router(config-if)#exitRouter(config)#exitRouter#,Specify Interface,Set Clock Rate(on DCE interfaces only),Set Bandwidth(recommended),Ethernet media-type Command,Router(config)#interface ethernet 2 Router(config-if)#media-type 10baset,Selects the media-type connector for the Ethernet interface,Disabling or Enabling an Interface,Router#configure terminalRouter(config)#interface serial 0 Router(config-if)#no shutdown%LINK-3-UPDOWN:Interface Seria0,changed state to up%LINEPROTO-5-UPDOWN:Line Protocol on Interface Serial0,changed state to up,Enables an interface that is administratively shut down,Router#configure terminalRouter(config)#interface serial 0 Router(config-if)#shutdown%LINK-5-CHANGED:Interface Serial0,changed state to administratively down%LINEPROTO-5-UPDOWN:Line protocol on Interface Serial0,changed state to down,Administratively turns off an interface,END,