Cisco IOS 1999 Cisco Systems Inc 4 1

  • Slides: 70
Download presentation
第四章 操作与配置 Cisco IOS设备 © 1999, Cisco Systems, Inc. 4 -1

第四章 操作与配置 Cisco IOS设备 © 1999, Cisco Systems, Inc. 4 -1

检查交换机指示灯(LEDs) © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -12

检查交换机指示灯(LEDs) © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -12

交换机初次启动时的显示信息 Catalyst 1900 Management Console Copyright (c) Cisco Systems, Inc. 1993 -1998 All rights

交换机初次启动时的显示信息 Catalyst 1900 Management Console Copyright (c) Cisco Systems, Inc. 1993 -1998 All rights reserved. Enterprise Edition Software Ethernet Address: 00 -50 -BD-73 -E 2 -C 0 PCA Number: 73 -3121 -01 PCA Serial Number: FAA 0252 A 0 QX Model Number: WS-C 1924 -EN System Serial Number: FAA 0304 S 0 U 3 Power Supply S/N: PHI 025101 F 3 ------------------------1 user(s) now active on Management Console. 控制台连接 User Interface Menu [M] Menus [K] Command Line [I] IP Configuration Enter Selection: © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -14

登入交换机并键入特权模式密码 控制台 > > enable Enter password: # # disable > quit © 1999,

登入交换机并键入特权模式密码 控制台 > > enable Enter password: # # disable > quit © 1999, Cisco Systems, Inc. 用户模式提示 特权模式提示 www. cisco. com ICND— 4 -15

显示交换机初始启动的状态 Switch#show version Switch#show running-config Switch#show interfaces 显示交换机的各种运行状态 © 1999, Cisco Systems, Inc. www.

显示交换机初始启动的状态 Switch#show version Switch#show running-config Switch#show interfaces 显示交换机的各种运行状态 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -17

交换机之show version 命令 wg_sw_c#show version Cisco Catalyst 1900/2820 Enterprise Edition Software Version V 8.

交换机之show version 命令 wg_sw_c#show version Cisco Catalyst 1900/2820 Enterprise Edition Software Version V 8. 01 written from 171. 068. 229. 225 Copyright (c) Cisco Systems, Inc. 1993 -1998 wg_sw_c uptime is 15 day(s) 21 hour(s) 53 minute(s) 11 second(s) cisco Catalyst 1900 (486 sxl) processor with 2048 K/1024 K 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 -E 2 -C 0 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -18

交换机之show runningconfiguration 命令 Catalyst 1924 wg_sw_c#show run Building configuration. . . Current configuration: !

交换机之show runningconfiguration 命令 Catalyst 1924 wg_sw_c#show run Building configuration. . . Current configuration: ! hostname "wg_sw_c" ! ip address 10. 1. 1. 33 255. 0 ip default-gateway 10. 3. 3. 3 ! interface Ethernet 0/1 <text omitted> interface Ethernet 0/24 ! Interface Ethernet 0/25 ! interface Fast. Ethernet 0/26 ! interface Fast. Ethernet 0/27 © 1999, Cisco Systems, Inc. Catalyst 1912 wg_sw_c#show run Building configuration. . . Current configuration: ! hostname "wg_sw_c" ! ip address 10. 1. 1. 33 255. 0 ip default-gateway 10. 3. 3. 3 ! interface Ethernet 0/1 <text omitted> interface Ethernet 0/12 ! Interface Ethernet 0/25 ! interface Fast. Ethernet 0/26 ! interface Fast. Ethernet 0/27 www. cisco. com ICND— 4 -19

交换机之show interfaces命令 wg_sw_c#show interfaces ethernet 0/1 Ethernet 0/1 is Enabled Hardware is Built-in 10

交换机之show interfaces命令 wg_sw_c#show interfaces ethernet 0/1 Ethernet 0/1 is Enabled Hardware is Built-in 10 Base-T Address is 0050. BD 73. E 2 C 1 MTU 1500 bytes, BW 10000 Kbits 802. 1 d 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-- © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -20

