无忧启动论坛

标题: 命令 描述 [打印本页]

作者: 绝对の坏男人    时间: 2005-4-16 08:19
标题: 命令 描述
Show version 显示系统的硬件配置、软件版本、配置文件的名称和来源、启动映象的信息以及最近一次系统重动的原因
Show flash 显示闪存设备的信息
Show processes 显示有关活动进程的信息
Show processes cpu 显示CPU活动进程的信息
Show memory 显示有关路由器内存的统计信息,包括内存空闲的统计信息
Show stacks 监视进程和终端例程所使用的堆栈
Show buffers 显示有关路由器缓冲空间统计信息
Show startup-config Cisco IOS 13.0以后版本,用于显示备份的配置文件
Show config Cisco IOS 13.0以前版本,用于显示备份的配置文件
Show running-config Cisco IOS 13.0以后版本,用于显示活动的配置文件
Write terminal Cisco IOS 13.0以前版本,用于显示活动的配置文件
Show protocols 显示已经配置的协议。该命令能显示所配置的任何一种3层(网络层)协议的状态
Show interface 显示路由器上进行了配置的所有端口的统计信息
Show arp 显示路由器的IP到MAC(接口的)地址映射
Showing CDP Neighbor所获得的各项信息
Router# show cdp neighbors
显示的信息:
Devie identifiers(设备标识) 路由器所配置的用户名、域名
Address list(地址列表) 每个协议对一个地址,至少用于一个SNMP的地址
Port identifier(端口标识) 如:E0、S0
Capabilities list(功能列表) 例如:是否既是源路由器网桥又是路由器的信息
Version(版本) 与show version获得的信息相同
Platform(Platform) 设备的硬件平台,如:CISCO 7000
CDP的一个配置实例
Router (config-if)# cdp enable
Router (config-if)# cdp disable
Router# show cdp interface
Showing CDP Neighbors
Router# show cdp neighbors
Router# show cdp neighbors detail
Router# show cdp interface
Router# show interface
基本网络测试
用Telnet命令测试应用层
Router> telnet <远端CISCO设备名,例如:Router110>

Router> connect <远端CISCO设备名,例如:Router110>

Router> <直接输入远端CISCO设备名,例如:Router110>

Router> <直接输入远端CISCO设备IP地址>
/*Resume a Session(enter session number orname)*/
Router110> show session
1*    Router110
2     Router
Router110> 2
Router>
Router> show session
1     Router110
2*    Router
Router>1
Router110>
/*End a session*/
Router110> exit

Router110> logout

