Presentation is loading. Please wait.

Presentation is loading. Please wait.

第四天 路由器简介 Purpose: This chapter reviews general networking theory and introduces students to some of Cisco’s product line. Timing: This chapter takes approximately.

Similar presentations


Presentation on theme: "第四天 路由器简介 Purpose: This chapter reviews general networking theory and introduces students to some of Cisco’s product line. Timing: This chapter takes approximately."— Presentation transcript:

1 第四天 路由器简介 Purpose: This chapter reviews general networking theory and introduces students to some of Cisco’s product line. Timing: This chapter takes approximately 1.5 hours to present. Note: This section has a product selection tool laboratory exercise at the end. Contents: Objectives—This section explains what the student will be able to do at the end of this chapter. Defining Network Components—This section displays where devices are placed in the network. Mapping Business Needs to a Hierarchical Model—This section describes the heirarchical model used in network design. OSI Model Overview—This section reviews the OSI model. Communicating Between Layers—This section describes encapsulation and de-encapsulation. Written Exercise 1—This section has a written exercise to test the students’ knowledge of the OSI model. Physical Layer Functions—This section describes the physical layer of the OSI Model. Data Link Layer Functions—This section describes the data link layer of the OSI Model. Network Layer Functions—This section describes the network layer of the OSI Model. Transport Layer Functions—This section describes the transport layer of the OSI Model.

2 本章目标 通过本章的学习,您应该掌握以下内容: 路由器的基本硬件组成、路由器的引导过程、路由器的功能等
掌握利用修改寄存器值对路由器进行密码恢复 掌握路由器的配置模式、基本配置、登录方式等 掌握通过tftp进行配置备份、ios备份和升级 掌握cdp相关内容和用途 Purpose: this figure states the chapter objectives. Emphasize: Read or state each objective so each student has a clear understanding of the chapter objectives.

3 路由器的基本硬件组成 1.中央处理器(CPU) 2.闪存(FLASH MEMORY)
闪存是一种可擦写的非易失性存储器,用来保存路由器的操作系统,也就是IOS,当路由器启动时,IOS被加载到RAM中,FLASH可以被升级到更大的空间,只要有足够的空间,闪存中可以保存多个IOS

4 路由器的基本硬件组成 3.只读存储器(ROM) 4.随机存取存储器(RAM)
ROM中存储了那些不需要更改或更新的内容,包括:引导程序、基本诊断程序、缩小版的IOS,设备断电或重启后,闪存中的内容不会丢失。 4.随机存取存储器(RAM) 设备在运行时,RAM用来存储一些临时的指令和数据,包括:运行的操作系统、运行的配置文件、IP路由表、ARP缓存、包缓冲区。

5 路由器的基本硬件组成 5.非易失性随机存储器(NVRAM ) nonvolatile ram
设备断电或重启后,NVRAM中的内容不会丢失,NVRAM用来保存配置文件(startup-config),所有对配置文件的改变都保存在RAM中(running-config),并立即生效,如果希望路由器断电或重启后,所作的修改仍然生效,需要对配置文件进行修改,用wr或者copy running-config startup-config。 6.输入/输出端口(input/output I/O) I/O端口就是数据包进出路由器所通过的端口,可以使用show interface 命令来查看路由器所有接口相关的信息

6 路由器外观 1.System power led 电源指示灯 2.System activity led 发送或接收数据包指示灯
3.Cisco 路由器上的模块插槽 4.Compact flash module cf卡 数据存储设备 5.FA0/1和FA0/0 路由器上的快速以太网交换接口 6.Console 控制台接口 7.AUX 辅助配置接口 可利用AUX借助拨号上网对路由器进行远程配置 7.Hwic 高速广域网接口卡 用于广域网的链接

7 固化的端口 2500 路由器—背板一览 WAN串口可以采用固化方式

8 模块化端口 WAN串口可以采用模块化方式 1603 路由器—背板一览 WAN 接口卡 模块 3640 路由器— 背板一览
10BaseT以太网口 AUI以太网口 ISDN BRI S/T 控制口 3640 路由器— 背板一览

9 路由器加电/启动顺序 加电自检 (POST) 加载并运行启动引导微代码 寻找IOS映象文件 加载IOS映象文件 寻找配置文件 加载配置文件
正常运行

