原版CCNA教材- 操作與配置Cisco IOS設(shè)備_第1頁
原版CCNA教材- 操作與配置Cisco IOS設(shè)備_第2頁
原版CCNA教材- 操作與配置Cisco IOS設(shè)備_第3頁
原版CCNA教材- 操作與配置Cisco IOS設(shè)備_第4頁
原版CCNA教材- 操作與配置Cisco IOS設(shè)備_第5頁
已閱讀5頁,還剩65頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、第六章操作與配置Cisco IOS設(shè)備本章目標(biāo)通過本章的學(xué)習(xí),您應(yīng)該掌握以下內(nèi)容:開啟交換機和路由器并觀察其啟動過程注意交換機的出廠初始配置情況,完成路由器的初始參數(shù)配置在網(wǎng)絡(luò)設(shè)備上進(jìn)入并辨識不同的命令模式在不同的用戶界面下應(yīng)用各種幫助和命令行編輯功能查看并確認(rèn)并于各網(wǎng)絡(luò)設(shè)備的根本信息Cisco IOS 軟件提供多種網(wǎng)絡(luò)效勞進(jìn)而支持各種網(wǎng)絡(luò)應(yīng)用.Cisco 互連網(wǎng)操作系統(tǒng)(IOS)軟件網(wǎng)絡(luò)設(shè)備的配置基于以下各方面來配置設(shè)備: 所需功能的網(wǎng)絡(luò)策略 與協(xié)議關(guān)聯(lián)的地址和相關(guān)參數(shù) 管理方面的需要 交換機將出廠缺省設(shè)置作為初始配置如果路由器中沒有配置文件,會提示進(jìn)入初始化設(shè)置過程 硬件自檢定位并加載Ci

2、sco IOS映象文件定位并運行配置文件Cisco設(shè)備的簡單啟動過程可以通過多種途徑來配置配置直接在設(shè)備的內(nèi)存中生效控制端口Aux 端口端口PC or Unix效勞器Web 或網(wǎng)絡(luò)管理效勞器 虛擬終端多種途徑的配置TelnetTFTP提供命令行界面(CLI)在不同的網(wǎng)絡(luò)設(shè)備上運行時有差異 在命令模式下可以鍵入或粘貼命令 鍵入命令后回車,設(shè)備即解析和執(zhí)行所鍵入的命令兩個主要命令模式是用戶模式和特權(quán)模式不同的命令模式有不同的提示符CiscoIOSCisco IOS用戶界面的根本特性用戶模式對交換機和路由器的有限操作命令提示符為 主機名主要有兩個命令模式提供命令鍵入.模式一:Cisco IOS的主要

3、命令模式特權(quán)(或enabled)模式對交換機和路由器更深入的操作有配置和監(jiān)視權(quán)力是進(jìn)入其它配置模式的前提命令提示符為 主機名#模式二 (也是最常用的模式):Cisco IOS的主要命令模式(續(xù))系統(tǒng)啟動例程會初始化交換機初始啟動利用缺省配置參數(shù)1. 啟動前確認(rèn)正確連接線纜和控制線2. 接入電源3. 觀察啟動順序面板上的指示燈LEDsCisco IOS輸出到控制臺上的內(nèi)容交換機的初始啟動檢查交換機指示燈(LEDs)Redundant Power Supply LED交換機自檢期間的端口指示燈 1. 啟動時,所有端口指示燈變綠.2. 每個端口自檢完畢,對應(yīng)的指示燈熄滅.3. 如果端口自檢失敗, 對

4、應(yīng)指示燈呈黃色.4. 如果有任何自檢失敗情況,系統(tǒng)指示燈呈現(xiàn)黃色.5. 如果沒有自檢失敗, 自檢過程完成.6. 隨著自檢過程的完成, 指示燈閃亮后熄滅.交換機初次啟動時的顯示信息控制臺連接Catalyst 1900 Management ConsoleCopyright (c) Cisco Systems, Inc. 1993-1998All rights reserved.Enterprise Edition SoftwareEthernet Address: 00-50-BD-73-E2-C0PCA Number: 73-3121-01PCA Serial Number: FAA0252A

