设备管理-第三章课件

上传人:桔**** 文档编号:568220720 上传时间:2024-07-23 格式:PPT 页数:87 大小:1.14MB
返回 下载 相关 举报
设备管理-第三章课件_第1页
第1页 / 共87页
设备管理-第三章课件_第2页
第2页 / 共87页
设备管理-第三章课件_第3页
第3页 / 共87页
设备管理-第三章课件_第4页
第4页 / 共87页
设备管理-第三章课件_第5页
第5页 / 共87页
点击查看更多>>
资源描述

《设备管理-第三章课件》由会员分享,可在线阅读,更多相关《设备管理-第三章课件(87页珍藏版)》请在金锄头文库上搜索。

1、第一章第一章 路由基础路由基础本章目标本章目标通过本章的学习,您应该掌握以下内容通过本章的学习,您应该掌握以下内容:开启交换机和路由器并观察其启动过开启交换机和路由器并观察其启动过程程注意交换机的出厂初始配置情况,完注意交换机的出厂初始配置情况,完成路由器的初始参数配置成路由器的初始参数配置在网络设备上进入并辨识不同的命令在网络设备上进入并辨识不同的命令模式模式本章目标本章目标(续续)在不同的用户界面下应用各种帮助和命在不同的用户界面下应用各种帮助和命令行编辑功能令行编辑功能学会在路由器的端口正确设置学会在路由器的端口正确设置IP地址和地址和子网掩码子网掩码查看并确认并于各网络设备的基本信息查

2、看并确认并于各网络设备的基本信息 Cisco IOS 软件提供多种网络服务进而支持软件提供多种网络服务进而支持各种网络应用各种网络应用.Cisco 互连网操作系统互连网操作系统(IOS)软件软件网络设备的配置网络设备的配置基于以下各方面来配置设备基于以下各方面来配置设备: 所需功能的网络策略所需功能的网络策略 与协议关联的地址和相关参数与协议关联的地址和相关参数 管理方面的需要管理方面的需要 交换机将出厂缺省设置作为初始配置交换机将出厂缺省设置作为初始配置如果路由器中没有配置文件,会提示如果路由器中没有配置文件,会提示进入初始化设置过程进入初始化设置过程 硬件自检硬件自检定位并加载定位并加载C

3、isco IOS映像文件映像文件定位并运行配置文件定位并运行配置文件Cisco设备的简单启动过程设备的简单启动过程可以通过多种途径来配置可以通过多种途径来配置配置直接在设备的内存中生配置直接在设备的内存中生效效控制端口控制端口Aux 端口端口端口端口PC or Unix服务器服务器Web 或网络管或网络管理服务器理服务器 虚拟终端虚拟终端多种途径的配置多种途径的配置TelnetTFTP提供命令行界面提供命令行界面在不同的网络设备上运行时在不同的网络设备上运行时有差别有差别 在命令模式下可以键入或粘在命令模式下可以键入或粘贴命令贴命令 键入命令后回车,设备即解键入命令后回车,设备即解析和执行所键

4、入的命令析和执行所键入的命令两个主要命令模式是用户模两个主要命令模式是用户模式和特权模式式和特权模式不同的命令模式有不同的提不同的命令模式有不同的提示符示符CiscoIOSCisco IOS用户界面的基本特性用户界面的基本特性用户模式用户模式对交换机和路由器的有限操作对交换机和路由器的有限操作命令提示符为命令提示符为 主机名主机名主要有两个命令模式提供命令键入主要有两个命令模式提供命令键入.模式一模式一:Cisco IOS的主要命令模式的主要命令模式特权特权(或或enabled)模式模式对交换机和路由器更深入的操作对交换机和路由器更深入的操作有配置和监视权力有配置和监视权力是进入其它配置模式的

5、前提是进入其它配置模式的前提命令提示符为命令提示符为 主机名主机名#模式二模式二 (也是最常用的模式也是最常用的模式):Cisco IOS的主要命令模式的主要命令模式(续续)系统启动例程会初始化交系统启动例程会初始化交换机换机初始启动利用缺省配置参初始启动利用缺省配置参数数1. 启动前确认正确连接线缆和控制线启动前确认正确连接线缆和控制线2. 接入电源接入电源3. 观察启动顺序观察启动顺序面板上的指示灯面板上的指示灯LEDsCisco IOS输出到控制台上的内容输出到控制台上的内容交换机的初始启动交换机的初始启动检查交换机指示灯检查交换机指示灯(LEDs)Catalyst 1900 Switc