10 寻找IOS映象文件 搜索顺序: 1. 检查配置寄存器 2. 解析NVRAM中的配置文件 3. 缺省是使用Flash中的第一个文件
show startup-config NVRAM 配置寄存器 show version 控制台 Flash 搜索顺序: 1. 检查配置寄存器 2. 解析NVRAM中的配置文件 3. 缺省是使用Flash中的第一个文件 4. 尝试从网络启动 5. RXBOOT 6. ROMMON IOS

11 用命令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) by cisco Systems, Inc. Compiled Mon 08-Feb-99 18:18 by phanguye Image text-base: 0x03050C84, data-base: 0x 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" --More-- Configuration register is 0x2102 Slide 1 of 1 Purpose: Emphasize: Use the show version command to display the value of the Config register setting. When you change the config register, we will see from the show version output: Configuration register is 0x2102 (will be 0x2142 at next reload). The new config register value will be used at the next reload. 用命令show version所显示的配置寄存器值

12 设定配置寄存器的值 配置寄存器的3, 2, 1和0位是启动选项位 Router#configure terminal
Router(config)#config-register 0x2102 [Ctrl-Z] Router#reload 配置寄存器的3, 2, 1和0位是启动选项位 Slide 1 of 4 Purpose: This slide shows how to use the config-register command to set the boot field. Emphasize: Layer 1—Shows the example of the config-register command. It assumes the network administrator will set the register to the default setting of 0x2102. (0x means the number is in hex). In this course, limit the focus to the boot field that is formed by bits 3, 2, 1 and 0.

13 设定配置寄存器的值 配置寄存器的3, 2, 1和0位是启动选项位 配置寄存器启动选项部分的值 含义 0x0
Router#configure terminal Router(config)#config-register 0x2102 [Ctrl-Z] Router#reload 配置寄存器的3, 2, 1和0位是启动选项位 配置寄存器启动选项部分的值 含义 进入ROM monitor模式 (人工启动时用 b 命令) Slide 2 of 4 Purpose: Emphasize: Layer 2—Adds the table that identifies the boot field Configuration Register values and meanings. The first value, 0x0, enters ROM monitor mode. Your students should not enter this mode except for password recovery. Refer students to the Doc CD Rom or the “Installation and Maintenance of Cisco Routers (IMCR)” hardware course for more details. 0x0

14 设定配置寄存器的值 配置寄存器的3, 2, 1和0位是启动选项位 配置寄存器启动选项部分的值 含义 0x0 0x1
Router#configure terminal Router(config)#config-register 0x2102 [Ctrl-Z] Router#reload 配置寄存器的3, 2, 1和0位是启动选项位 配置寄存器启动选项部分的值 含义 进入ROM monitor模式 (人工启动时用 b 命令) Slide 3 of 4 Purpose: Emphasize: Layer 3—Adds the second boot field value 0x1. This setting automatically boots the system from ROM and provides a subset of the Cisco IOS image (Rxboot mode). Routing is not enabled in the Rxboot mode. However, the router has IP functionality in the Rxboot mode. For example, from the Rxboot mode, the router can perform a tftp transfers to copy an IOS image from a tftp server to its flash memory. Some routers can store a full IOS image in ROM. 0x0 自动从ROM启动 (提供完整IOS的一个子集) 0x1

15 设定配置寄存器的值 用命令show version来检查配置寄存器的值 配置寄存器的3, 2, 1和0位是启动选项位
Router#configure terminal Router(config)#config-register 0x2102 [Ctrl-Z] Router#reload 配置寄存器的3, 2, 1和0位是启动选项位 用命令show version来检查配置寄存器的值 配置寄存器启动选项部分的值 含义 进入ROM monitor模式 (人工启动时用 b 命令) Slide 4 of 4 Purpose: Emphasize: Layer 4—Finishes with the third case, a boot field setting in the range of 0x2 to 0xF. The entry of a Configuration Register value in the 0x2 to 0xF range is significant. When the router attempts to boot from the net (Netboot), the bootstrap program generates an IOS filename based on the value of the boot field. For example, with the setting 0x2, the default IOS filename generated will be cisco2-xxxx, where xxxx refers to a processor name (for example, 2500). Again, refer students to the IMCR course for details. You use the config-register command to change the value. Notice that the bottom lines of the show version output indicates what the value the config register will be on the next reload. 0x0 自动从ROM启动 (提供完整IOS的一个子集) 0x1 检查NVRAM之 boot system 命令(如果路由器配有Flash则缺省值为 0x2) 0x2 to 0xF