Ctrl + shift + 6 + x
用ping命令测试网络层
Router> ping <远端CISCO设备名>
Router> ping <ip地址>
Router&#35; ping <远端CISCO设备名>
Router&#35; ping <ip地址>
Router> ping ipx <ipx地址>
Router&#35; ping ipx <ipx地址>
Router&#35; ping
(注:不加参数可用于ping的扩展)
用trace命令测试网络层
Router> Trace <远端CISCO设备名>
Router> Trace ip <IP地址>
Router&#35; Trace <远端CISCO设备名>
Router&#35; Trace ip <IP地址>
用show ip route命令测试网络层
Router> show ip route
Router&#35; show ip route
使用show interfaces serial命令测试物理层和数据链路层
Router> show interface serial<接口号>
Router&#35; show interface serial<接口号>
Show interfaces和clear counters
Router> show interface
Router&#35; show interface
Router&#35; clear counters
用debug命令查实时的网络通信
Router&#35; terminal monitor
(注:在Telnet端打开终端监控,使debug输出到Telnet会话窗)
Router&#35; dubug broadcast
Router&#35; dubug <相应的参数>
Router&#35; undebug all
Router&#35; no debug all
路由器启动和设置
与路由器启动相关的命令
Router&#35; show startup-config
Router&#35; show config
Router&#35; show running-config
Router&#35; write term
Router&#35; erase startup-config
Router&#35; write erase
Router&#35; reload
Router&#35; setup
路由器配置(一)
*作IOS11.x版本的配置文件
命令 描述
Configure terminal 从控制台终端手工配置路由器
Copy tftp running-config 从网络中的TFTP服务器上加载配置文件
Configure network Cisco IOS 13.0以前版本,现在由Copy tftp running-config命令替换
Copy startup-config running-config 从NVRAM中加载配置文件(多用于口令恢复)
Configure memory Cisco IOS 13.0以前版本,现在由Copy startup-config running-config命令替换
Show running-config 显示RAM中的当前配置
Write terminal Cisco IOS 13.0以前版本,现在由show running-config 命令替换
Copy running-config tftp 将RAM中的当前配置保存到网络中的TFTP服务器上
Write network Cisco IOS 13.0以前版本,现在由Copy running-config tftp命令替换
Copy running-config startup-config 将RAM中的当前配置保存到NVRAM中
Write memory Cisco IOS 13.0以前版本,现在由Copy running-config startup-config命令替换
Show startup-config 显示NVRAM中保存的配置的内容
Show config Cisco IOS 13.0以前版本,现在由show startup-config 命令替换
Erase startup-config 清空NVRAM的内容
Write erase Cisco IOS 13.0以前版本,现在由erase startup-config 命令替换
路由器的配置模式
配置模式 提示符
用户EXEC模式 Router>
特许EXEC模式 Router&#35;
全局配置模式 Router(config)&#35;
Interface Router(config-if)&#35;
Subinterface Router(config-subif)&#35;
Controller Router(config-controller)&#35;
Map-list Router(config-map-list)&#35;
Map-class Router(config-map-class)&#35;
Line Router(config-line)&#35;
Router Router(config-router)&#35;
全局配置模式
/*特许EXEC模式下的configure命令*/
Router con0 is now available.
Press RETURN to get started.
User Access Verification
Password:
Router>
Router> enable
Password:
Router&#35;
Router&#35; configure terminal
Router(config)&#35;
Router(config)&#35;interface Ethernet 0/0
Router(config-if)&#35;
Router(config-if)&#35; exit
Router(config)&#35;
Router(config)&#35; exit
Router&#35;
Router&#35; disable
Router>
Router> exit
Press RETURN to get started.
或用快速的退出方法:
Router(config-if)&#35; end
(注:end和Ctrl + Z的作用一样)
Router&#35;
Router&#35; exit
Press RETURN to get started.
配置路由协议
Router&#35; configure terminal
Router(config)&#35; router <路由协议>
Router(config-router)&#35;  (command)
Router(config-router)&#35;
配置某个接口*/
Router&#35; configure terminal
Router(config)&#35; interface <端口类型> <端口号>

Router(config)&#35; interface <端口类型> <模块所在的插槽号 / 端口号>
Router(config-if)&#35; no shutdown
Router(config-if)&#35;
配置特定的接口
Router(config)&#35; interface serial 1/0
Router(config-if)&#35; no shutdown
Router(config-if)&#35; bandwidth 56
Router(config-if)&#35; clock rate 56000
Router(config-if)&#35;
Router(config-if)&#35; int & 0.1 point-to point
Router(config-if)&#35; int & 0.2 point-to point
/*Cisco 4000系列路由器*/
Router(config)&#35; interface Ethernet 1/0
Router(config-if)&#35; media-type 10baset
Router(config-if)&#35;
配置方法
配置口令的方法
Router(config)&#35; line console 0
Router(config-line)&#35; login
Router(config-line)&#35; password <口令>
Router(config)&#35; line vty 0 4
Router(config-line)&#35; login
Router(config-line)&#35; password <口令>
Router(config)&#35; enable password <口令>
Router(config)&#35; enable secret <口令>
/*启动加密服务,为所有的口令加密*/
Router(config)&#35; service password-encryption
Router(config)&#35; no service password-encryption
路由器标识配置
/*路由器名称*/
Router(config)&#35; hostname <路由器名称,如:Tokyo>
Tokyo&#35;
/*登录标题*/
Router(config)&#35; banner motd &#35;
<欢迎信息,如:Welcome!!!> &#35;
Router(config)&#35;
/*接口描述*/
Router(config)&#35; interface Ethernet 0
Router(config-if)&#35; description <接口描述信息>





欢迎光临 无忧启动论坛 (http://bbs.c3.wuyou.net/) Powered by Discuz! X3.3