Microsoft Word - 04.doc

Similar documents
路由器基本配置

ch08.PDF

epub

F5270

Cisco Cisco Cisco (ROM) (FLASH) (RAM) RAM(NVRAM) Cisco

D E 答 案 :C 3. 工 作 站 A 配 置 的 IP 地 址 为 /28. 工 作 站 B 配 置 的 IP 地 址 为 /28. 两 个 工 作 站 之 间 有 直 通 线 连 接, 两 台

通过动态路由协议实现链路备份

IP505SM_manual_cn.doc

ebook20-7

IP Access Lists IP Access Lists IP Access Lists

管理CISCO IOS

管理CISCO IOS

第 1 部 分 : 检 查 网 络 要 求 在 第 1 部 分 中, 您 将 研 究 使 用 /17 网 络 地 址 为 拓 扑 图 中 显 示 的 网 络 开 发 VLSM 地 址 方 案 的 网 络 要 求 注 意 : 您 可 以 使 用 Windows 计 算 器 应

AL-M200 Series

Microsoft Word - 09.doc

Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10

GPRS IP MODEM快速安装说明

ebook140-8

ebook140-11

P4i45GL_GV-R50-CN.p65

工程师培训

工程师培训

声 明 Copyright 2010 杭 州 华 三 通 信 技 术 有 限 公 司 及 其 许 可 者 版 权 所 有, 保 留 一 切 权 利 未 经 本 公 司 书 面 许 可, 任 何 单 位 和 个 人 不 得 擅 自 摘 抄 复 制 本 书 内 容 的 部 分 或 全 部, 并 不 得

epub 30-12

ch09.PDF

QL1880new2.PDF

《计算机网络》实验指导书

Procedural Lab Template, Student Version, Required Components

局域网技术课程设计报告.doc

SL2511 SR Plus 操作手冊_單面.doc

Microsoft Word - CCNA2_Exploration_instructor_40_CoverSheet.DOC

Microsoft Word - lab2_4.doc

ebook71-13

P4VM800_BIOS_CN.p65

ebook140-9


KillTest 质量更高 服务更好 学习资料 半年免费更新服务

Olav Lundström MicroSCADA Pro Marketing & Sales 2005 ABB - 1-1MRS755673

Microsoft Word - CCNA Lab Exercise Guide.doc

+01-10_M5A_C1955.p65

一.NETGEAR VPN防火墙产品介绍

Microsoft Word - template.doc

P4V88+_BIOS_CN.p65

TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP

mppp-ddr.pdf

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南

Chapter #

Ác Åé å Serial ATA ( Sil3132) S A T A (1) SATA (2) BIOS SATA (3)* RAID BIOS RAID (4) SATA (5) SATA (a) S A T A ( S A T A R A I D ) (b) (c) Windows XP

R3105+ ADSL

P4Dual-915GL_BIOS_CN.p65

T

NSC-161

网工新答案

DOS下常用的网络命令.PDF

epub 30-5

ebook20-8

Cisco Lab - Switch

Cisco Switch 操作

Windows XP

ARP ICMP

升 级 过 程 概 述 Cisco 集 中 无 线 网 络 架 构 中,AP 工 作 在 瘦 AP(LAP) 模 式 LAP 关 联 到 无 线 控 制 器 (WLC), 控 制 器 管 理 着 配 置 软 件 升 级 以 及 802.1X 认 证 等 控 制 处 理 ; 此 外, 控 制 器 还

T

目 录 前 言... 4 内 容 摘 要... 5 报 告 术 语 界 定... 6 第 一 章 农 村 互 联 网 宏 观 情 况... 7 一 经 济 发 展 状 况... 7 二 电 信 发 展 状 况... 8 三 农 村 互 联 网 发 展 概 况... 9 第 二 章 农 村 网 民 构

Chapter 2

775i65PE_BIOS_CN.p65

Packet Tracer实验集

ebook20-6

IS-IS路由协议中文教程v1

计算机网络 实验指导书 / 实验四 : 动态路由协议 实验四 : 动态路由协议 一 实验目的 1 进一步理解路由器的工作原理; 2 掌握 RIP 的基本原理和实现 ; 3 掌握 OSPF 的基本原理和实现 二 实验学时 2 学时 三 实验类型 综合性 四 实验需求 1 硬件每人配备计算机 1 台 2