5、0QXModel Number: WS-C1924-ENSystem Serial Number: FAA0304S0U3Power Supply S/N: PHI025101F3-1 user(s) now active on Management Console. User Interface Menu M Menus K Command Line I IP ConfigurationEnter Selection: 控制臺登入交換機并鍵入特權(quán)模式密碼 enableEnter password:# disable quit用戶模式提示特權(quán)模式提示上下文關(guān)聯(lián)幫助錯誤信息提示指出所輸入交換機命

6、令的錯誤所在,以便于修改或糾正.可以重新調(diào)出一個較長或較復(fù)雜的命令或其它內(nèi)容,用來再次運行、查看或修改. 之前命令保存區(qū)交換機命令行幫助機制提供命令清單和與特定命令相關(guān)聯(lián)的參數(shù). Switch#show interfacesSwitch#show version顯示交換機初始啟動的狀態(tài)Switch#show running-config顯示交換機的各種運行狀態(tài)wg_sw_c#show versionCisco Catalyst 1900/2820 Enterprise Edition SoftwareCopyright (c) Cisco Systems, Inc. 1993-1998wg_s

7、w_c uptime is 15day(s) 21hour(s) 53minute(s) 11second(s) cisco Catalyst 1900 (486sxl) processor with 2048K/1024K bytes of memoryHardware board revision is 5Upgrade Status: No upgrade currently in progress. Config File Status: No configuration upload/download is in progress 27 Fixed Ethernet/IEEE 802

8、.3 interface(s)Base Ethernet Address: 00-50-BD-73-E2-C0交換機之show version 命令wg_sw_c #show runBuilding configuration.Current configuration:!hostname wg_sw_c!ipip!interface Ethernet 0/1interface Ethernet 0/24!Interface Ethernet 0/25!interface FastEthernet 0/26!interface FastEthernet 0/27交換機之show running

9、-configuration 命令wg_sw_c#show runBuilding configuration.Current configuration:!hostname wg_sw_c!ipip!interface Ethernet 0/1interface Ethernet 0/12!Interface Ethernet 0/25!interface FastEthernet 0/26!interface FastEthernet 0/27Catalyst 1924Catalyst 1912wg_sw_c#show interfaces ethernet 0/1Ethernet 0/1

10、 is Enabled Hardware is Built-in 10Base-TMTU 1500 bytes, BW 10000 Kbits802.1d STP State: Forwarding Forward Transitions: 1Port monitoring: DisabledUnknown unicast flooding: Enabled Unregistered multicast flooding: Enabled Description: Duplex setting: Half duplex Back pressure: Disabled-More-交換機之show

11、 interfaces命令wg_sw_a#show ip interface vlan 1Management VLAN: 1Domain name: HTTP server : EnabledHTTP port : 80RIP : Enabledwg_sw_a#查看交換機的IP地址配置模式:全局配置模式 wg_sw_a# conf termwg_sw_a(config)#端口配置模式1900(config)# interface ethernet 0/11900(config-if)#2950(config)#interface fastEthernet 0/12950(config-if)

12、#配置交換機配置交換機的各種標(biāo)識為交換機設(shè)置本地標(biāo)識交換機名(config)#hostname wg_sw_cwg_sw_c(config)#1900(config)# ip address ip address mask配置交換機IP地址2950(config)#interface vlan 12950(config-if)#ip add配置交換機默認(rèn)網(wǎng)關(guān)2950(config-if)#exit系統(tǒng)啟動例程會初始化路由器如果需要,路由器可以有選擇性地回退啟動Check hardwareFind and load Cisco IOSsoftware image Find and apply r

13、outerconfiguration information Load Bootstrap1.啟動前確認(rèn)正確連接線纜和控制線2.按下電源開關(guān)3.觀察啟動順序 Cisco IOS輸出到控制臺上的內(nèi)容Cisco路由器的初始啟動沒有配置文件與有配置文件的路由器啟動比照- System Configuration Dialog -% Please answer yes or noContinue with configuration dialog? yes/no:yes At any point you may enter a question mark ? for help.Use ctrl-c t