查看交换机的IP地址 wg_sw_a#show ip IP Address: 10. 5. 5. 11 Subnet Mask: 255. 0 Default

查看交换机的IP地址 wg_sw_a#show ip IP Address: 10. 5. 5. 11 Subnet Mask: 255. 0 Default Gateway: 10. 5. 5. 3 Management VLAN: 1 Domain name: Name server 1: 0. 0 Name server 2: 0. 0 HTTP server : Enabled HTTP port : 80 RIP : Enabled wg_sw_a# © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -21

配置交换机 配置模式: • 全局配置模式 – wg_sw_a# conf term – wg_sw_a(config)# • 端口配置模式 – wg_sw_a(config)#

配置交换机 配置模式: • 全局配置模式 – wg_sw_a# conf term – wg_sw_a(config)# • 端口配置模式 – wg_sw_a(config)# interface e 0/1 – wg_sw_a(config-if)# © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -22

配置交换机的各种标识 交换机名 (config)#hostname wg_sw_c(config)# 为交换机设置本地标识 © 1999, Cisco Systems, Inc. www. cisco. com ICND—

配置交换机的各种标识 交换机名 (config)#hostname wg_sw_c(config)# 为交换机设置本地标识 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -23

配置交换机IP地址 wg_sw_a(config)# ip address {ip address} {mask} wg_sw_a(config)#ip address 10. 5. 5. 11 255.

配置交换机IP地址 wg_sw_a(config)# ip address {ip address} {mask} wg_sw_a(config)#ip address 10. 5. 5. 11 255. 0 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -24

Cisco路由器的初始启动 • 系统启动例程会初始化路由器 • 如果需要,路由器可以有选择性地回退启动 Check hardware 1. 启动前确认正确连接线缆和控制线 Load Bootstrap 2. 按下电源开关 Find

Cisco路由器的初始启动 • 系统启动例程会初始化路由器 • 如果需要,路由器可以有选择性地回退启动 Check hardware 1. 启动前确认正确连接线缆和控制线 Load Bootstrap 2. 按下电源开关 Find and load Cisco IOS 3. 观察启动顺序 software image Cisco IOS输出到控制台上的内容 Find apply router configuration information © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -25

路由器启动时在控制台上的输出 内容 控制台 --- System Configuration Dialog --Continue with configuration dialog? [yes/no]: yes At

路由器启动时在控制台上的输出 内容 控制台 --- 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 '[ ]'. wg_ro_c con 0 is now available Press RETURN to get started. Setup模式 wg_ro_c> 用户模式 提示 没有配置文件与有配置文件的路由器启动对比 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -26

Setup: 初始配置对话框 Router#setup --- System Configuration Dialog --Continue with configuration dialog? [yes/no]: y At

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 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -27

预先浏览端口配置情况 First, would you like to see the current interface summary? [yes]: Interface BRI

预先浏览端口配置情况 First, would you like to see the current interface summary? [yes]: Interface BRI 0 IP-Address unassigned OK? Method Status Protocol YES unset administratively down BRI 0: 1 unassigned YES unset administratively down BRI 0: 2 unassigned YES unset administratively down Ethernet 0 Serial 0 unassigned YES unset administratively down • 自检过程中所找到的端口 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -28

设置全局参数 Configuring global parameters: Enter host name [Router]: wg_ro_c The enable secret is a

设置全局参数 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]: 初始化全局参数 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -29

设置全局参数(续) Configure LAT? [yes]: n Configure Apple. Talk? [no]: Configure DECnet? [no]: Configure IP?

设置全局参数(续) Configure LAT? [yes]: n Configure Apple. Talk? [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]: 初始化协议配置 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -30

设置端口参数 BRI interface needs isdn switch-type to be configured Valid switch types are :