¶C¶L§§¬_™¨ A.PDF

IP-Routing-05.pdf

IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG

Ch03_嵌入式作業系統建置_01

第3章

(UTM???U_935_938_955_958_959 V )

User ID 150 Password - User ID 150 Password Mon- Cam-- Invalid Terminal Mode No User Terminal Mode No User Mon- Cam-- 2

Guide to Install SATA Hard Disks

財金資訊-80期.indd

PowerPoint Presentation

思科交换机命令大全 基础配置 1. 从用户模式进入特权模式 S1>enable 2. 从特权模式进入全局配置模式 S1#configure terminal 3. 设置主机名 S1(config)#hostnameR1 4. 退出到特权模式 S1(config)#end 5. 退出到用户模式 S1#

如何配置SNMP Community 字符串

9 Internet 10 Internet

典型自编教材

Serial ATA ( nvidia nforce4 Ultra/SLI)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 9 (5) S A T A (6) Micro

Basic System Administration

Serial ATA ( Nvidia nforce430)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 9 (5) S A T A (6) Microsoft Win

untitled


K7VT2_QIG_v3

计算机网络 实验指导书 / 实验三 : 使用路由器组网 实验三 : 使用路由器组网 一 实验目的 1 理解路由器的基本工作原理; 2 掌握路由器的基本管理和配置方法; 3 理解路由组网的方法和静态路由的具体使用; 4 理解基于路由器的园区网的结构, 并进一步体会园区网的设计思路 二 实验学时 2 学

中文朗科AirTrackTM T600 迷你无线路由器用户手册.doc

(Guangzhou) AIT Co, Ltd V 110V [ ]! 2

SEC-220

untitled

IBM Rational ClearQuest Client for Eclipse 1/ IBM Rational ClearQuest Client for Ecl

Simulator By SunLingxi 2003

Leica S S 2

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco

TX-NR3030_BAS_Cs_ indd

Transcription:

Chapter4 Introduction to the Cisco IOS The Cisco Router User Interface Cisco Internetwork Operation System(IOS) 是 Cisco 的 routers 和 switches 的内核 Cisco Router IOS IOS 的一些功能 : 1. 运载网络协议和功能 2. 对产生高速流量的设备进行连接 3. 增加网络安全性 4. 提供网络的可扩展性来简易化网络的增长和冗余问题 5. 可靠的连接网络资源 你可以通过以下方式进入 IOS: 1. 通过 router 的 console 口, 用于本地 2. 通过 modem 连接 auxiliary(aux) 口, 用于远程 3. 通过 VTY 线路来 telnet Bringing Up a Router 当启动 1 个 router 的时候, 大致将分为以下几个阶段 : 1. 开机自检 (power-on self-test,post) 2. 如果 1 正常, 如果 IOS 存在的话, 将从它的闪存 (flash memory) 查找和加载 IOS 到 RAM 中 (2500 系列不加载 RAM 中, 直接从闪存中运行 ). 闪存是 1 种电子可擦除只读存储器 (electronically erasable programmable read-only memory,eeprom) 3. 如果 1 和 2 正常, 接下来它将在非易失性 RAM(NVRAM) 中查找启动配置文件 startup-config, 假如没有找到任何启动配置文件,router 将进入到 setup 模式 Setup Mode setup 模式可以对 router 进行些配置, 但是我们不推荐使用这个方法对 router 进行配置. 它分为 2 种模式 : 1.Basic Management 2.Extended Management 在 setup 模式中,[] 代表默认设置, 你可以使用 Ctrl+C 随时退出 setup 模式 Command-Line Interface 当问你是否进入 setup 模式, 选择 no, 即进入命令行模式