16 从Flash加载IOS映象文件 Flash中的映象文件解压缩到RAM中 RAM IOS Flash 控制台 IOS show flash
Slide 1 of 1 Purpose: Emphasize: Note: The 2500 series routers do not operate this way. The 2500 series routers normally run IOS from flash. The IOS in flash is not compressed but it is relocatable. Relocatable means the IOS image can be ran from flash or from RAM. The 2500 can run from RAM if you use the “boot system tftp” command to boot the IOS image. The Rxboot mode is also ran from RAM on the 2500 routers. IOS show flash Flash中的映象文件解压缩到RAM中

17 使用 show flash 命令 wg_ro_a#sh flash System flash directory:
File Length Name/status c2500-js-l_120-3.bin [ bytes used, available, total] 16384K bytes of processor board System flash (Read ONLY) Slide 1 of 1 Purpose: Emphasize: Note: The current state of the flash memory is in Read ONLY mode. It is running IOS from flash. This router has a total of 16MB of flash memory. The flash contains one IOS image and there are 6.69MB available space left in flash.

18 加载配置文件 从NVRAM中加载并运行配置文件 如果NVRAM中没有配置文件, 进入setup模式 RAM NVRAM Config
IOS show running-config show startup-config 控制台 Slide 1 of 1 Purpose: Emphasize: Using the default config register value (0x2102), the router will load the config from NVRAM at startup. Setup utility 从NVRAM中加载并运行配置文件 如果NVRAM中没有配置文件, 进入setup模式

19 使用 show running 和 show startup 命令
存在RAM中 存在NVRAM中 wg_ro_c#show running-config Building configuration... Current configuration: ! version 12.0 ! -- More -- wg_ro_c#show startup-config Using 1359 out of bytes ! version 12.0 -- More -- Slide 1 of 1 Purpose: This slide is a repeated slide from chapter 4. Emphasize: 显示当前运行的和保存的配置情况

20 copy startup running (合并)
配置参数的来源 RAM NVRAM copy running startup Config Config copy startup running (合并) Slide 1 of 4 Purpose: Emphasize: When copying to RAM, it is always a merge not an overwrite. Explain on the board the difference between a merge versus an overwrite. Explain the general syntax of the copy command: copy <from> <to> With 12.0, the copy command supports a new syntax. The new syntax is explained in a later slide. NVRAM

21 copy startup running (合并)
配置参数的来源 RAM NVRAM copy running startup Config Config copy startup running (合并) config term (合并) Slide 2 of 4 Purpose: Emphasize: NVRAM Terminal

22 copy startup running (合并)
配置参数的来源 RAM NVRAM copy running startup Config Config copy startup running (合并) config term (合并) copy tftp run (合并) Console Slide 3 of 4 Purpose: Emphasize: Note: The Cisco TFTP server software which runs on Windows 95/98/NT can be downloaded from the url listed below: A Cisco router can also be configured to be a tftp server using the “tftp-server” global configuration command. copy tftp start copy run tftp NVRAM Terminal TFTP 服务器 copy start tftp TFTP 服务器

23 copy startup running (合并)
配置参数的来源 RAM NVRAM copy running startup Config Config copy startup running (合并) config term (合并) erase start copy tftp run (合并) Console Slide 4 of 4 Purpose: Emphasize: copy tftp start Blank 000000 NVRAM Terminal TFTP server 删除启动配置文件 copy run tftp copy start tftp TFTP 服务器

24 使用copy run tftp 和 copy tftp run 命令
wg_ro_a#copy running-config tftp Address or name of remote host []? Destination filename [running-config]? wgroa.cfg .!! 1684 bytes copied in secs (129 bytes/sec) wg_ro_a#copy tftp running-config Source filename []? wgroa.cfg Destination filename [running-config]? Accessing tftp:// /wgroa.cfg... Loading wgroa.cfg from (via Ethernet0): ! [OK /3072 bytes] 1684 bytes copied in secs (99 bytes/sec) Slide 1 of 1 Purpose: Emphasize: Note: Release 12.0 supports new syntax for the “copy” command.

25 路由器的登录方式 1.Console口登录 2.Aux远程登录 3.telnet登录 4.http登录 5.Ssh登录