14、o abort configuration dialog at any prompt.Default settings are in square brackets .Setup模式wg_ro_c con0 is now availablePress RETURN to get started.用戶模式提示wg_ro_c路由器啟動時在控制臺上的輸出內(nèi)容控制臺Setup: 初始配置對話框 Router#setup - System Configuration Dialog -Continue with configuration dialog? yes/no: yAt any point you

15、 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

16、like to enter basic management setup? yes/no: n預(yù)先瀏覽端口配置情況First, would you like to see the current interface summary? yes:Interface IP-Address OK? Method Status ProtocolBRI0 unassigned YES unset administratively down downBRI0:1 unassigned YES unset administratively down downBRI0:2 unassigned YES unse

17、t administratively down downEthernet0 unassigned YES unset administratively down downSerial0 unassigned YES unset administratively down down自檢過程中所找到的端口設(shè)置全局參數(shù)初始化全局參數(shù)Configuring global parameters: Enter host name Router:wg_ro_c The enable secret is a password used to protect access to privileged EXEC

18、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

19、 terminal password is used to protect access to the router over a network interface. Enter virtual terminal password: sanjose Configure SNMP Network Management? no:設(shè)置全局參數(shù)(續(xù))初始化協(xié)議配置 Configure LAT? yes: n Configure AppleTalk? no: Configure DECnet? no: Configure IP? yes: Configure IGRP routing? yes: n

20、Configure RIP routing? no: Configure CLNS? no: Configure IPX? no: Configure Vines? no: Configure XNS? no: Configure Apollo? no:設(shè)置端口參數(shù)BRI interface needs isdn switch-type to be configured Valid switch types are : 0 none.Only if you dont want to configure BRI. 1 basic-1tr6.1TR6 switch type for Germany

21、 2 basic-5ess.AT&T 5ESS switch type for the US/Canada 3 basic-dms100.Northern DMS-100 switch type for US/Canada 4 basic-net3.NET3 switch type for UK and Europe 5 basic-ni.National ISDN switch type 6 basic-ts013.TS013 switch type for Australia 7 ntt.NTT switch type for Japan 8 vn3.VN3 and VN4 switch

22、types for France Choose ISDN BRI Switch Type 2:Configuring interface parameters:Do you want to configure BRI0 (BRI d-channel) interface? no:Do you want to configure Ethernet0 interface? no: y Configure IP on this interface? no: y IP address for this interface: Subnet mask for this interface : Class

23、A network is , 24 subnet bits; mask is /24Do you want to configure Serial0 interface? no:設(shè)置腳本確實認(rèn)與應(yīng)用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 routin

24、gno decnet routingip routingno clns routingno ipx routingno vines routingno xns routingno apollo routingisdn switch-type basic-5essinterface BRI0shutdownno ip address!interface Ethernet0no shutdownipno mop enabled!interface Serial0shutdownno ip addressend0 Go to the IOS command prompt without saving

25、 this config.1 Return back to the setup without saving this config.2 Save this configuration to nvram and exit.Enter your selection 2:Consolewg_ro_cwg_ro_cenablewg_ro_c#wg_ro_c#disablewg_ro_cwg_ro_clogoutwg_ro_c con0 is now availablePress RETURN to get started.用戶模式提示特權(quán)模式提示登入路由器 只要所輸命令串在全部命令中是唯一的,可以將

26、一個命令盡可能地簡寫,路由器在用戶模式下的命令清單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 D

27、isconnect 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 -wg_ro_c#?Exec commands: access-enabl

28、e 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

29、 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 f

30、ilesystem exit Exit from the EXEC help Description of the interactive help system- More -路由器在特權(quán)模式下的命令清單只要輸入局部命令串(唯一表示某個命令),緊接著按tab鍵就可以完整地輸入一個命令路由器命令行幫助機制上下文關(guān)聯(lián)幫助錯誤信息提示指出所輸入交換機命令的錯誤所在,以便于修改或糾正.可以重新調(diào)出一個較長或較復(fù)雜的命令或其它內(nèi)容,用來再次運行、查看或修改. 之前命令保存區(qū)提供命令清單和與特定命令相關(guān)聯(lián)的參數(shù). 路由器的上下文相關(guān)聯(lián)幫助Router# clokTranslating CLOK% Unk

