




已閱讀5頁,還剩65頁未讀, 繼續(xù)免費閱讀
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
第四章 操作與配置 Cisco IOS設備,本章目標,通過本章的學習,您應該掌握以下內容: 開啟交換機和路由器并觀察其啟動過程 注意交換機的出廠初始配置情況,完成路由器的初始參數(shù)配置 在網(wǎng)絡設備上進入并辨識不同的命令模式,本章目標(續(xù)),在不同的用戶界面下應用各種幫助和命令行編輯功能 查看并確認并于各網(wǎng)絡設備的基本信息,Cisco IOS 軟件提供多種網(wǎng)絡服務進而支持各種網(wǎng)絡應用.,Cisco 互連網(wǎng)操作系統(tǒng)(IOS)軟件,網(wǎng)絡設備的配置,基于以下各方面來配置設備: 所需功能的網(wǎng)絡策略 與協(xié)議關聯(lián)的地址和相關參數(shù) 管理方面的需要 交換機將出廠缺省設置作為初始配置 如果路由器中沒有配置文件,會提示進入初始化設置過程,硬件自檢 定位并加載Cisco IOS映象文件 定位并運行配置文件,Cisco設備的簡單啟動過程,可以通過多種途徑來配置 配置直接在設備的內存中生效,控制端口,Aux 端口,端口,PC or Unix服務器,Web 或網(wǎng)絡管 理服務器,虛擬終端,多種途徑的配置,Telnet,TFTP,提供命令行界面 在不同的網(wǎng)絡設備上運行時有差別 在命令模式下可以鍵入或粘貼命令 鍵入命令后回車,設備即解析和執(zhí)行所鍵入的命令 兩個主要命令模式是用戶模式和特權模式 不同的命令模式有不同的提示符,Cisco IOS,Cisco IOS用戶界面的基本特性,用戶模式 對交換機和路由器的有限操作 命令提示符為 主機名,主要有兩個命令模式提供命令鍵入.,模式一:,Cisco IOS的主要命令模式,特權(或enable)模式 對交換機和路由器更深入的操作 有配置和監(jiān)視權力 是進入其它配置模式的前提 命令提示符為 主機名#,模式二 (也是最常用的模式):,Cisco IOS的主要命令模式(續(xù)),系統(tǒng)啟動例程會初始化交換機 初始啟動利用缺省配置參數(shù),1. 啟動前確認正確連接線纜和控制線 2. 接入電源 3. 觀察啟動順序 面板上的指示燈LEDs Cisco IOS輸出到控制臺上的內容,交換機的初始啟動,檢查交換機指示燈(LEDs),交換機自檢期間的端口指示燈,1. 啟動時,所有端口指示燈變綠. 2. 每個端口自檢完畢,對應的指示燈熄滅. 3. 如果端口自檢失敗, 對應指示燈呈黃色. 4. 如果有任何自檢失敗情況,系統(tǒng)指示燈呈現(xiàn)黃色. 5. 如果沒有自檢失敗, 自檢過程完成. 6. 隨著自檢過程的完成, 指示燈閃亮后熄滅.,交換機初次啟動時的顯示信息,控制臺連接,Catalyst 1900 Management Console Copyright (c) Cisco Systems, Inc. 1993-1998 All rights reserved. Enterprise Edition Software Ethernet Address: 00-50-BD-73-E2-C0 PCA Number: 73-3121-01 PCA Serial Number: FAA0252A0QX Model Number: WS-C1924-EN System Serial Number: FAA0304S0U3 Power Supply S/N: PHI025101F3 - 1 user(s) now active on Management Console. User Interface Menu M Menus K Command Line I IP Configuration Enter Selection:,控制臺,登入交換機并鍵入特權模式密碼, enable Enter password: # # disable quit,用戶模式提示,特權模式提示,上下文關聯(lián)幫助,錯誤信息提示,指出所輸入交換機命令的錯誤所在,以便于修改或糾正.,可以重新調出一個較長或較復雜的命令或其它內容,用來再次運行、查看或修改.,之前命令保存區(qū),交換機命令行幫助機制,提供命令清單和與特定命令相關聯(lián)的參數(shù).,Switch#show interfaces,Switch#show version,顯示交換機初始啟動的狀態(tài),Switch#show running-config,顯示交換機的各種運行狀態(tài),wg_sw_c#show version Cisco Catalyst 1900/2820 Enterprise Edition Software Version V8.01.01 written from 171.068.229.225 Copyright (c) Cisco Systems, Inc. 1993-1998 wg_sw_c uptime is 15day(s) 21hour(s) 53minute(s) 11second(s) cisco Catalyst 1900 (486sxl) processor with 2048K/1024K bytes of memory Hardware board revision is 5 Upgrade Status: No upgrade currently in progress. Config File Status: No configuration upload/download is in progress 27 Fixed Ethernet/IEEE 802.3 interface(s) Base Ethernet Address: 00-50-BD-73-E2-C0,交換機之show version 命令,wg_sw_c#show run Building configuration. Current configuration: ! hostname “wg_sw_c“ ! ip address 3 ip default-gateway ! interface Ethernet 0/1 interface Ethernet 0/24 ! Interface Ethernet 0/25 ! interface FastEthernet 0/26 ! interface FastEthernet 0/27,交換機之show running-configuration 命令,wg_sw_c#show run Building configuration. Current configuration: ! hostname “wg_sw_c“ ! ip address 3 ip default-gateway ! interface Ethernet 0/1 interface Ethernet 0/12 ! Interface Ethernet 0/25 ! interface FastEthernet 0/26 ! interface FastEthernet 0/27,Catalyst 1924,Catalyst 1912,wg_sw_c#show interfaces ethernet 0/1 Ethernet 0/1 is Enabled Hardware is Built-in 10Base-T Address is 0050.BD73.E2C1 MTU 1500 bytes, BW 10000 Kbits 802.1d STP State: Forwarding Forward Transitions: 1 Port monitoring: Disabled Unknown unicast flooding: Enabled Unregistered multicast flooding: Enabled Description: Duplex setting: Half duplex Back pressure: Disabled -More-,交換機之show interfaces命令,wg_sw_a#show ip IP Address: 1 Subnet Mask: Default Gateway: Management VLAN: 1 Domain name: Name server 1: Name server 2: HTTP server : Enabled HTTP port : 80 RIP : Enabled wg_sw_a#,查看交換機的IP地址,配置模式: 全局配置模式 wg_sw_a# conf term wg_sw_a(config)# 端口配置模式 wg_sw_a(config)# interface e0/1 wg_sw_a(config-if)#,配置交換機,配置交換機的各種標識,為交換機設置本地標識,wg_sw_a(config)# ip address ip address mask,wg_sw_a(config)#ip address 1 ,配置交換機IP地址,系統(tǒng)啟動例程會初始化路由器 如果需要,路由器可以有選擇性地回退啟動,Check hardware,Find and load Cisco IOS software image,Find and apply router configuration information,Load Bootstrap,1. 啟動前確認正確連接線纜和控制線 2. 按下電源開關 3. 觀察啟動順序 Cisco IOS輸出到控制臺上的內容,Cisco路由器的初始啟動,沒有配置文件與有配置文件的路由器啟動對比,- System Configuration Dialog - Continue with configuration dialog? yes/no:yes At 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 .,Setup模式,wg_ro_c con0 is now available Press RETURN to get started.,wg_ro_c,路由器啟動時在控制臺上的輸出內容,控制臺,Setup: 初始配置對話框,Router#setup - System Configuration Dialog - Continue with configuration dialog? yes/no: y At 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 connectivity for management of the system, extended setup will ask you to configure each interface on the system Would you like to enter basic management setup? yes/no: n,預先瀏覽端口配置情況,First, would you like to see the current interface summary? yes: Interface IP-Address OK? Method Status Protocol BRI0 unassigned YES unset administratively down down BRI0:1 unassigned YES unset administratively down down BRI0:2 unassigned YES unset administratively down down Ethernet0 unassigned YES unset administratively down down Serial0 unassigned YES unset administratively down down,自檢過程中所找到的端口,設置全局參數(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 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:,設置全局參數(shù)(續(xù)),初始化協(xié)議配置,Configure LAT? yes: n Configure AppleTalk? no: Configure DECnet? no: Configure IP? yes: Configure IGRP routing? yes: n Configure RIP routing? no: Configure CLNS? no: Configure IPX? no: Configure Vines? no: Configure XNS? no: Configure Apollo? no:,設置端口參數(shù),BRI interface needs isdn switch-type to be configured Valid switch types are : 0 noneOnly if you dont want to configure BRI. 1 basic-1tr61TR6 switch type for Germany 2 basic-5essAT mask is /24 Do you want to configure Serial0 interface? no:,設置腳本的確認與應用,The following configuration command script was created: hostname Router enable secret 5 $1$/CCk$4r7zDwDNeqkxFO.kJxC3G0 enable password sanfran line vty 0 4 password sanjose no snmp-server ! no appletalk routing no decnet routing ip routing no clns routing no ipx routing no vines routing no xns routing no apollo routing isdn switch-type basic-5ess,interface BRI0 shutdown no ip address ! interface Ethernet0 no shutdown ip address 1 no mop enabled ! interface Serial0 shutdown no ip address end 0 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:,Console,wg_ro_c wg_ro_cenable wg_ro_c# wg_ro_c#disable wg_ro_c wg_ro_clogout,wg_ro_c con0 is now available Press RETURN to get started.,用戶模式提示,特權模式提示,登入路由器,只要所輸命令串在全部命令中是唯一的,可以將一個命令盡可能地簡寫,,路由器在用戶模式下的命令清單,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 -,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 -,路由器在特權模式下的命令清單,只要輸入部分命令串(唯一表示某個命令),緊接著按tab鍵就可以完整地輸入一個命令,路由器命令行幫助機制,上下文關聯(lián)幫助,錯誤信息提示,指出所輸入交換機命令的錯誤所在,以便于修改或糾正.,可以重新調出一個較長或較復雜的命令或其它內容,用來再次運行、查看或修改.,之前命令保存區(qū),提供命令清單和與特定命令相關聯(lián)的參數(shù).,路由器的上下文相關聯(lián)幫助,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,符號解析 命令提示 調出最近用過的內容,路由器的上下文相關聯(lián)幫助(續(xù)),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,命令提示 語法檢查 命令提示,RouterShape the future of internetworking by creating unpreced,使用增強的編輯命令,“Shape the future of internetworking 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,使用增強的編輯命令,(一行中長字串會自動滾卷).,光標移動到命令行的開始位置.,Router$ value for customers, employees, and partners.,使用增強的編輯命令,(一行中長字串會自動滾卷).,光標移動到命令行的開始位置.,光標移動到命令行的結束位置.,使用增強的編輯命令,(一行中長字串會自動滾卷).,光標移動到命令行的開始位置.,光標移動到命令行的結束位置.,回移一個單詞,Router$ value for customers, employees, and partners.,使用增強的編輯命令,(一行中長字串會自動滾卷).,光標移動到命令行的開始位置.,光標移動到命令行的結束位置.,回移一個單詞.,下移一個字符.,Router$ value for customers, employees, and partners.,使用增強的編輯命令,(一行中長字串會自動滾卷).,光標移動到命令行的開始位置.,光標移動到命令行的結束位置.,回移一個單詞,下移一個字符.,回移一個字符.,Router$ value for customers, employees, and partners.,使用增強的編輯命令,(一行中長字串會自動滾卷).,光標移動到命令行的開始位置.,光標移動到命令行的結束位置.,回移一個單詞,下移一個字符.,回移一個字符.,下移一個單詞,Router$ value for customers, employees, and partners.,(一行中長字串會自動滾卷).,光標移動到命令行的開始位置.,光標移動到命令行的結束位置.,回移一個單詞,下移一個字符.,回移一個字符.,下移一個單詞,使用增強的編輯命令,刪除當前字符,Router$ value for customers, employees, and partners.,Ctrl-P or Up arrow,調出最近(前一)使用過的命令,Ctrl-N or Down arrow,調出更近使用過的命令,Router show history,顯示命令保存區(qū)內容,Router terminal history size lines,設置命令保存區(qū)大小,回覽之前用過的命令,show version 命令,wg_ro_a#show version Cisco 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 phanguye Image text-base: 0x03050C84, data-base: 0x00001000 ROM: System Bootstrap, Version 11.0(10c), SOFTWARE BOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11.0(10c), RELEASE SOFTWARE(fc1) wg_ro_a uptime is 20 minutes System restarted by reload System image file is “flash:c2500-js-l_120-3.bin“ (output omitted) -More- Configuration register is 0x2102,查看配置情況,控制臺,IOS,Setup utility,show startup-config,show running-config,將配置參數(shù)保存到NVRAM中,Config,Config,RAM,NVRAM,show running 和 show startup 命令,wg_ro_c#show startup-config Using 1359 out of 32762 bytes ! version 12.0 ! - More -,wg_ro_c#show running-config Building configuration. Current configuration: ! version 12.0 ! - More -,保存在NVRAM中,保存在RAM中,顯示當前運行的和保存的配置情況,路由器模式一覽,Router(config)#,Routerenable,Router#config term,Exit,Ctrl-Z (end),用戶模式 特權模式 全局配置模式,配置模式,模式提示,Interface Router(config-if)# Subinterface Router(config-subif)# Controller Router(config-controller)# Line Router(config-line)# Router Router(config-router)# IPX router Router(config-ipx-router)#,保存配置,wg_ro_c# wg_ro_c#copy running-config startup-config Destination filename startup-config? Building configuration wg_ro_c#,將當前運行的配置復制到NVRAM中,配置路由器的各種標識,為路由器或其端口設置標識或信息,路由器名,Router(config)#hostname wg_ro_c wg_ro_c(config)#,開機時的固定顯示信息,wg_ro_c(config)#banner motd # Accounting Department You have entered a secured system. Authorized access only! #,配置路由器的各種標識,為路由器或其端口設置標識或信息,路由器名,Router(config)#hostname wg_ro_c wg_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 0 wg_ro_c(config-if)#description Engineering LAN, Bldg. 18,Router(config)#line console 0 Router(config-line)#login Router(config-line)#password cisco,控制臺密碼,虛擬終端密碼,Router(config)#line vty 0 4 Router(config-line)#login Router(config-line)#password sanjose,路由器密碼配置,Router(config)#line console 0 Router(config-line)#login Router(config-line)#password cisco,控制臺密碼,虛擬終端密碼,Router(config)#line vty 0 4 Router(config-line)#login Router(config-line)#password sanjose,特權模式明文密碼,Router(config)#enable password cisco,特權模式加密密碼,Router(config)#enable secret sanfran,路由器密碼配置,其它控制臺命令,Router(config)#line console 0 Router(config-line)#exec-timeout 0 0,Router(config)#line console 0 Router(config-line)#logging synchronous,禁止控制臺會話自動退出,重顯被打亂的控制臺輸入,Router(config)#interface type number Router(config-if)#,端口配置,type 包括 serial, ethernet, token ring, fddi, hssi, loopback, dialer, null, async, atm, bri, and tunnel number 用來識別具體的單個端口,從當前端口配置模式退出,Router(config)#interface type slot/port Router(config-if)#,模塊化端口的表示法,配置串口,進入全局配置模式,Router(config)#interface serial 0 Router(config-if)#,Router#configure term Router(config)#,指定某個端口,配置串口,進入全局配置模式,Router(config-if)#clock rate 64000 Router(config-if)#,Router(config)#interface serial 0 Router(config-if)#,Router#configure term Router(config)#,Router(config-if)#bandwidth 64 Router(config-if)#exit Router(config)#exit Router#,指定某個端口,設置時鐘頻率 (只在DCE端),調協(xié)波特率 (建議),Router#show interface serial 0 Serial0 is up, line protocol is up Hardware is HD64570 Internet address is /24 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 hang 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/max allocated) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec (output omitted),確認參數(shù)修改情況,以太網(wǎng)的 media-type 命令,Router(config)#interface ethernet 2 Router(config-if)#media-type 10baset,為以太網(wǎng)端口選擇適當?shù)慕橘|類型,開啟或關閉端口,Router#configure term Router(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)關閉的端口,Router#configure term Router(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,人工關閉端口,路由器的 show interfaces 命令,Router#show interfaces Ethernet0 is up, line protocol is up Hardware is Lance, address is 00e0.1e5d.ae2f (bia 00e0.1e5d.ae2f) Internet address is 1/24 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255 Encapsulation ARPA, loopback not set, keepalive set (10 sec) ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:07, output 00:00:08, output hang never Last clearing of “show interface“ counters never Queueing strategy: fifo Output queue 0/40, 0 drops; input queue 0/75, 0 drops 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 81833 packets input, 27556491 bytes, 0 no buffer Received 42308 broadcasts, 0 runts,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 江蘇南京金陵中學2024~2025學年高二下冊期末考試數(shù)學試題學生卷
- 江蘇常州聯(lián)盟學校2024~2025學年高一下冊期末調研數(shù)學試題學生卷
- 農村居民消費升級對農村金融服務的需求變化考核試卷
- 創(chuàng)新思維培訓效果評估考核試卷
- 設備自動化升級方案考核試卷
- 健康促進項目評估中的慢性病預防與控制效果評價考核試卷
- 水資源保護法規(guī)考核試卷
- 壓力傳感器數(shù)據(jù)傳輸考核試卷
- 哺乳期營養(yǎng)保健品效果評價考核試卷
- 智能化醫(yī)療器械產(chǎn)品追溯系統(tǒng)考核試卷
- 江蘇省南京市六校聯(lián)合體2024-2025學年高一下學期期末調研測試歷史試題(含答案)
- 2025年法律職業(yè)資格考試民法專項練習卷:合同法真題解析及試題
- 玻尿酸介紹課件
- 2025中國心肌病綜合管理指南要點解讀課件
- 技術中心人員管理制度
- 2025年形勢與政策課程期末考試復習試卷及答案
- 財產(chǎn)獨立性專項審計報告模板3(清算審計報告模板)
- 2025年中考英語答題技巧與模式專題11閱讀七選五(學生版+解析)
- 高一生物遺傳測試卷及答案
- 衡水一中高一試卷及答案
- 2025-2030中國MEMS設計服務行業(yè)市場現(xiàn)狀供需分析及投資評估規(guī)劃分析研究報告
評論
0/150
提交評論