26 路由器的操作模式 用户模式 特权模式 全局配置模式 其他配置模式
提示符为 > 做一些简单的配置和show 特权模式 用户模式下输入Enable 进入特权模式,提示符为 # 特权模式可以做一些简单的配置 主要是show 和debug 用 exit 退入用户模式 全局配置模式 特权模式下输入configure terminal进入全局配置模式,提示符为(config)#,路由器的所有主要配置在全局配置模式下进行 用exit退入特权模式 其他配置模式 接口配置模式、路由器配置模式、线路配置模式,这些模式下可以敲ctrl+z或者end直接退回特权模式

27 路由器模式一览 用户模式 特权模式 全局配置模式 配置模式 模式提示 Router>enable Ctrl-Z (end)
Router#config term Exit Router(config)# 配置模式 模式提示 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)#

28 一些有用的信息 在线帮助 命令的简写 配置历史命令缓存 快捷键和高级编辑功能 “?” 缩写能保证命令的唯一就可以,用tab键补全命令
Show history Teiminal history buffer 快捷键和高级编辑功能 Tab 补全命令 ctrl+p 调出前一条命令 ctrl+n 调出后一条命令 ctrl+z 在配置模式下,直接退入特权模式下 ctrl+shift+6 放弃dns查找,ping包,traceroute操作等

29 Setup 模式 路由器启动后,如果找不到配置文件,则会进入setup模式 可以在特权模式下输入:setup进入setup模式

30 路由器常用配置 路由器命名 旗帜创建 设置日期/时间 全局配置下输入hostname XXXXXX,网络设备命名规则(用途、功能、ip等)
Banner login banner exec 设置日期/时间 Clock set xxx Clock timezone xxx

31 路由器常用配置 配置路由器接口 配置路由器密码 配置主机名列表 接口分局域网接口和广域网接口,接口描述,时钟,secondary地址等
配置console端口密码 ,配置特权模式密码,配置远程登录密码,用service password-encryption 对密码进行加密 配置主机名列表 配完主机名列表后,会有一个hosts文件用来定义主机名和ip地址的对应关系,以后直接用主机名和ip进行对应 配置关闭域名使用服务 No ip domain-lookup

32 路由器常用配置 配置路由器的远程登录 必须配置enable密码和telnet密码,终端才能登录设备
Show session 查看路由器打开的会话 Disconnect 会话号 断开会话 Show user 查看当前登录到路由器的用户 Clear line vty x 断开登录user

33 用Telnet 连接到远端设备 交换机A 路由器A 路由器B 交换机B S1 S0 10.1.1.2 10.1.1.1 10.3.3.2
RouterA#telnet Trying Open Catalyst 1900 Management Console Copyright (c) Cisco Systems, Inc All rights reserved. Enterprise Edition Software Ethernet Address: PCA Number: PCA Serial Number: FAA02359H8K Model Number: WS-C1924-EN System Serial Number: FAA0237X0FQ . SwitchB> Slide 1 of 1 Purpose: Emphasize: Another way to learn about a remote device is to connect to it. Telnet, a virtual terminal protocol that is part of the TCP/IP protocol suite, allows connections to remote hosts. By default, a router can have up to five simultaneous incoming Telnet sessions. With Cisco’s implementation of TCP/IP, you need not enter the connect or telnet command to establish a Telnet connection. If you prefer, you can just enter the learned host name, the router will resolve the hostname using DNS or a local host table. To end a Telnet session, use the exit or logout EXEC command. These are alternate commands for the operations listed on the graphic: Initiate a session: Denver> connect paris Denver> paris Denver> Resume a session (enter session number or name): Denver> 1 Paris> End a session: Paris> exit Note: The Cat 1900 can accept incoming telnet connections but can not initiate an outgoing telnet session. 远端设备

34 查看Telnet连接 交换机A 路由器A 路由器B 交换机B S1 S0 10.1.1.2 10.1.1.1 10.3.3.2
RouterA#sh session Conn Host Address Byte Idle Conn Name * RouterA#sh user Line User Host(s) Idle Location * 0 con 11 vty idle Slide 1 of 1 Purpose: Emphasize: Note: This output was taken from a Line 11 = VTY 0. You can send messages to one or all terminal lines. A common reason for doing this is to inform users of an impending shutdown. To send a message to other terminals, issue the following command: send {line-number | *} Syntax Description line-number Specifies the line number to which the message will be sent. * Indicates that the message will be sent to all lines. The system prompts for the message, which can be up to 500 characters long. End the message by entering Ctrl-Z. Enter Ctrl-C to abort the command.