Logging into the Router 从用户模式 (user mode) 进入到特权模式 (exec mode), 注意提示符的变化 : Router>enable Router# 从特权模式退出到用户模式 : Router#disable Router> 退出 router 命令行 : 在用户模式和特权模式下输入 logout, 如下 : Router#logout Router con0 is now available Press RETURN to get started Overview of Router Modes 配置 router, 需要进入到 1 个叫做配置模式的模式, 在特权模式下输入 configure terminal 进入全局配置模式 (global configuration mode), 在这之下输入的命令叫做全局命令, 一旦输入, 将对整个 router 产生影响. 如下, 注意提示符的变化 : Router#config Configruation from terminal,memory or network [terminal]?(press Enter) Router(config)# 参数 terminal,memory 和 network 的区别 : 1.configure terminal: 配置 router 的 running-config, 所谓 running-config 即为当前运行在动态 RAM(DRAM) 的配置文件 2.configure memory: 配置 router 的 startup-config, 所谓 startup-config 即为存储在 router 的 NVRAM 里的配置文件 3.configure network: 配置存储在 TFTP 主机的配置文件 Interfaces 在全局配置模式下切换 router 接口, 输入 interface 命令,? 用于提示可选参数, 为如下 : Router(config)#interface? Serial Serial 前半部分为参数, 后半部分为描述, 接着输入 serial 0, 进入 router 接口配置模式, 如下 : Router(config)#interface serial 0 Router(config-if)# Subinterfaces

在 router 的某个接口划分逻辑子接口 (subinterface), 输入命令进入子接口模式, 如下, 注意提示符 : Router(config)#interface fa0/0.? <0-4294967295> FastEhernet interface number Router(config)#interface fa0/0.1 Router(config-subif)# Line Command 进入线路配置模式, 注意提示符, 如下 : Router(config)#line console 0 Router(config-line)# Routing Protocol Configurations 给 router 配置路由协议, 比如 RIP, 注意提示符, 如下 : Router(config)#router rip Router(config-router)# 从全局模式退出到特权模式可以使用快捷键 Ctrl+Z Editing and Help Features 一些特写 : 1. 在命令行下输入?, 将得到该模式下可以使用的命令列表以及其描述 2. 假如你不确定 1 个命令是如何写的, 比如你只记得是字母 c 开头, 你可以输入 c 加 1 个?, 将得到该模式下可以使用的所有命令 : Router#c? clear clock configuration connect copy Router#clock? set Set the time and date 3. 假如你输入的命令不完整, 将得到 1 个错误提示 :Imcomplete command, 这样有助于分析命令哪出错了 4.router 支持命令缩写, 比如 show 可以缩写为 sh,sho, 但是假如你像如下那样输入了不完整的缩写, 将得到错误提示 :Ambiguous command Router#sh te % Ambiguous command: sh te Router#sh te? tech-support template terminal 一切其他的快捷键 : 1.Ctrl+A: 把光标快速移动到整行的最开始 2.Ctrl+E: 把光标快速移动到整行的最末尾 3.Esc+B: 后退 1 个单词

4.Ctrl+B: 后退 1 个字符 5.Esc+F: 前进 1 个单词 6.Ctrl+F: 前进 1 个字符 7.Ctrl+D: 删除单独 1 个字符 8.Backspace: 删除单独 1 个字符 9.Ctrl+R: 重新显示 1 行 10.Ctrl+U: 擦除 1 整行 11.Ctrl+W: 删除 1 个单词 12.Tab: 自动补齐命令 13.Up arrow 或者 Ctrl+P: 显示之前最后输入过的命令 14.Down arrow 或者 Ctrl+N: 显示之前刚刚输入过的命令 其他的一些关于历史的命令 : 1.show history: 显示最后输入的 10 条命令, 默认是 10 条, 可以修改该值 2.terminal history size: 修改显示最后输入过的的命令的数量, 默认是 10 条, 最大是 256 条 3.show terminal: 显示命令历史缓存大小, 如下 : Router#sh terminal History is enabled,history size is 10 Router#terminal history size? <0-256> Size of history buffer Router#terminal history size 25 Router#sh terminal History is enabled,history size is 25 Gather Basic Routing Information show version: 显示系统硬件的基本配置和软件版本, 以及配置文件的名字和来源, 还有启动镜 象, 最后是 configuration register 的值 Set Passwords: 有 5 种密码用于加密你的 Cisco router: 1. 控制口 (console) 2. 辅助口 (AUX) 3.VTY 4.enable password 5.enable secret Enable Passwords