31、nown command or computer name, or unable to find computer addressRouter# cl?clear clockRouter# clock% Incomplete command.Router# clock ?set Set the time and dateRouter# clock set% Incomplete command.Router# clock set ?hh:mm:ss Current Time 符號解析命令提示調(diào)出最近用過的內(nèi)容路由器的上下文相關(guān)聯(lián)幫助(續(xù))Router# clokTranslating CLOK

32、% Unknown command or computer name, or unable to find computer addressRouter# clear clockRouter# % Incomplete command.Router# set Set the time and dateRouter# % Incomplete command.Router# hh:mm:ss Current TimeRouter# clock set 19:56:00% Incomplete command.Router# clock set 19:56:00 ? Day of the mont

33、hMONTH Month of the yearRouter# clock set 19:56:00 04 8 % Invalid input detected at the markerRouter# clock set 19:56:00 04 August% Incomplete command.Router# clock set 19:56:00 04 August ? Year命令提示語法檢查命令提示RouterShape the future of internetworking by creating unpreced使用增強的編輯命令“Shape the future of in

34、ternetworking by creating unprecedented value for customers, employees, and partners.上述文字段在輸入時會超出一行Router$ future of internetworking by creating unprecedented op使用增強的編輯命令(一行中長字串會自動滾卷).RouterShape the value of internetworking by creating unpreced使用增強的編輯命令(一行中長字串會自動滾卷).光標(biāo)移動到命令行的開始位置.Router$ value for

35、customers, employees, and partners.使用增強的編輯命令(一行中長字串會自動滾卷).光標(biāo)移動到命令行的開始位置.光標(biāo)移動到命令行的結(jié)束位置.使用增強的編輯命令(一行中長字串會自動滾卷).光標(biāo)移動到命令行的開始位置.光標(biāo)移動到命令行的結(jié)束位置.回移一個字符Router$ value for customers, employees, and partners.使用增強的編輯命令(一行中長字串會自動滾卷).光標(biāo)移動到命令行的開始位置.光標(biāo)移動到命令行的結(jié)束位置.回移一個字符.下移一個字符.Router$ value for customers, employees,

36、 and partners.使用增強的編輯命令(一行中長字串會自動滾卷).光標(biāo)移動到命令行的開始位置.光標(biāo)移動到命令行的結(jié)束位置.下移一個字符.回移一個字符.Router$ value for customers, employees, and partners.使用增強的編輯命令(一行中長字串會自動滾卷).光標(biāo)移動到命令行的開始位置.光標(biāo)移動到命令行的結(jié)束位置.回移一個單詞下移一個字符.回移一個字符.下移一個單詞Router$ value for customers, employees, and partners.(一行中長字串會自動滾卷).光標(biāo)移動到命令行的開始位置.光標(biāo)移動到命令行的結(jié)

37、束位置.回移一個單詞下移一個字符.回移一個字符.下移一個單詞使用增強的編輯命令刪除當(dāng)前字符Router$ value for customers, employees, and partners.Ctrl-P or Up arrow調(diào)出最近(前一)使用過的命令Ctrl-N or Down arrow調(diào)出最近使用過的命令Router show history顯示命令保存區(qū)內(nèi)容Router terminal history size lines 設(shè)置命令保存區(qū)大小回覽之前用過的命令show version 命令wg_ro_a#show versionCisco Internetwork Opera

38、ting 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

39、 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查看配置情況控制臺IOSSetup utilityshowstartup-configshowrunning-config將配置參數(shù)保存到N

40、VRAM中ConfigConfigRAMNVRAMshow running 和 show startup 命令wg_ro_c#show startup-configUsing 1359 out of 32762 bytes!version 12.0!- More -wg_ro_c#show running-configBuilding configuration.Current configuration:!version 12.0!- More -保存在NVRAM中保存在RAM中顯示當(dāng)前運行的和保存的配置情況路由器模式一覽Router(config)#RouterenableRouter#c