35 挂起一个Telnet会话 交换机A 路由器A 路由器B 交换机B S1 S0 10.1.1.2 10.1.1.1 10.3.3.2
RouterB#<Ctrl-Shift-6>x RouterA#sh session Conn Host Address Byte Idle Conn Name RouterA#resume 1 RouterB# Slide 1 of 1 Purpose: Emphasize: The key stoke sequence for Ctrl-Shift-6 and x.

36 关闭一个Telnet会话 关闭由自己建立的当前会话 关闭由远端设备建立的会话 交换机A 路由器A 路由器B 交换机B S1 S0
RouterA#disconnect Closing connection to [confirm] RouterA#clear line 11 [confirm] [OK] 关闭由自己建立的当前会话 Slide 1 of 1 Purpose: Emphasize: Note: Disconnect without the session number disconnect that last active session. 关闭由远端设备建立的会话

37 映象文件备份的准备 确认可以访问到网络服务 网络 服务器 路由器 Slide 1 of 4
Purpose: This slide establishes an overview and reason to use the TFTP server as a load source or backup destination for Cisco IOS software. It then presents the preparation details needed before executing TFTP copies. Emphasize: Geographically distributed routers need a source or backup location for software images. Using a network server allows image and configuration uploads and downloads over the network. The network server can be another router, a workstation, or a host system. A router can be configured as a tftp server using the tftp-server global configuration command. Layer one - First, you need to check that you have access to the network server. Example, use the ping command to see if you can reach the server.

38 映象文件备份的准备 确认可以访问到网络服务 确认服务器上有足够的空间 网络 服务器 路由器 Slide 2 of 4 Purpose:
Emphasize: Layer 2 — you need to check that you have enough disk space on the tftp server to house the new system image. On the router, use the show flash command to determine the length of the IOS image.

39 映象文件备份的准备 确认可以访问到网络服务 确认服务器上有足够的空间 确认文件名 网络 服务器 路由器
c2500-js-l_120-3.bin 网络 服务器 路由器 确认可以访问到网络服务 确认服务器上有足够的空间 确认文件名 Slide 2 of 4 Purpose: Emphasize: Layer 3 — you need to check the naming conventions required on the server. Example, what is the max number of characters allowed in the filename by the server’s O.S? What is the max number of characters allowed in the filename extension by the server’s O.S?

40 映象文件备份的准备 确认可以访问到网络服务 确认服务器上有足够的空间 确认文件名 需要时在服务器上创建文件 网络 服务器 路由器
c2500-js-l_120-3.bin 网络 服务器 路由器 确认可以访问到网络服务 确认服务器上有足够的空间 确认文件名 需要时在服务器上创建文件 Slide 4 of 4 Purpose: Emphasize: Layer 4—On some Unix server, you may have to first create the file first before you can download the IOS image from the router to the tftp server. You can use the “touch” Unix command to create an empty file on the Unix server.

41 备份命令 备份命令 Show flash 查看配置文件 Copy flash xxx tftp 恢复命令
Copy tftp xxx flash Copy startup-config running-config

42 补 充 清除所有配置命令 用crt或者超级终端捕捉屏幕显示 Erase startup-config 后重启
从tftp 拷贝配置后,执行copy startup-config running-config 用crt或者超级终端捕捉屏幕显示

43 确认存贮空间并解析文件名 确认Flash中有足够空间来存放IOS映象文件 wg_ro_a#show flash
System flash directory: File Length Name/status c2500-js-l_120-3.bin [ bytes used, available, total] 16384K bytes of processor board System flash (Read ONLY) 确认Flash中有足够空间来存放IOS映象文件 Slide 1 of 1 Purpose: Emphasize: The show flash command is an important tool to use to gather information about your router memory and image file. Caution students that they must know that they are loading the correct and appropriate image. The name for the Cisco IOS image file contains multiple parts, each with a specific meaning: The first part of the image name contains the platform on which the image runs. In this example, the platform is C2500. The second part of the name identifies the special capabilities of the image file. A letter or series of letters identifies the feature sets supported in that image. In this example, the j indicates this is an enterprise image, and the s indicates it contains extended capabilities. The third part of the name specifies where the image runs and if the file is compressed. In this example, l indicates the file is relocatable and not compressed. Relocatable means the IOS can be ran from flash or from RAM. You should be careful in reading the Cisco IOS image filename. Some fonts display the lowercase letter “l” and the number 1 as the same character. How you type the characters will impact the ability of the router to load the files correctly. The fourth part of the name indicates the version number. In this example, the version number is 12.0 (3). The final part of the name is the file extension. The .bin extension indicates this file is a binary executable file. The Cisco IOS software naming conventions, name part field meaning, image content, and other details are subject to change. Refer to Cisco Connection Online (CCO) for updated details.