设置端口参数 BRI interface needs isdn switch-type to be configured Valid switch types are : [0] none. . Only if you don't want to configure BRI. [1] basic-1 tr 6. . 1 TR 6 switch type for Germany [2] basic-5 ess. . AT&T 5 ESS switch type for the US/Canada [3] basic-dms 100. . Northern DMS-100 switch type for US/Canada [4] basic-net 3. . NET 3 switch type for UK and Europe [5] basic-ni. . . National ISDN switch type [6] basic-ts 013. . . TS 013 switch type for Australia [7] ntt. . . NTT switch type for Japan [8] vn 3. . . VN 3 and VN 4 switch types for France Choose ISDN BRI Switch Type [2]: Configuring interface parameters: Do you want to configure BRI 0 (BRI d-channel) interface? [no]: Do you want to configure Ethernet 0 interface? [no]: y Configure IP on this interface? [no]: y IP address for this interface: 10. 1. 1. 33 Subnet mask for this interface [255. 0. 0. 0] : 255. 0 Class A network is 10. 0, 24 subnet bits; mask is /24 Do you want to configure Serial 0 interface? [no]: © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -31

设置脚本的确认与应用 The following configuration command script was created: hostname Router interface BRI 0 enable

设置脚本的确认与应用 The following configuration command script was created: hostname Router interface BRI 0 enable secret 5 $1$/CCk$4 r 7 z. Dw. DNeqkx. FO. k. Jx. C 3 G 0 shutdown enable password sanfran no ip address line vty 0 4 ! password sanjose interface Ethernet 0 no snmp-server no shutdown ! ip address 10. 1. 1. 31 255. 0 no appletalk routing no mop enabled no decnet routing ! ip routing interface Serial 0 no clns routing shutdown no ipx routing no ip address no vines routing <text omitted> no xns routing end no apollo routing isdn switch-type basic-5 ess [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]: © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -32

登入路由器 Console wg_ro_c con 0 is now available Press RETURN to get started. 用户模式提示

登入路由器 Console wg_ro_c con 0 is now available Press RETURN to get started. 用户模式提示 wg_ro_c>enable wg_ro_c#disable wg_ro_c>logout © 1999, Cisco Systems, Inc. 特权模式提示 www. cisco. com ICND— 4 -33

路由器在用户模式下的命令清单 wg_ro_c>? Exec commands: access-enable Create a temporary Access-List entry atmsig Execute Atm Signalling

路由器在用户模式下的命令清单 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 -- 只要所输命令串在全部命令中是唯一的,可以将一个命令尽 可能地简写, © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -34

路由器在特权模式下的命令清单 wg_ro_c#? Exec commands: access-enable Create a temporary Access-List entry access-profile Apply user-profile to

路由器在特权模式下的命令清单 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键 就可以完整地输入一个命令 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -35

路由器的上下文相关联帮助 Router# clok Translating "CLOK" % Unknown command or computer name, or unable to

路由器的上下文相关联帮助 Router# clok Translating "CLOK" % Unknown command or computer name, or unable to find computer address Router# cl? clear clock Router# clock • 符号解析 % Incomplete command. • 命令提示 Router# • 调出最近用过的内容 set clock ? Set the time and date Router# clock set % Incomplete command. Router# <Ctrl-P>clock set ? hh: mm: ss Current Time © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -37

路由器的上下文相关联帮助(续) Router# clok Translating "CLOK" % Unknown command or computer name, unable to find

路由器的上下文相关联帮助(续) Router# clok Translating "CLOK" % Unknown command or computer name, unable to find computer address Router# clock set or 19: 56: 00 % Incomplete command. Router# clear clock Router# clock set 19: 56: 00 ? Router# <1 -31> Day of the month MONTH Month of the year • 命令提示 % Incomplete command. Router# ^ Router# set Set the time date %and Invalid Router# • 语法检查 clock set 19: 56: 00 04 8 Router# input detected at the '^' marker • 命令提示 clock set 19: 56: 00 04 August command. % Incomplete command. % Incomplete Router# clock set 19: 56: 00 04 August ? <1993 -2035> hh: mm: ss Current Time Year © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -38