enable password: 给 console 和 AUX 口加密, 防止未授权用户进入特权模式, 但是密码是非加密形式 enable secret: 给 console 和 AUX 口加密, 防止未授权用户进入特权模式, 密码是加密形式, 并且一旦起用了这个密码, 将凌驾于 enable password 之上, 如果同时设置了 enable password 和 enable secret 的情况下, 必须输入不同的密码, 如下 : Router(config)#enable password 123 Router(config)#enable secret 123 The enable password you have chosen is the same as your enable secret.this is not recommended.re-enter the enable password Router(config)#enable secret 321 如果 VTY 线路的密码没有设置, 你将无法使用 telnet 来连上它 Auxiliary Password 配置 AUX 密码 : Router#conf t Router(config)#line aux? <0-0> First line number Router(config)#line aux 0 Router(config-line)#login Router(config-line)#password 123 Console Password 配置 console 密码以及一些辅助命令 : Router#conf t Router(config)#line console? <0-0> First line number Router(config)#line console 0 Router(config-line)#login Router(config-line)#password 123 Router(config-line)#exec-timeout? <0-35791> Timeout in minutes Router(config-line)#exec-timeout 0? <0-2147483> Timeout in seconds <cr> Router(config-line)#exec-timeout 0 0 Router(config-line)#logging synchonous exec-timeout 命令 : 如果 X 分钟 X 秒不活动的话将自动退出, 默认是 10 分钟,0 0 代表永远不自动退出 logging synchronous: 光标跟随 Telnet Password

配置 VTY 密码 : 如果你的 IOS 不是企业版 (Enterprise edition), 默认你只能有 5 条 VTY 线路, 线路 0 到 4. 配置如下 : Router(config-line)#line vty 0? <1-4> Last Line Number <cr> Router(config-line)#line vty 0 4 Router(config-line)#login Router(config-line)#password 123 刚才说过了, 如果你的 VTY 线路没有配置密码的话, 你将无法 telnet 连上它, 它会报错 :VTY 线路没有配置密码. 但是你可以取消 VTY 密码, 这样就可以在没有密码的情况下进行 telnet, 处于安全考虑, 此方法不推荐, 配置如下 : Router(config-line)#line vty 0 4 Router(config-line)#no login Encryption Your Passwords 只有 enable secret 是加密的, 当你在特权模式下输入 sh running-config 显示 DRAM 的配置文件时, 其他密码将被罗列出来 : Router#sh run! enable secret jhdflkdfg$#sdf enable password 123! 对密码进行加密 : 在全局配置模式下使用 service password-encryption 命令 Banners banner 类似标语, 问候语. 最常用的是 MOTD(message of the day), 分界符用于分隔信息, 但是分隔符不能出现在 MOTD 信息中, 如下 : Router(config)#banner motd # The Router is mine # Router(config)#^Z(Ctrl+Z) Router#exit Router con0 is now available Press RETURN to get started The Router is mine Router>

其他的 3 种 banner: 1.exec banner 2.incoming banner 3.login banner Router Interfaces 配置 router 的接口, 一般命令模式采用 :interface type number 的格式, 比如 : Router(config)#int ethernet 0 但是 Cisco 的 2600,3600,4000 和 7000 等系列采用了物理卡槽和模块化的端口机制. 因此, 命令变化为 :interface type slot/port, 比如 : Router(config)#int fastethernet 0 % Imcomplete command Router(config)#int fastethernet 0? / Router(config)#int fastethernet 0/? <0-1> Fastethernet interface number Router(config)#int fastethernet 0/1 配置连接器的介质类型, 使用 media-type 命令, 不过这个一般是自动检测, 如下 : Router(config)#int fa 0/0 Router(config-if)#media-type? 100BaseX Use RJ45 for -TX; SC F0 for FX MII Use MII connector Bring Up an Interface 打开和关闭 1 个接口, 分别使用 shutdown 和 no shutdown 命令, 当你关闭某个接口的时候, 使用 sh interfaces 命令可以查看接口状态, 并且你将看到以下输出 : Router#sh int e0 Ethernet0 is administratively down,line protocol is down 接口是关闭的, 所以你要手动打开它, 如下 : Router#conf t Router(config)#int e0 Router(config-if)#no shut Router(config-if)#^Z Router#sh int e0 Ethernet is up,line protocol is up Configuring an IP Address on an Interface 给某个接口配置 IP 地址, 使用 ip address [address] [mask] 命令, 如下 :