44 作映象文件的备份 在升级IOS前备份当前的映象文件 网络 服务器 copy flash tftp FLASH
wg_ro_a#copy flash tftp Source filename []? c2500-js-l_120-3.bin Address or name of remote host []? Destination filename [c2500-js-l_120-3.bin]? !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! <output omitted> bytes copied in secs (14223 bytes/sec) wg_ro_a# Slide 1 of 1 Purpose: This slide discusses how to create a backup version of a Cisco IOS software image to a tftp server. Emphasize: Routers by default comes with Flash memory that have a preloaded copy of the Cisco IOS software. Although Flash is extremely reliable—good for 65 years and 100,000 rewrites—it is a good idea to make a backup copy of the Cisco IOS software if you have a tftp server available. If you had to replace Flash memory for some reason, you would have a backup copy at the revision level currently running on your network. The copy command screen output varies depending on the Cisco IOS software level. Determine the platform type of your tftp server prior to beginning the backup procedure. The tftp server may be running Windows, UNIX, Mac or other O.S . Filename and directory access procedures may vary depending on the tftp server platform and platform version. 在升级IOS前备份当前的映象文件

45 从网络升级IOS 加载新的映象文件前对Flash作适当的文件删除 注意关于映象文件已经存在的提示信息 网络 服务器 FLASH
wg_ro_a#copy tftp flash Address or name of remote host [ ]? Source filename []? c2500-js-l_120-3.bin Destination filename [c2500-js-l_120-3.bin]? Accessing tftp:// /c2500-js-l_120-3.bin... Erase flash: before copying? [confirm] Erasing the flash filesystem will remove all files! Continue? [confirm] Erasing device... eeeee (output omitted) ...erased Erase of flash: complete Loading c2500-js-l_120-3.bin from (via Ethernet0): !!!!!!!!!!!!!!!!!!!! (output omitted) [OK / bytes] Verifying checksum... OK (0x9AA0) bytes copied in secs (32636 bytes/sec) wg_ro_a# Slide 1 of 1 Purpose: This slide describes how to load a backup version of a Cisco IOS software image from a tftp server to the router. Emphasize: If you need more flash space to load a copy of the Cisco IOS software, then you must first erase the Flash memory. You cannot erase a single image—you must erase all copies of Cisco IOS software from Flash. However, if Flash memory on the router is partitioned, you can erase one or more of the parts. After the tftp transfer is completed, use the show flash command to view the file size to compare its size with that of the original on the server. If the IOS is running from flash, then the flash is in the read only state. To change the flash to a writeable state: you can use the boot system tftp command to boot an IOS from a tftp server and the IOS will be ran from RAM or you can go to the Rxboot mode to perform the copy. 加载新的映象文件前对Flash作适当的文件删除 注意关于映象文件已经存在的提示信息

46 CDP协议 Cisco Discovery Protocol
上层地址 TCP/IP Novell IPX AppleTalk Others Cisco专有的链路层协议 CDP能 发现并显示关于直接相连的Cisco设备的信息 介质必须能够支持 SNAP 帧中继 LANs ATM Others 是一个提供关于直接相连的交换机、路由器和其它Cisco设备的综合信息的专有工具 CDP 能够发现直接相邻的设备而不管这些设备所运行的是什么协议栈 物理介质必须能够支持Subnetwork Access Protocol (SNAP) Slide 1 of 1 Purpose: Emphasize: Note: CDP is sent using multicast frame with the MAC address ccc.cccc.