使用增强的编辑命令 Router>Shape the future of internetworking by creating unpreced “Shape the future of internetworking

使用增强的编辑命令 Router>Shape the future of internetworking by creating unpreced “Shape the future of internetworking by creating unprecedented value for customers, employees, and partners. ” 上述文字段在输入时会超出一行 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -39

使用增强的编辑命令 Router>$ future of internetworking by creating unprecedented op (一行中长字串会自动滚卷). © 1999, Cisco Systems,

使用增强的编辑命令 Router>$ future of internetworking by creating unprecedented op (一行中长字串会自动滚卷). © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -40

使用增强的编辑命令 Router>Shape the value of internetworking by creating unpreced (一行中长字串会自动滚卷). <Ctrl-A> © 1999, Cisco

使用增强的编辑命令 Router>Shape the value of internetworking by creating unpreced (一行中长字串会自动滚卷). <Ctrl-A> © 1999, Cisco Systems, Inc. 光标移动到命令行的开始位置. www. cisco. com ICND— 4 -41

使用增强的编辑命令 Router>$ value for customers, employees, and partners. (一行中长字串会自动滚卷). © 1999, Cisco Systems, Inc.

使用增强的编辑命令 Router>$ value for customers, employees, and partners. (一行中长字串会自动滚卷). © 1999, Cisco Systems, Inc. <Ctrl-A> 光标移动到命令行的开始位置. <Ctrl-E> 光标移动到命令行的结束位置. www. cisco. com ICND— 4 -42

回览之前用过的命令 Ctrl-P or Up arrow 调出最近(前一)使用过的命令 Ctrl-N or Down arrow 调出更近使用过的命令 Router> show history

回览之前用过的命令 Ctrl-P or Up arrow 调出最近(前一)使用过的命令 Ctrl-N or Down arrow 调出更近使用过的命令 Router> show history 显示命令保存区内容 Router> terminal history size lines 设置命令保存区大小 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -48

show version 命令 wg_ro_a#show version Cisco Internetwork Operating System Software IOS (tm) 2500 Software

show version 命令 wg_ro_a#show version Cisco Internetwork Operating System Software IOS (tm) 2500 Software (C 2500 -JS-L), Version 12. 0(3), RELEASE SOFTWARE (fc 1) Copyright (c) 1986 -1999 by cisco Systems, Inc. Compiled Mon 08 -Feb-99 18: 18 by phanguye Image text-base: 0 x 03050 C 84, data-base: 0 x 00001000 ROM: System Bootstrap, Version 11. 0(10 c), SOFTWARE BOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11. 0(10 c), RELEASE SOFTWARE(fc 1) wg_ro_a uptime is 20 minutes System restarted by reload System image file is "flash: c 2500 -js-l_120 -3. bin" (output omitted) --More-Configuration register is 0 x 2102 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -49

查看配置情况 RAM NVRAM Config IOS show running-config show startup-config 控制台 Setup utility 将配置参数保存到NVRAM中 ©

查看配置情况 RAM NVRAM Config IOS show running-config show startup-config 控制台 Setup utility 将配置参数保存到NVRAM中 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -50

show running 和 show startup 命令 保存在RAM中 wg_ro_c#show running-config Building configuration. . . Current

show running 和 show startup 命令 保存在RAM中 wg_ro_c#show running-config Building configuration. . . Current configuration: ! version 12. 0 ! -- More -- 保存在NVRAM中 wg_ro_c#show startup-config Using 1359 out of 32762 bytes ! version 12. 0 ! -- More -- 显示当前运行的和保存的配置情况 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -51

