设备调试入门_第1页
设备调试入门_第2页
设备调试入门_第3页
设备调试入门_第4页
设备调试入门_第5页
已阅读5页,还剩88页未读 继续免费阅读

下载本文档

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

文档简介

第2章 网络设备调试入门,本章目标,熟悉常用网络设备的连接接口、连接方式 了解网络设备的运行软件 初始化交换机 配置交换机 初始化路由器 配置路由器,本章内容,2.5 访问远程设备,2.4 路由器初始启动过程,2.3 交换机的初始化,2.2 网络设备的软件运行,2.1 网络设备安装与连接,2.6 管理操作系统,2.1 网络设备安装与连接,LAN连接 广域网连接 DTE到DCE的串行连接 固定端口 模块化端口 设置控制台的连接,2.1.1 LAN连接,下列情况下用直连线: 连接交换机和路由器 连接交换机到PC机或服务器 连接集线器到PC机或服务器,2.1.1 LAN连接,下列情况下用用交叉线: 连接交换机和交换机 连接交换机和集线器 连接集线器和集线器 连接路由器和路由器 PC机到PC机 PC机到路由器,2.1.1 LAN连接(3),LAN连接示意图,2.1.2 广域网连接,采用不同的物理介质传输 不同的传输方式有不同的传输数据的速度,2.1.2 广域网连接,广域网连接电缆示意图,2.1.3 DTE到DCE的串行连接,DTE到DCE的串行连接示意图,2.1.4 固定端口,路由器上固定端口示意图,2.1.5 模块化端口,模块,路由器上模块化端口示意图,2.1.5 模块化端口,根据需要选择ISDN的BRI S/T或者U接口 路由器有一个或多个这种类型的端口,2.1.5 模块化端口,!警告!不要把非ISDN的设备连接到ISDN的交换机上或者ISDN的插孔中如果你把非ISDN的设备插到ISDN的插孔中,就会损坏非ISDN设备,2.1.6 设置控制台的连接,用反转线连接设备的控制端口和计算机的串口 同时还需要为计算机或终端配备一个RJ-45到DB-9 或RJ- 45到DB-25的转换器。,2.1.6 设置控制台的连接(2),配置终端仿真应用程序(emulation application)中的COM端口设置为:“速率9600bps,8个数据位,无奇偶校验,1个停止位,无流量控制”。,2.1.6 设置控制台的连接(3),设备上电自检,系统自动进行配置,自检结束后提示用户键入回车,直到出现命令行提示符。,注意:AUX端口用来支持通过Modem实现带外(out-of-band)管理。它在使用前也需要先用控制台端口对其完成配置,配置参数同上,但速率可设为38400bps。,2.2 网络设备的软件运行,Cisco IOS软件系统,2.2.1 Cisco IOS软件系统,IOS 的启动程序 Cisco IOS 用户端口 与IOS 沟通,2.2.1 Cisco IOS软件系统,Cisco IOS(Internetwork Operating System) 是嵌入所有Cisco路由器的软件体系 可以提供的网络服务如下 选择网络协议和功能 在设备之间提供高速的连接 提供安全的接入控制和阻断未经认证的网络用户 对网络增长需求提供扩充空间 保证接入的网络资源的可靠性,2.2.1.1 IOS的启动程序,Cisco IOS软件启动步骤: 网络设备和所有测试过的硬件都启动了 从存储器中找到网络设备操作系统的Cisco IOS软件并装载该软件 从存储器中找到具有协议功能和端口地址的网络设备配置,并按配置操作,2.2.1.2 Cisco IOS用户端口,使用命令行界面 针对不同的设备有不同的操作 可以键入或粘贴命令条目 键入“回车”键后设备会解释并执行所键入的命令 两种主要的执行模式:用户模式、特权模式 不同的模式有不同的提示符,2.2.1.2 Cisco IOS用户端口,输入命令的两个主要EXEC模式 第一个模式,2.2.1.2 Cisco IOS用户端口,第二个模式,2.2.1.3 与IOS沟通,命令的错误提示及帮助 查看使用过的命令 命令缩写 命令完成及撤销 注销本次登录 多种途径的资源配置,2.2.1.2 Cisco IOS用户端口,同于更改网络设备设置的配置模式,hostname#特权模式 hostname# configure terminal hostname(config)#全局配置模式,2.2.1.3 与IOS沟通,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,象征的翻译命令表达提示最后的命令回忆,2.2.1.3 与IOS沟通,Router# clock set 19:56:00% Incomlete command.Router# clock set 19:56:00 ?Day of the monthMONTH Month of the yearRouter# clock set 19:56:00 04 B% invalid input detected at the markerRouter# clock set 19:56:00 04 August% Incomplete command.Router# clock set 19:56:00 04 August ?Year,命令提示 语法检查 命令提示,2.2.1.3 与IOS沟通,查看使用过的命令,2.2.1.3 与IOS沟通,命令缩写,2.2.1.3 与IOS沟通,命令完成及撤销 用键可以补全所使用的命令 用no命令取消以前所进行的配置 2621(config)# router rip 2621(config-router)# exit 2621(config)# no router rip,2.2.1.3 与IOS沟通,可以用以下命令注销本次登录 exit logout quit,2.3 交换机的初始化,检查交换机LED指示灯 交换机启动后的显示情况 登陆交换机 显示交换机的初始化状态 配置交换机,2.3 交换机的初始化,交换机的初始化包含以下几个步骤 开启交换机前先验证以下几项 所有的网线都已正确连接 配置用的终端连接到控制台(console)端口 选用了控制台终端应用程序 接通电源线 观察引导过程 留意交换机面板上的LED指示灯状态 观察在控制终端上网络设备系统软件的输出提示,2.3.1 检查交换机LED指示灯,2.3.1 检查交换机LED指示灯,开始时刻 所有端口的LED指示灯都是绿色 每个端口自检完毕后 如端口检测正常:相应端口LED指示灯熄灭 如端口检测失败:相应端口LED指示灯变为琥珀色 如果有任何检测失败 系统LED指示灯都变为琥珀色 自检完成后 端口LED指示灯闪烁,然后熄灭 系统LED指示灯保持绿色(自检正常的情况下),2.3.2 交换机启动后的显示情况,2.3.3 登陆交换机,登陆Cisco 交换机,显示Cisco交换机的工作状态 查看当前IOS版本信息查看当前配置查看接口状态,2.3.4 显示交换机的初始化状态,Switch# show interfaces,Switch# show running-config,Switch# show version,2.3.4.1 显示版本信息的命令,SwitchA#show version Cisco Internetwork Operating System Software IOS (tm) C2900XL Software (C2900XL-C3H2S-M), Version 12.0(5.2)XU, MAINTENANCE INTERIM SOFTWARE Copyright (c) 1986-2000 by cisco Systems, Inc. Compiled Mon 17-Jul-00 17:35 by ayounes Image text-base: 0x00003000, data-base: 0x00301F3C ROM: Bootstrap program is C2900XL boot loader SwitchA uptime is 0 minutes System returned to ROM by power-on System image file is “flash:c2900XL-c3h2s-mz-120.5.2-XU.bin“ cisco WS-C2924-XL (PowerPC403GA) processor (revision 0x11) with 8192K/1024K bytes of memory. Processor board ID FAB0452Y18R, with hardware revision 0x01 Last reset from power-on Processor is running Enterprise Edition Software Cluster command switch capable Cluster member switch capable 24 FastEthernet/IEEE 802.3 interface(s)32K bytes of flash-simulated non-volatile configuration memory. Base ethernet MAC Address: 00:04:C0:98:9C:C0 Motherboard assembly number: 73-3382-08 Power supply part number: 34-0834-01 Motherboard serial number: FAB0452204C Power supply serial number: PHI042406DY Model revision number: A0 Motherboard revision number: C0 Model number: WS-C2924-XL-EN System serial number: FAB0452Y18R Configuration register is 0xF,在Cisco交换机上显示版本信息,2.3.4.1 显示版本号的命令,H3C display version H3C Comware Platform Software. Comware software, Version 3.10, Release 1510P08 Copyright(c) 2004-2006 Hangzhou Huawei-3Com Tech. Co., Ltd. All rights reserved. H3C S3600-28P-EI uptime is 0 week, 0 day, 0 hour, 31 minutes H3C S3600-28P-EI with 1 MIPS Processor 64M bytes DRAM 16384K bytes Flash Memory Config Register points to FLASH Hardware Version is REV.C CPLD Version is CPLD 001 Bootrom Version is 319 Subslot 0 24 FE Hardware Version is REV.C Subslot 1 4 GE Hardware Version is REV.C,在华为交换机上显示版本信息,SwitchA# show running-config Building configuration. Current configuration: ! version 12.0 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname SwitchA ! enable secret 5 $1$d6W3$O91lkm7KqTzfwSRMS2WkS/ ! ip subnet-zero,在Cisco交换机上显示当前配置信息,2.3.4.2 显示正在运行的配置信息命令,2.3.4.3 显示接口命令,SwitchA# show interface VLAN1 is up, line protocol is up Hardware is CPU Interface, address is 0004.c098.9cc0 (bia 0004.c098.9cc0)Internet address is 192.168.1.1/24MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation ARPA, loopback not setARP type: ARPA, ARP Timeout 04:00:00Last input never, output 00:13:08, output hang neverLast clearing of “show interface“ counters neverQueueing strategy: fifoOutput queue 0/40, 0 drops; input queue 0/75, 0 drops5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec,在Cisco交换机上显示接口配置信息,2.3.4.4 显示交换机的IP地址,SwitchA# show ip interface VLAN1 is up, line protocol is upInternet address is 192.168.1.1/24Broadcast address is 255.255.255.255Address determined by non-volatile memoryMTU is 1500 bytesHelper address is not setDirected broadcast forwarding is disabledOutgoing access list is not setInbound access list is not setProxy ARP is enabledSecurity level is defaultSplit horizon is enabledICMP redirects are always sentICMP unreachables are always sent,在Cisco交换机上显示IP地址配置信息,2.3.5 配置交换机,配置交换机的主机名 配置交换机的缺省网关 设定全双工/半双工选项,2.3.5.1 配置交换机的主机名 (1),Switch enable Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z Switch(config)# hostname WNT WNT(config)#,在Cisco交换机上配置主机名,2.3.5.2 配置交换机的缺省网关,在Cisco交换机上,Switch(config)# ip default-gateway 192.168.1.2,2.3.5.3 设定全双工/半双工选项,在Cisco交换机上,Switch(config)# interface ethernet 1/0 Switch(config-if)# duplex auto | full | full-flow-control | half,2.4 路由器初始启动过程,在启动路由器之前,首先检查电源、线缆、控制台是否都连接好 打开电源开关 观察启动过程 在控制台上显示的Cisco IOS的输出文本。,2.4.1 Cisco路由器的系统配置对话,- System Configuration Dialog - Would you like to enter the initial 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 connectivity for management of the system, extended setup will ask you to configure each interface on the systemWould you like to enter basic management setup? yes/no: n,2.4.1.1 设置全局参数,Configuring global parameters:Enter host name Router:wntThe 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:ciscoThe 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:wntThe virtual terminal password is used to protect access to the router over a network interface. Enter virtual terminal password:cisco,2.4.1.1 设置全局参数,Configure SNMP Network Management?no: Configure LAT?yes: Configure AppleTalk? no: Configure DECnet? no: Configure IP? yes:yes Configure IGRP routing?yes:n Configure RIP routing? no:y Configure CLNS?no:n Configure IPX? no: Configure Vines? no: Configure XNS? no: Configure Apollo? no: Configure bridging? no:,2.4.1.2 设置端口参数,Do you want to configure BRI0 (BRI d-channel) interface? no: Do you want to configure Ethernet0 interface?no: Do you want to configure Serial0 interface? no:y Configure IP on this interface? no:y IP address for this interface:192.168.1.2 Subnet mask for this interface 255.255.255.0 : Class C network is 192.168.1.0, 24 subnet bits; mask is /24 Configure LAT on this interface? no: Do you want to configure Serial1 interface? no:,2.4.1.3 全部设置的回顾和使用,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 10.1.1.31 255.255.255.0 no mop enabled ! interface Serial0 shutdown no 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:,2.4.2 命令行界面,在Cisco 2600路由器上EXEC有两级命令权限 用户模式 包括查看路由器状态等典型命令 特权模式 包括更改路由器配置等典型命令,2.4.2.1 登录路由器,wnt con0 is now available Press RETURN to get started. wnt wntenable Password: wnt# wnt#configure terminal wnt(config)#,用户模式,特权模式,全局配置模式,wnt ? Exec commands: access-enable Create a temporary Access-List entry access-profile Apply user-profile to interface clear Reset functions connect Open a terminal connection 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-,2.4.2.2 路由器的用户模式和用户视图命令,wnt# ? 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 -More,2.4.2.3 路由器的特权模式和系统视图命令,2.4.2.4 显示版本号的命令,wnt# show version Cisco Internetwork Operating System Software IOS (tm) 2500 Software (C2500-JS-L), Version 12.0(8), RELEASE SOFTWARE (fc1) Copyright (c) 1986-1999 by Cisco Systems, Inc. Compiled Mon 29-Nov-99 14:52 by kpma Image text-base:0x03051C3C, 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)wnt uptime is 2 hours, 43 minutes System restarted by power-on System image file is “flash:/c2500-js-l.120-8.bin” Cisco 2500 (68030) processor (revision N) with 2048K/2048K bytes of memory. Processor board ID 11167920, with hardware revision 00000001 Bridging software. X.25 software, Version 3.0.0. SuperLAT software (copyright 1990 by Meridian Technology Corp). TN3270 Emulation software. Basic Rate ISDN software, Version 1.1. 1 Ethernet/IEEE 802.3 interface(s) 2 Serial network interface(s) 1 ISDN Basic Rate interface(s) 32K bytes of non-volatile configuration memory. 16384K bytes of processor board System flash (Read ONLY) Configuration register is 0x2102,2.4.2.5 查看配置过程,Router# show startup-config Using 1359 out of 32762 bytes ! version 12.0 ! - More -,Router# show running-config Building configuration. Current configuration: ! version 12.0 ! - More -,NVRAM中的配置,内存中的配置,查看Cisco路由器当前的和存储的配置,2.4.2.6 路由器各种模式的回顾,2.4.2.7 配置路由器,配置路由器名称 配置Cisco路由器的名字,Router# configrue terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# hostname wnt wnt(config)#,配置路由器的密码 配置Cisco路由器Console口访问密码配置Cisco路由器特权级密码,2.4.2.7 配置路由器,wnt(config)# line console 0 wnt(config-line)# login wnt(config-line)# password wnt wnt# exit wnt con0 is now available Press RETURN to get started. User Access Verification Password:(wnt) wnt,wnt(config)# enable password wisdom wnt(config)# enable secret wisdom The enable secret you have chosen is the same as your enable password. This is not recommended. Re-enter the enable secret. wnt(config)#,配置路由器端口 配置Cisco路由器端口配置华为路由器端口,2.4.2.7 配置路由器,wnt(config)#interface type number wnt(config)#interface serial 0 wnt(config)#interface ethernet 1,Router1interface ethernet0/0 Router1interface ATM2/0 Router1interface Serial1/0,wnt(config)# interface type number wnt(config)# interface serial 0 wnt(config)# interface ethernet 1,Router1 interface ethernet0/0 Router1 interface ATM2/0 Router1 interface Serial1/0,2.4.2.7 配置路由器,配置Cisco路由器串行端口 配置路由器串行端口在DCE设备的串行端口中配置时钟设置带宽,wnt# configure terminal wnt(config)# interface serial 0 wnt(config-if)#,wnt(config-if)# clock rate 64000 wnt(config-if)#,wnt(config-if)# bandwidth 64 wnt(config-if)#,2.4.2.7 配置路由器,检查串行端口的配置,wnt# show interfaces serial 0 Serial0 is up, line protocol is up Hardware is HD64570 Internet address is 192.168.0.1/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 never, output never, output hang never ,在Cisco路由器上显示串行端口的配置状态,2.4.2.7 配置路由器,配置端口的IP地址 在Cisco路由器端口上配置IP地址,wnt(config)#interface ethernet 1/0 wnt(config-if)# ip address 192.168.0.1 255.255.255.0,2.4.2.7 配置路由器,在Cisco路由器上关闭和启动端口 管理员关闭端口打开处于关闭状态的端口,wnt(config)#interface serial 0 wnt(config-if)# shutdown 05:45:29:%LINK-3-UPDOWN:Interface Serial0, changed state to administratively down %LINEPROTO-5-UPDOWN:Line protocol on Interface Serial0, changed state to down,wnt(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,2.4.2.7 配置路由器,保存配置 在Cisco路由器上,wnt#copy running-config startup-config Destination filename startup-config? Building configuration. OK,2.4.2.7 配置路由器,Router#show interfaces serial 1Serial1 is up, line protocol is upHardware is HD64570 Description: 64Kb Line to San Jose : : : : : : : : :,工作正常 存在连接问题 端口硬件问题 管理员关闭端口 ,Serial1 is up, line protocol is up Serial1 is up, line protocol is down Serial1 is down, line protocol is down Serial1 is administratively down, line protocol is down,保持信号,载波侦测信号,2.4.2.7 配置路由器,查看串行端口上的线缆类型 在Cisco路由器上,wnt# show controller serial 0 HD unit 0, idb = 0x121C04, driver structure at 0x127078 buffer size 1524 HD unit 0, V.35 DTE cable ,2.4.2.7 配置路由器,重启路由器 关闭路由器电源,再打开 执行命令,实现重启,2.5.1 使用Telnet连接到远程设备, telnet 10.1.1.1 Trying 10.1.1.1 . Press CTRL+K to abort Connected to 10.1.1.1 . * * Copyright(c) 2004-2007 Hangzhou Huawei-3Com Tech. Co., Ltd. * * Without the owners prior written consent, * * no decompiling or reverse-engineering shall be allowed. * * Login authentication Password: ,远程连接,2.5.6 ping,检验与远程设备的连通性 简单ping 扩展ping,2.5.6.1 简单ping,Router1# ping 10.1.1.10 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 ms,2.5.6.2 扩展ping,扩展ping是交互式的 提供了规定测试数据包的数量和大小、超时时间和数据形式的功能,以作为不同提示的响应 使用方法 Router# ping 然后根据提示输入所需的参数,2.5.7 trace,Router1# trace 10.2.2.2 Type escape sequence to abort. Tracing the route to 10.1.1.101 10.1.1.2 4 msec 4 msec 4 msec2 10.2.2.2 4 msec 4 msec 4 msec Router#,2.6 管理操作系统,路由器内部组件 ROM的功能 Cisco路由器操作系统管理 管理网络设备的文件系统,2.6.1 路由器内部组件,RAM,Config register,ROM,Flash,NVRAM,Interfaces,2.6.2 ROM的功能,ROM,Bootstrap,Mini IOS,ROM monitor,POST,show version,Console,2.6.3 Cisco路由器操作系统管理,Flash,show version,show startup-config,IOS,Console,Config register,NVRAM,发现IOS时的搜索顺序 1. 检查配置寄存器的值 2. 解析 NVRAM里的配置文件 3. 默认的调用Flash里的第一个文件 4. 试图进行网络查询 5. RXBOOT(mini IOS文件) 6. ROMMON,2.6.3 Cisco路由器操作系统管理,判断当前配置注册表的值,wnt# show version Cisco Internetwork Operating System Software IOS (tm) 2500 Software (C2500-JS-L), Version 12.0(8), RELEASE SOFTWARE (fc1) Copyright (c) 1986-1999 by Cisco Systems, Inc. Compiled Mon 29-Nov-99 14:52 by kpma Image text-base:0x03051C3C, 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)wnt uptime is 2 hours, 43 minutes System restarted by power-on System image file is “flash:/c2500-js-l.120-8.bin” Configuration register is 0x2102,2.6.3 Cisco路由器操作系统管理,从Flash中加载IOS,2.6.3 Cisco路由器操作系统管理,装载并且执行NVRAM的配置文件 如果在 NVRAM中没有配置文件,就进入到 setup模式,2.6.3 Cisco路由器操作系统管理,显示运行/启动配置,Router# show startup-config Using 1359 out of 32762 bytes ! version 12.0 !- More -,Router# show running-config Building configuration. Current conf

温馨提示

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

评论

0/150

提交评论