6、h LED Indicators检查交换机指示灯检查交换机指示灯(LEDs)Catalyst 2950 Switch LED Indicators交换机自检期间的端口指示灯交换机自检期间的端口指示灯 1. 启动时,所有端口指示灯变绿启动时,所有端口指示灯变绿.2. 每个端口自检完毕,对应的指示灯熄每个端口自检完毕,对应的指示灯熄灭灭.3. 如果端口自检失败如果端口自检失败, 对应指示灯呈黄色对应指示灯呈黄色.4. 如果有任何自检失败情况,系统指示如果有任何自检失败情况,系统指示灯呈现黄色灯呈现黄色.5. 如果没有自检失败如果没有自检失败, 自检过程完成自检过程完成.6. 随着自检过程的完成随着

7、自检过程的完成, 指示灯闪亮后熄指示灯闪亮后熄灭灭.Catalyst 1900初次启动时的显示信息初次启动时的显示信息控制台连接控制台连接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: FAA0252A0QXModel Number: WS-C1924

8、-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: Catalyst 2950初次启动时的显示信息初次启动时的显示信息 - System Configuration Dialog - At any point you may enter a question mark ? f

9、or help.Use ctrl-c to abort configuration dialog at any prompt.Default settings are in square brackets .Continue with configuration dialog? yes/no: yesEnter IP address: ip_addressEnter IP netmask: ip_netmaskWould you like to enter a default gateway address? yes: yesIP address of the default gateway:

10、 ip_addressEnter a host name: host_nameEnter enable secret: secret_passwordWould you like to configure a Telnet password? yes yesEnter Telnet password: telnet_passwordWould you like to enable as a cluster command switch? noEnter cluster name: cls_name控制台控制台登入交换机并键入特权模式密码登入交换机并键入特权模式密码 enableEnter pa

11、ssword:# disable exit用户模式提示用户模式提示特权模式提示特权模式提示Switch#show interfacesSwitch#show version显示交换机初始启动的状态显示交换机初始启动的状态Switch#show running-config显示交换机的各种运行状态显示交换机的各种运行状态wg_sw_c#show versionCisco Catalyst 1900/2820 Enterprise Edition SoftwareCopyright (c) Cisco Systems, Inc. 1993-1998wg_sw_c uptime is 15day(s

12、) 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.3 interface(s)Base E

13、thernet 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-configurati

14、on 命令命令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 is Enable

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

16、faces命令命令wg_sw_a#show ip Management VLAN: 1Domain name: HTTP server : EnabledHTTP port : 80RIP : Enabledwg_sw_a#查看交换机的查看交换机的IPIP地址地址配置模式配置模式:全局配置模式全局配置模式 wg_sw_a# conf termwg_sw_a(config)#端口配置模式端口配置模式wg_sw_a(config)# interface e0/1wg_sw_a(config-if)#配置交换机配置交换机配置交换机的各种标识配置交换机的各种标识配置交换机的各种标识配置交换机的各种标识

17、为交换机设置本地标识为交换机设置本地标识交换机名交换机名(config)#hostname wg_sw_cwg_sw_c(config)#wg_sw_a(config)# ip address ip address maskwg_sw_a(config)#ip配置交换机配置交换机IPIP地址地址wg_sw_a(config)# ip default-gateway ip address配置交换机缺省网关配置交换机缺省网关wg_sw_a(config)#ip系统启动例程会初始化路由器系统启动例程会初始化路由器如果需要,路由器可以有选择性地回退启如果需要,路由器可以有选择性地回退启动动Check

18、hardwareFind and load Cisco IOSsoftware image Find and apply routerconfiguration information Load Bootstrap1. 启动前确认正确连接线缆和控制线启动前确认正确连接线缆和控制线2. 按下电源开关按下电源开关3. 观察启动顺序观察启动顺序 Cisco IOS输出到控制台上的内容输出到控制台上的内容Cisco路由器的初始启动路由器的初始启动没有配置文件与有配置文件的路由器启动对比没有配置文件与有配置文件的路由器启动对比- System Configuration Dialog -Continue