路由器模式一览 Router>enable 用户模式 特权模式 Router#config term 全局配置模式 Router(config)# 配置模式 Interface Subinterface Controller Line Router

路由器模式一览 Router>enable 用户模式 特权模式 Router#config term 全局配置模式 Router(config)# 配置模式 Interface Subinterface Controller Line Router IPX router © 1999, Cisco Systems, Inc. Ctrl-Z (end) Exit 模式提示 Router(config-if)# Router(config-subif)# Router(config-controller)# Router(config-line)# Router(config-router)# Router(config-ipx-router)# www. cisco. com ICND— 4 -52

保存配置 wg_ro_c#copy running-config startup-config Destination filename [startup-config]? Building configuration… wg_ro_c# 将当前运行的配置复制到NVRAM中 © 1999, Cisco

保存配置 wg_ro_c#copy running-config startup-config Destination filename [startup-config]? Building configuration… wg_ro_c# 将当前运行的配置复制到NVRAM中 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -53

配置路由器的各种标识 路由器名 Router(config)#hostname wg_ro_c(config)# 开机时的固定显示信息 wg_ro_c(config)#banner motd # Accounting Department You have entered a

配置路由器的各种标识 路由器名 Router(config)#hostname wg_ro_c(config)# 开机时的固定显示信息 wg_ro_c(config)#banner motd # Accounting Department You have entered a secured system. Authorized access only! # 为路由器或其端口设置标识或信息 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -54

配置路由器的各种标识 路由器名 Router(config)#hostname wg_ro_c(config)# 开机时的固定显示信息 wg_ro_c(config)#banner motd # Accounting Department You have entered a

配置路由器的各种标识 路由器名 Router(config)#hostname 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 为路由器或其端口设置标识或信息 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -55

路由器密码配置 控制台密码 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 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 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -56

路由器密码配置 控制台密码 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 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 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -57

其它控制台命令 Router(config)#line console 0 Router(config-line)#exec-timeout 0 0 • 禁止控制台会话自动退出 Router(config)#line console 0 Router(config-line)#logging synchronous

其它控制台命令 Router(config)#line console 0 Router(config-line)#exec-timeout 0 0 • 禁止控制台会话自动退出 Router(config)#line console 0 Router(config-line)#logging synchronous • 重显被打乱的控制台输入 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -58

端口配置 Router(config)#interface type number Router(config-if)# • type 包括 serial, ethernet, token ring, fddi, hssi,

端口配置 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-if)#exit • 从当前端口配置模式退出 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -59

配置串口 进入全局配置模式 指定某个端口 © 1999, Cisco Systems, Inc. Router#configure term Router(config)#interface serial 0 Router(config-if)#

配置串口 进入全局配置模式 指定某个端口 © 1999, Cisco Systems, Inc. Router#configure term Router(config)#interface serial 0 Router(config-if)# www. cisco. com ICND— 4 -60

配置串口 进入全局配置模式 Router#configure term Router(config)# 指定某个端口 Router(config)#interface serial 0 Router(config-if)# 设置时钟频率 (只在DCE端) Router(config-if)#clock rate

配置串口 进入全局配置模式 Router#configure term Router(config)# 指定某个端口 Router(config)#interface serial 0 Router(config-if)# 设置时钟频率 (只在DCE端) Router(config-if)#clock rate 64000 Router(config-if)# 调协波特率 (建议) Router(config-if)#bandwidth 64 Router(config-if)#exit Router(config)#exit Router# © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -61

确认参数修改情况 Router#show interface serial 0 Serial 0 is up, line protocol is up Hardware

确认参数修改情况 Router#show interface serial 0 Serial 0 is up, line protocol is up Hardware is HD 64570 Internet address is 10. 140. 4. 2/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: 09, output 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 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) © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -62

以太网的 media-type 命令 Router(config)#interface ethernet 2 Router(config-if)#media-type 10 baset 为以太网端口选择适当的介质类型 © 1999, Cisco Systems,