Router(config)#int e0 Router(config-if)#ip address 172.16.10.2 255.255.255.0 记得把接口打开 : Router(config-if)#no shut Router(config-if)#^Z 如果你需要在 1 个接口添加第二个子网地址, 在末尾使用 secondary 参数, 这将替换现有 IP 地址, 如下 : Router(config)#int e0 Router(config-if)#ip address 172.16.20.2 255.255.255.0 secondary Router(config-if)#^Z 来验证下 : Router#sh run! interface Ethernet0 ip address 172.16.20.2 255.255.255.0 secondary ip address 172.16.10.2 255.255.255.0! Serial Interface Commands Serial 口一般是连接在 CSU/DSU 等类型的提供时钟频率的设备上. 但是, 假如你在个实验环境里采用了背对背配置, 那么 1 端将作为 DCE 设备提供时钟频率. 默认 Cisco 的 router 都是 DTE, 所以你必须让 1 个 serial 接口来提供时钟频率, 采用的命令是 :clock rate, 如下 : Router(config)#int s0 Router(config-if)#clock rate? Speed (bits per second) 1200 56000 64000 Router(config-if)#clock rate 64000 % Error: This commands applies only to DCE interfaces Router(config-if)#int s1 Router(config-if)#clock rate 64000 确定 serial 接口是否是 DCE 线缆使用 sh controllers 命令, 如下 : Router>sh controllers s 0 HD unit 0, idb=0x297de8, driver structure at 0x29F3A0 Buffer size 1524 HD unit 0, V.35 DCE cable Cisco 的 router 的默认 serial 连接带宽是 T-1(1.544Mbps). 有的路由协议要以带宽做为度来进

行衡量, 所以, 我们给它配置带宽, 使用 bandwidth 命令, 注意参数单位是 kb, 如下 : Router(config-if)#bandwidth? <1-10000000> Bandwidth in kilobits Router(config-if)#bandwidth 64 Hostnames 给 router 配置主机名, 使用 hostname 命令, 这个是本地标志, 不影响 router 在 Internet 上的工作, 注意回车立即生效, 如下 : Router(config)#hostname Noko Noko(config)#hostname Noco Noco(config)# Descriptions description 命令 : 本地标志, 可以给接口加描述, 以便用于区分, 如下 : Noco(config)#int e0 Noco(config-if)#description Sales LAN Noco(config-if)#^Z 来验证下 : Noco#sh int e0 Description: Sales LAN Viewing and Saving Configurations 将 running-config(dram) 的文件复制到 startup-config(nvram) 里, 使用 copy running-config startup-config 命令 : Noco#copy run start 可以使用 erase startup-config 命令删除 startup-config 文件, 如下 : Noco#erase startup-config Noco#sh start %% Non-volatile configuration memory is not present 假如在这个情况下在特权模式使用 reload 命令重新启动 router, 将进入 setup 模式 Verifying Your Configuration ping: 采用了 ICMP echo requests 和 replies traceroute: 使用 ICMP 和 IP TTL 来跟踪包所经过的路径 Verifying with the show ip interface Command

show ip interface: 提供 router 接口的层 3 信息, 包括 : 1. 接口状态 2.IP 地址和掩码 3. 访问列表 (access-list) 信息 4. 一些其他的基本的 IP 信息 Using the show ip interface brief Command show ip interface brief: 和 show ip interface 类似, 只是提供简洁点的总结信息 Using the show controllers Command sh controllers: 显示物理接口的信息, 还提供 serial 口线缆信息, 如下 : Router#sh controllers serial 0/0 buffer size 1524 HD unit 0, V.35 DTE cable Router#sh controllers serial 0/1 buffer size 1524 HD unit 1, V.35 DCE cable