19、 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 availablePress RETURN to get started.用户模式用户模式提示提示wg_ro_c路由器启动时在控制台上的输出内容路由器启动时在控制台

20、上的输出内容控制台控制台Setup: 初始配置对话框初始配置对话框 Router#setup - System Configuration Dialog -Continue with configuration dialog? yes/no: yAt 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 conf

21、igures 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: n预先浏览端口配置情况预先浏览端口配置情况First, would you like to see the current interface summary? yes:Interface IP-Address OK? Metho

22、d Status ProtocolBRI0 unassigned YES unset administratively down downBRI0:1 unassigned YES unset administratively down downBRI0:2 unassigned YES unset administratively down downEthernet0 unassigned YES unset administratively down downSerial0 unassigned YES unset administratively down down自检过程中所找到的端口

23、自检过程中所找到的端口设置全局参数设置全局参数初始化全局参数初始化全局参数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 e

24、nable 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 C

25、onfigure SNMP Network Management? no:设置全局参数设置全局参数(续续)初始化协议配置初始化协议配置 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: Configu

26、re Apollo? no:设置端口参数设置端口参数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 2 basic-5ess.AT&T 5ESS switch type for the US/Canada 3 basic-dms100.Northern DMS-100 switch type for US/Ca

27、nada 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 types for France Choose ISDN BRI Switch Type 2:Configuring interface parameters:Do you want to configure BR