以太网的 media-type 命令 Router(config)#interface ethernet 2 Router(config-if)#media-type 10 baset 为以太网端口选择适当的介质类型 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -63

开启或关闭端口 Router#configure term Router(config)#interface serial 0 Router(config-if)#shutdown %LINK-5 -CHANGED: Interface Serial 0, changed state

开启或关闭端口 Router#configure term Router(config)#interface serial 0 Router(config-if)#shutdown %LINK-5 -CHANGED: Interface Serial 0, changed state to administratively down %LINEPROTO-5 -UPDOWN: Line protocol on Interface Serial 0, changed state to down 人 关闭端口 Router#configure term Router(config)#interface serial 0 Router(config-if)#no shutdown %LINK-3 -UPDOWN: Interface Seria 0, changed state to up %LINEPROTO-5 -UPDOWN: Line Protocol on Interface Serial 0, changed state to up 开启已经关闭的端口 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -64

路由器的 show interfaces 命令 Router#show interfaces Ethernet 0 is up, line protocol is up

路由器的 show interfaces 命令 Router#show interfaces Ethernet 0 is up, line protocol is up Hardware is Lance, address is 00 e 0. 1 e 5 d. ae 2 f (bia 00 e 0. 1 e 5 d. ae 2 f) Internet address is 10. 1. 1. 11/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 Last input 00: 07, output 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, 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 collision, 4 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -65

解读端口状态 Router#show interfaces serial 1 Serial 1 is up, line protocol is up Hardware

解读端口状态 Router#show interfaces serial 1 Serial 1 is up, line protocol is up Hardware is HD 64570 Description: 64 Kb Line to San Jose : : : : : 载波监测 Operational. . . . Connection problem. . . Interface problem. . . . Disabled. . . . . © 1999, Cisco Systems, Inc. 存活信息 Serial 1 is up, line protocol is up Serial 1 is up, line protocol is down Serial 1 is down, line protocol is down Serial 1 is administratively down, line protocol is down www. cisco. com ICND— 4 -66

串口上用 show controller 命令 Router#show controller serial 0 HD unit 0, idb = 0

串口上用 show controller 命令 Router#show controller serial 0 HD unit 0, idb = 0 x 121 C 04, driver structure at 0 x 127078 buffer size 1524 HD unit 0, V. 35 DTE cable. . . 显示串口线的线缆类型 © 1999, Cisco Systems, Inc. www. cisco. com ICND— 4 -67

可视化目标 wg_pc_a pod A B C D E F G H I J K

可视化目标 wg_pc_a pod A B C D E F G H I J K L sw 10. 1. 1. 10 10. 1. 1. 20 10. 1. 1. 30 10. 1. 1. 40 10. 1. 1. 50 10. 1. 1. 60 10. 1. 1. 70 10. 1. 1. 80 10. 1. 1. 90 10. 1. 1. 100 10. 1. 1. 110 10. 1. 1. 120 ro’s e 0 10. 1. 1. 11 10. 1. 1. 21 10. 1. 1. 31 10. 1. 1. 41 10. 1. 1. 51 10. 1. 1. 61 10. 1. 1. 71 10. 1. 1. 81 10. 1. 1. 91 10. 1. 1. 101 10. 1. 1. 111 10. 1. 1. 121 console fa 0/26 (port A) A/B e 0/2 e 0 . . . fa 0/1 wg_sw_l 10. 1. 1. 120 255. 0 wg_ro_a 10. 1. 1. 11 255. 0 wg_sw_a 10. 1. 1. 10 255. 0 console fa 0/26 (port A) console wg_pc_l A/B e 0/2 e 0 console wg_ro_l 10. 1. 1. 121 255. 0 fa 0/12 fa 0/24 core_ server 10. 1. 1. 1 255. 0 © 1999, Cisco Systems, Inc. core_sw_a 10. 1. 1. 2 255. 0 www. cisco. com ICND— 4 -68