47 用CDP发现直接相邻的设备 CDP运行在使用10.3或更新版Cisco IOS的路由器以及Cisco 交换机和集线器上 能获取的信息包括:
设备名 对应各协议的地址 端口名 角色特征 平台 CDP Slide 1 of 1 Purpose: Emphasize: CDP is media- and protocol-independent and runs on all Cisco-manufactured equipment including routers, access servers, switches and some managed hubs. With CDP, network management applications can retrieve the device type and SNMP agent address of neighboring devices. This capability enables applications to send SNMP queries to neighboring devices. CDP allows network management applications to dynamically discover Cisco devices that are neighbors. CDP runs on all media that support Subnetwork Access Protocol, including LAN and Frame Relay. CDP runs over the data link layer only, not the network layer. Therefore, two systems that support different network-layer protocols can learn about each other. Cached CDP information is available to network management applications. Cisco devices never forward a CDP packet. When new information is received, old information is discarded. The holdtime determines how long to keep existing information from a neighbor. CDP CDP show cdp

48 使用 CDP 交换机A 路由器A 路由器B 交换机B S1 S0 10.1.1.2 10.1.1.1 10.3.3.2 10.3.3.1
RouterA#sh cdp ? entry Information for specific neighbor entry interface CDP interface status and configuration neighbors CDP neighbor entries traffic CDP statistics <cr> RouterA(config)#no cdp run RouterA(config)#interface serial0 RouterA(config-if)#no cdp enable Slide 1 of 1 Purpose: Emphasize: Note: Some of the CDP commands are not available on the Cat 1900 switch, like “cdp run”, “show cdp traffic”, and “show cdp entry”.

49 使用show cdp neighbor 命令 交换机A同时也显示其Mac地址 交换机A 路由器A 路由器B 交换机B S1 S0
RouterA#sh cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater Device ID Local Intrfce Holdtme Capability Platform Port ID RouterB Ser R Ser 1 SwitchA0050BD Eth T S Slide 1 of 1 Purpose: Emphasize: This graphic shows the show cdp neighbors command initiated from a router, which displays a summary of the capabilities and access details for the CDP neighbors. The show cdp neighbors detail command shows detailed information about the same devices. Note: If the neighbor is a Cat 1900 switch, the switch mac address is also displayed. If the switch is a 2900xl, its mac address is not displayed. 交换机A同时也显示其Mac地址

50 使用show cdp entry 命令 交换机A 路由器A 路由器B 交换机B S1 S0 10.1.1.2 10.1.1.1
RouterA#sh cdp entry * Device ID: RouterB Entry address(es): IP address: Platform: cisco 2522, Capabilities: Router Interface: Serial0, Port ID (outgoing port): Serial1 Holdtime : 168 sec Version : Cisco Internetwork Operating System Software IOS (tm) 2500 Software (C2500-JS-L), Version 12.0(3), RELEASE SOFTWARE (fci) Copyright (c) by cisco Systems, Inc. Compiled Mon 08-Feb-99 18:18 by phanguye Slide 1 of 1 Purpose: Emphasize: The example shows what information can be obtained about RouterA’s neighbor. CDP is one way to learn about other Cisco devices on the network.

51 其它CDP命令 交换机A 路由器A 路由器B 交换机B S1 S0 10.1.1.2 10.1.1.1 10.3.3.2 10.3.3.1
RouterA#sh cdp traffic CDP counters : Packets output: 56, Input: 38 Hdr syntax: 0, Chksum error: 0, Encaps failed: 3 No memory: 0, Invalid packet: 0, Fragmented: 0 RouterA#sh cdp interface BRI0 is administratively down, line protocol is down Encapsulation HDLC Sending CDP packets every 60 seconds Holdtime is 180 seconds Slide 1 of 1 Purpose: Emphasize: Note: The holdtime indicates how long the neighbor information will be kept in the local CDP table.

52 使用ping 和trace 命令 测试对远端设备的连接性和路径 Router##ping 10.1.1.10
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms Router#trace Tracing the route to msec 4 msec 4 msec Router# Slide 1 of 1 Purpose: Emphasize: As you use CDP and Telnet you should note the information retrieved from the devices you successfully contacted. Documenting that information helps put the network into a visual perspective, and can be referenced at a later time. This concludes the network discovery portion of the chapter. In the next section, we will discuss configuration file and IOS image management. 测试对远端设备的连接性和路径


Download ppt "第四天 路由器简介 Purpose: This chapter reviews general networking theory and introduces students to some of Cisco’s product line. Timing: This chapter takes approximately."

Similar presentations


Ads by Google