28、I0 (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 255.0.0.0 : Class A network is 10.0.0.0, 24 subnet bits; mask is /24Do you want to configure Serial0 interface? no:

29、设置脚本的确认与应用设置脚本的确认与应用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

30、 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 this config.1 Return back to the setup without saving this config.2 Save this

31、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.用户模式提示用户模式提示特权模式提示特权模式提示登入路由器登入路由器只要所输命令串在全部命令中是唯一的,可以将一个命令尽只要所输命令串在全部命令中是唯一的,可以将一个命令尽可能地简写可能地简写路由器在用户模式下的命令清单路由器在用户模式

32、下的命令清单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 existi

33、ng 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 temporar

34、y 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 co

35、nnection 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

36、 from the EXEC help Description of the interactive help system- More -路由器在特权模式下的命令清单路由器在特权模式下的命令清单只要输入部分命令串只要输入部分命令串(唯一表示某个命令唯一表示某个命令),紧接着按,紧接着按tab键就可以完键就可以完整地输入一个命令整地输入一个命令路由器与交换机的命令行帮助机制路由器与交换机的命令行帮助机制上下文关联帮助上下文关联帮助错误信息提示错误信息提示指出所输入交换机命令的错误所指出所输入交换机命令的错误所在,以便于修改或纠正在,以便于修改或纠正.可以重新调出一个较长或较复杂可以重新调出一个

37、较长或较复杂的命令或其它内容,用来再次运的命令或其它内容,用来再次运行、查看或修改行、查看或修改. 之前命令保存区之前命令保存区提供命令清单和与特定命令提供命令清单和与特定命令相关联的参数相关联的参数. 路由器的上下文相关联帮助路由器的上下文相关联帮助Router# clokTranslating CLOK% Unknown command or computer name, or unable to find computer addressRouter# cl?clear clockRouter# clock% Incomplete command.Router# clock ?set S

38、et the time and dateRouter# clock set% Incomplete command.Router# clock set ?hh:mm:ss Current Time 符号解析符号解析命令提示命令提示调出最近用过的内容调出最近用过的内容路由器的上下文相关联帮助路由器的上下文相关联帮助(续续)Router# clokTranslating CLOK% Unknown command or computer name, or unable to find computer addressRouter# clear clockRouter# % Incomplete c

39、ommand.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 monthMONTH Month of the yearRouter# clock set 19:56:00 04 8 % Invalid input detected at the markerRouter# clock set

40、 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,

41、and partners.”上述文字段在输入时会超出一行上述文字段在输入时会超出一行Router$ future of internetworking by creating unprecedented op使用增强的编辑命令使用增强的编辑命令 (一行中长字串会自动滚卷一行中长字串会自动滚卷). RouterShape the value of internetworking by creating unpreced使用增强的编辑命令使用增强的编辑命令 (一行中长字串会自动滚卷一行中长字串会自动滚卷). 光标移动到命令行的开始位置光标移动到命令行的开始位置. Router$ value for

42、 customers, employees, and partners.使用增强的编辑命令使用增强的编辑命令 (一行中长字串会自动滚卷一行中长字串会自动滚卷). 光标移动到命令行的开始位置光标移动到命令行的开始位置. 光标移动到命令行的结束位置光标移动到命令行的结束位置. 使用增强的编辑命令使用增强的编辑命令 (一行中长字串会自动滚卷一行中长字串会自动滚卷). 光标移动到命令行的开始位置光标移动到命令行的开始位置. 光标移动到命令行的结束位置光标移动到命令行的结束位置. 回移一个单词回移一个单词 Router$ value for customers, employees, and partn

43、ers.使用增强的编辑命令使用增强的编辑命令 (一行中长字串会自动滚卷一行中长字串会自动滚卷). 光标移动到命令行的开始位置光标移动到命令行的开始位置. 光标移动到命令行的结束位置光标移动到命令行的结束位置. 回移一个单词回移一个单词. 下移一个字符下移一个字符. Router$ value for customers, employees, and partners.使用增强的编辑命令使用增强的编辑命令 (一行中长字串会自动滚卷一行中长字串会自动滚卷). 光标移动到命令行的开始位置光标移动到命令行的开始位置. 光标移动到命令行的结束位置光标移动到命令行的结束位置. 回移一个单词回移一个单词

44、下移一个字符下移一个字符. 回移一个字符回移一个字符. Router$ value for customers, employees, and partners.使用增强的编辑命令使用增强的编辑命令 (一行中长字串会自动滚卷一行中长字串会自动滚卷). 光标移动到命令行的开始位置光标移动到命令行的开始位置. 光标移动到命令行的结束位置光标移动到命令行的结束位置. 回移一个单词回移一个单词 下移一个字符下移一个字符. 回移一个字符回移一个字符. 下移一个单词下移一个单词 Router$ value for customers, employees, and partners. (一行中长字串会自动

45、滚卷一行中长字串会自动滚卷). 光标移动到命令行的开始位置光标移动到命令行的开始位置. 光标移动到命令行的结束位置光标移动到命令行的结束位置. 回移一个单词回移一个单词 下移一个字符下移一个字符. 回移一个字符回移一个字符. 下移一个单词下移一个单词使用增强的编辑命令使用增强的编辑命令使用增强的编辑命令使用增强的编辑命令删除当前字符删除当前字符 Router$ value for customers, employees, and partners.Ctrl-P or Up arrow调出最近调出最近(前一前一)使用过的命令使用过的命令Ctrl-N or Down arrow调出更近使用过的命

46、令调出更近使用过的命令Router show history显示命令保存区内容显示命令保存区内容Router terminal history size lines 设置命令保存区大小设置命令保存区大小回览之前用过的命令回览之前用过的命令show version 命令命令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

47、 by cisco Systems, Inc.Compiled Mon 08-Feb-99 18:18 by phanguyeImage text-base: 0x03050C84, data-base: 0x00001000ROM: 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

48、reloadSystem image file is flash:c2500-js-l_120-3.bin(output omitted)-More-Configuration register is 0x2102查看配置情况查看配置情况控制台控制台IOSSetup utilityshowstartup-configshowrunning-config将配置参数保存到将配置参数保存到NVRAM中中ConfigConfigRAMNVRAMshow running 和和 show startup 命令命令wg_ro_c#show startup-configUsing 1359 out of 32

49、762 bytes!version 12.0!- More -wg_ro_c#show running-configBuilding configuration.Current configuration:!version 12.0!- More -保存在保存在NVRAM中中保存在保存在RAM中中显示当前运行的和保存的配显示当前运行的和保存的配置情况置情况路由器模式一览路由器模式一览路由器模式一览路由器模式一览Router(config)#RouterenableRouter#config termExitCtrl-Z (end)用户模式用户模式特权模式特权模式全局配置模式全局配置模式配置模式

50、配置模式模式提示模式提示InterfaceRouter(config-if)#Subinterface Router(config-subif)#Controller Router(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 filename startup-config?Buildin

51、g configurationwg_ro_c#将当前运行的配置复制到将当前运行的配置复制到NVRAM中中配置路由器的各种标识配置路由器的各种标识配置路由器的各种标识配置路由器的各种标识为路由器或其端口设置标识或信息为路由器或其端口设置标识或信息路由器名路由器名Router(config)#hostname wg_ro_cwg_ro_c(config)#开机时的固定显示信息开机时的固定显示信息wg_ro_c(config)#banner motd # Accounting Department You have entered a secured system. Authorized acces

52、s only! #配置路由器的各种标识配置路由器的各种标识配置路由器的各种标识配置路由器的各种标识为路由器或其端口设置标识或信息为路由器或其端口设置标识或信息路由器名路由器名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! #端口描述端口描述wg_ro_c(config)#interface

53、ethernet 0wg_ro_c(config-if)#description Engineering LAN, Bldg. 18Router(config)#line console 0Router(config-line)#loginRouter(config-line)#password cisco控制台密码控制台密码虚拟终端密码虚拟终端密码Router(config)#line vty 0 4Router(config-line)#login Router(config-line)#password sanjose路由器密码配置路由器密码配置Router(config)#line c

54、onsole 0Router(config-line)#loginRouter(config-line)#password cisco控制台密码控制台密码虚拟终端密码虚拟终端密码Router(config)#line vty 0 4Router(config-line)#login Router(config-line)#password sanjose特权模式明文密码特权模式明文密码Router(config)#enable password cisco特权模式加密密码特权模式加密密码Router(config)#enable secret sanfran路由器密码配置路由器密码配置Disa

55、ble PasswordRouter(config-line)#no login Router(config-line)#no enable password其它控制台命令其它控制台命令Router(config)#line console 0Router(config-line)#exec-timeout 0 0 Router(config)#line console 0Router(config-line)#logging synchronous禁止控制台会话自动退出禁止控制台会话自动退出重显被打乱的控制台输入重显被打乱的控制台输入Router(config)#interface type

56、 numberRouter(config-if)#端口配置端口配置端口配置端口配置type 包括包括 serial, ethernet, token ring, fddi, hssi, loopback, dialer, null, async, atm, bri, and tunnelnumber 用来识别具体的单个端口用来识别具体的单个端口Router(config-if)#exit从当前端口配置模式退出从当前端口配置模式退出Router(config)#interface type slot/portRouter(config-if)#模块化端口的表示法模块化端口的表示法配置串口配置串口

57、配置串口配置串口进入全局配置模式进入全局配置模式Router(config)#interface serial 0 Router(config-if)#Router#configure termRouter(config)#指定某个端口指定某个端口配置串口配置串口配置串口配置串口进入全局配置模式进入全局配置模式Router(config-if)#clock rate 64000Router(config-if)#Router(config)#interface serial 0 Router(config-if)#Router#configure termRouter(config)#Rout

58、er(config-if)#bandwidth 64Router(config-if)#exitRouter(config)#exitRouter#指定某个端口指定某个端口设置时钟频率设置时钟频率 (只在只在DCE端端)调协波特率调协波特率 (建议建议)配置路由器的配置路由器的配置路由器的配置路由器的IPIP地址地址地址地址指明指明IP地址和子网掩码地址和子网掩码在路由器的端口配置模式下设置地址在路由器的端口配置模式下设置地址Router(config-if)#ip address ip-address subnet-mask配置路由器的配置路由器的IP地址示例地址示例wg_ro_c#conf

59、igure terminalwg_ro_c(config)#interface ethernet 0wg_ro_c(config-if)#ipwg_ro_c(config-if)#no shutdownwg_ro_c(config-if)#exit利用利用IP地址静态映射主机地址地址静态映射主机地址通过通过IP地址和主机名称选择端口地址和主机名称选择端口路由器的路由器的路由器的路由器的IPIP主机命名主机命名主机命名主机命名Router(config)#ip host name tcp-port-numberaddress addressip host Norineip指明一个或多个名称服务器

60、来解析逻指明一个或多个名称服务器来解析逻辑地址辑地址路由器名称服务器的设置路由器名称服务器的设置路由器名称服务器的设置路由器名称服务器的设置Router(config)#ip name-server server-address1 server-address2.server-address6DNS Server缺省情况下缺省情况下DNS为为Enable路由器的名称解析路由器的名称解析路由器的名称解析路由器的名称解析Router(config)#ip domain-lookupRouter(config)#endRouter#patTranslating ”pat.domain server

61、(255.255.255.255)% Unknown command or computer name, or unable to find computer addressRouter#config tRouter(config)#no ip domain-lookupRouter(config)#endRouter#patTranslating ”pat% Unknown command or computer name, or unable to find computer addressRouter#查看主机名称查看主机名称查看主机名称查看主机名称Router#show hostsDe

62、fault domain is not setName/address lookup uses domain serviceHost Flags Age Type Address(es)Norine显示主机列表显示主机列表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 se

63、t, 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/2

64、56 (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) 确认参数修改情况确认参数修改情况确认参数修改情况确认参数修改情况以太网的以太网的以太网的以太网的 media-typemedia-type 命令命令命令命令Router(config)#interface et

65、hernet 2Router(config-if)#media-type 10baset为以太网端口选择适当的介质类型为以太网端口选择适当的介质类型开启或关闭端口开启或关闭端口Router#configure termRouter(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 u

66、p 开启已经关闭的端口开启已经关闭的端口Router#configure termRouter(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 命令命令Rout

67、er#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 set (10 sec) ARP type: ARPA, ARP Timeout 04:00:00 Last input

68、 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,

69、 0 no buffer Received 42308 broadcasts, 0 runts, 0 giants, 0 throttles 1 input errors, 0 CRC, 0 frame, 0 overrun, 1 ignored, 0 abort 0 input packets with dribble condition detected 55794 packets output, 3929696 bytes, 0 underruns 0 output errors, 0 collisions, 1 interface resets 0 babbles, 0 late co

70、llision, 4 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped outRouter#show interfaces serial 1Serial1 is up, line protocol is up Hardware is HD64570 Description: 64Kb Line to San Jose : : : : : : : : :Operational.Connection problem.Interface problem.Disabled .

71、Serial1 is up, line protocol is upSerial1 is up, line protocol is downSerial1 is down, line protocol is downSerial1 is administratively down, line protocol is down存活信息存活信息载波监测载波监测解读端口状态解读端口状态串口上用串口上用 show controller 命令命令Router#show controller serial 0HD unit 0, idb = 0x121C04, driver structure at 0x

72、127078buffer size 1524 HD unit 0, V.35 DTE cable.显示串口线的线缆类型显示串口线的线缆类型 core_ serverwg_sw_a10.1.1.10 wg_sw_lwg_pc_awg_pc_l.console10.1.1.121 e0/2fa0/26(port A)e0/2e0e0fa0/26(port A)fa0/1fa0/12fa0/24core_sw_awg_ro_lA/BA/Bwg_ro_aconsoleconsoleconsolepodsw ros e0B10.1.1.2010.1.1.21 可视化目标可视化目标CDP协议协议Cisco

73、 Discovery Protocol是一个提供关于直接相连的交换机、路由器和其它是一个提供关于直接相连的交换机、路由器和其它Cisco设备的综合信息的专有工具设备的综合信息的专有工具 CDP 能够发现直接相邻的设备而不管这些设备所运行的能够发现直接相邻的设备而不管这些设备所运行的是什么协议栈是什么协议栈 物理介质必须能够支持物理介质必须能够支持Subnetwork Access Protocol (SNAP)上层地址上层地址Cisco专有的链路层专有的链路层协议协议介质必须能够支持介质必须能够支持 SNAPTCP/IPNovell IPXCDP能能 发现并显示关于直接相连的发现并显示关于直接

74、相连的Cisco设备的设备的信息信息ATMOthersLANs帧中继帧中继AppleTalkOthersCDP运行在使用运行在使用10.3或更新版或更新版Cisco IOS的路由器以及的路由器以及Cisco 交换机和集线器上交换机和集线器上能获取的信息包括能获取的信息包括:设备名设备名对应各协议的地址对应各协议的地址端口名端口名角色特征角色特征平台平台 CDPshow cdpCDPCDP用用CDP发现直接相邻的设备发现直接相邻的设备使用使用 CDP交换机交换机B路由器路由器A路由器路由器B交换机交换机AS0S1RouterA#sh cdp ? entry Information for spe

75、cific neighbor entry interface CDP interface status and configuration neighbors CDP neighbor entries traffic CDP statistics RouterA(config)#no cdp run RouterA(config)#interface serial0 RouterA(config-if)#no cdp enable 交换机交换机A同时也显示其同时也显示其Mac地址地址使用使用show cdp neighbor 命令命令RouterA#sh cdp neighborsCapabi

76、lity Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - RepeaterDevice ID Local Intrfce Holdtme Capability Platform Port IDRouterB Ser 0 148 R 2522 Ser 1SwitchA0050BD855780 Eth 0 167 T S 1900 2 S0S1交换机交换机B路由器路由器A路由器路由器B交换机交换机A使用使用show cdp entry 命令命令Route

77、rA#sh cdp entry *-Device ID: RouterB Entry address(es): IP address: 10.1.1.2 Platform: cisco 2522, Capabilities: Router Interface: Serial0, Port ID (outgoing port): Serial1Holdtime : 168 secVersion :Cisco Internetwork Operating System Software IOS (tm) 2500 Software (C2500-JS-L), Version 12.0(3), RE

78、LEASE SOFTWARE (fci)Copyright (c) 1986-1999 by cisco Systems, Inc.Compiled Mon 08-Feb-99 18:18 by phanguyeS0S1交换机交换机B路由器路由器A路由器路由器B交换机交换机A其它其它CDP命令命令RouterA#sh cdp trafficCDP counters :Packets output: 56, Input: 38Hdr syntax: 0, Chksum error: 0, Encaps failed: 3No memory: 0, Invalid packet: 0, Fragm

79、ented: 0RouterA#sh cdp interface BRI0 is administratively down, line protocol is down Encapsulation HDLC Sending CDP packets every 60 seconds Holdtime is 180 secondsS0S1交换机交换机B路由器路由器A路由器路由器B交换机交换机A用用Telnet 连接到远端设备连接到远端设备远端设备远端设备S0S1RouterA#telnet 10.2.2.2 Trying 10.2.2.2 . Open-Catalyst 1900 Managem

80、ent ConsoleCopyright (c) Cisco Systems, Inc. 1993-1998All rights reserved.Enterprise Edition SoftwareEthernet Address: 00-90-86-73-33-40PCA Number: 73-2239-06PCA Serial Number: FAA02359H8KModel Number: WS-C1924-ENSystem Serial Number: FAA0237X0FQ.SwitchB交换机交换机B路由器路由器A路由器路由器B交换机交换机A查看查看Telnet连接连接S0S1

81、RouterA#sh sessionConn Host Address Byte Idle Conn Name 1 10.1.1.2 * 2 10.3.3.2 RouterA#sh user Line User Host(s) Idle Location* 0 con 0 10.1.1.2 3 10.3.3.2 2 11 vty交换机交换机B路由器路由器A路由器路由器B交换机交换机A挂起一个挂起一个Telnet会话会话S0S1RouterB#xRouterA#sh sessionConn Host Address Byte Idle Conn Name 1 10.1.1.2 RouterA#r

82、esume 1RouterB#交换机交换机B路由器路由器A路由器路由器B交换机交换机ARouterA#disconnect 1Closing connection to 10.3.3.2 confirmRouterA#clear line 11confirm OK关闭一个关闭一个Telnet会话会话关闭由远端设备建立的会话关闭由远端设备建立的会话关闭由自己建立的当前会话关闭由自己建立的当前会话S0S1交换机交换机B路由器路由器A路由器路由器B交换机交换机A使用使用ping 和和trace 命令命令测试对远端设备的连接性和测试对远端设备的连接性和路径路径Router# Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.1.10, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 msRouter# Type escape sequence to abort. 1 10.1.1.10 4 msec 4 msec 4 msecRouter#

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号