41、onfig termExitCtrl-Z (end)用戶模式特權(quán)模式全局配置模式配置模式模式提示InterfaceRouter(config-if)#SubinterfaceRouter(config-subif)#ControllerRouter(config-controller)#LineRouter(config-line)#RouterRouter(config-router)#IPX router Router(config-ipx-router)#保存配置wg_ro_c#wg_ro_c#copy running-config startup-configDestination f

42、ilename startup-config?Building configurationwg_ro_c#將當(dāng)前運行的配置復(fù)制到NVRAM中配置路由器的各種標(biāo)識為路由器或其端口設(shè)置標(biāo)識或信息路由器名Router(config)#hostname wg_ro_cwg_ro_c(config)#開機時的固定顯示信息wg_ro_c(config)#banner motd # Accounting Department You have entered a secured system. Authorized access only! #配置路由器的各種標(biāo)識為路由器或其端口設(shè)置標(biāo)識或信息路由器名Rou

43、ter(config)#hostname wg_ro_cwg_ro_c(config)#開機時的固定顯示信息wg_ro_c(config)#banner motd # Accounting Department You have entered a secured system. Authorized access only! #端口描述wg_ro_c(config)#interface ethernet 0wg_ro_c(config-if)#description This is LAN InterfaceRouter(config)#line console 0Router(config

44、-line)#loginRouter(config-line)#password cisco控制臺密碼虛擬終端密碼Router(config)#line vty 0 4Router(config-line)#login Router(config-line)#password sanjose路由器密碼配置Router(config)#line console 0Router(config-line)#loginRouter(config-line)#password cisco控制臺密碼虛擬終端密碼Router(config)#line vty 0 4Router(config-line)#l

45、ogin Router(config-line)#password sanjose特權(quán)模式明文密碼Router(config)#enable password cisco特權(quán)模式加密密碼Router(config)#enable secret sanfran路由器密碼配置其它控制臺命令Router(config)#line console 0Router(config-line)#exec-timeout 0 0 Router(config)#line console 0Router(config-line)#logging synchronous禁止控制臺會話自動退出重顯被打亂的控制臺輸入R

46、outer(config)#interface type numberRouter(config-if)#端口配置type 包括 serial, ethernet, token ring, fddi, hssi, loopback, dialer, null, async, atm, bri, and tunnelnumber 用來識別具體的單個端口Router(config-if)#exit從當(dāng)前端口配置模式退出Router(config)#interface type slot/portRouter(config-if)#模塊化端口的表示法配置串口進(jìn)入全局配置模式Router(config

47、)#interface serial 0 Router(config-if)#Router#configure termRouter(config)#指定某個端口配置串口進(jìn)入全局配置模式Router(config-if)#clock rate 64000Router(config-if)#Router(config)#interface serial 0 Router(config-if)#Router#configure termRouter(config)#Router(config-if)#bandwidth 64Router(config-if)#exitRouter(config)#

48、exitRouter#指定某個端口設(shè)置時鐘頻率 (只在DCE端)帶寬 (建議)Router#show interface serial 0Serial0 is up, line protocol is up Hardware is HD64570 MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input 00:00:09, output 00:00:04, output h

49、ang never Last clearing of show interface counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/m

50、ax allocated) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec(output omitted) 確認(rèn)參數(shù)修改情況以太網(wǎng)的 media-type 命令Router(config)#interface ethernet 0Router(config-if)#media-type 10baseTRouter(config-if)#media-type AUI為以太網(wǎng)端口選擇適當(dāng)?shù)慕橘|(zhì)類型開啟或關(guān)閉端口Router#configure termRoute

51、r(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 開啟已經(jīng)關(guān)閉的端口Router#configure termRouter(config)#interface serial 0 Router(config-if)#shutdown%LINK-5-CHANGED: Inter

52、face Serial0, changed state to administratively down %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down 人工關(guān)閉端口路由器的 show interfaces 命令Router#show interfacesEthernet0 is up, line protocol is up Hardware is Lance, address is 00e0.1e5d.ae2f (bia 00e0.1e5d.ae2f) MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255 Encapsulation ARPA, loopback not set, keepalive

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論