|
|
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# ping <远端CISCO设备名>
Router# ping <ip地址>
Router> ping ipx <ipx地址>
Router# ping ipx <ipx地址>
Router# ping
(注:不加参数可用于ping的扩展)
用trace命令测试网络层
Router> Trace <远端CISCO设备名>
Router> Trace ip <IP地址>
Router# Trace <远端CISCO设备名>
Router# Trace ip <IP地址>
用show ip route命令测试网络层
Router> show ip route
Router# show ip route
使用show interfaces serial命令测试物理层和数据链路层
Router> show interface serial<接口号>
Router# show interface serial<接口号>
Show interfaces和clear counters
Router> show interface
Router# show interface
Router# clear counters
用debug命令查实时的网络通信
Router# terminal monitor
(注:在Telnet端打开终端监控,使debug输出到Telnet会话窗)
Router# dubug broadcast
Router# dubug <相应的参数>
Router# undebug all
Router# no debug all
路由器启动和设置
与路由器启动相关的命令
Router# show startup-config
Router# show config
Router# show running-config
Router# write term
Router# erase startup-config
Router# write erase
Router# reload
Router# 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#
全局配置模式 Router(config)#
Interface Router(config-if)#
Subinterface Router(config-subif)#
Controller Router(config-controller)#
Map-list Router(config-map-list)#
Map-class Router(config-map-class)#
Line Router(config-line)#
Router Router(config-router)#
全局配置模式
/*特许EXEC模式下的configure命令*/
Router con0 is now available.
Press RETURN to get started.
User Access Verification
Password:
Router>
Router> enable
Password:
Router#
Router# configure terminal
Router(config)#
Router(config)#interface Ethernet 0/0
Router(config-if)#
Router(config-if)# exit
Router(config)#
Router(config)# exit
Router#
Router# disable
Router>
Router> exit
Press RETURN to get started.
或用快速的退出方法:
Router(config-if)# end
(注:end和Ctrl + Z的作用一样)
Router#
Router# exit
Press RETURN to get started.
配置路由协议
Router# configure terminal
Router(config)# router <路由协议>
Router(config-router)# (command)
Router(config-router)#
配置某个接口*/
Router# configure terminal
Router(config)# interface <端口类型> <端口号>
或
Router(config)# interface <端口类型> <模块所在的插槽号 / 端口号>
Router(config-if)# no shutdown
Router(config-if)#
配置特定的接口
Router(config)# interface serial 1/0
Router(config-if)# no shutdown
Router(config-if)# bandwidth 56
Router(config-if)# clock rate 56000
Router(config-if)#
Router(config-if)# int & 0.1 point-to point
Router(config-if)# int & 0.2 point-to point
/*Cisco 4000系列路由器*/
Router(config)# interface Ethernet 1/0
Router(config-if)# media-type 10baset
Router(config-if)#
配置方法
配置口令的方法
Router(config)# line console 0
Router(config-line)# login
Router(config-line)# password <口令>
Router(config)# line vty 0 4
Router(config-line)# login
Router(config-line)# password <口令>
Router(config)# enable password <口令>
Router(config)# enable secret <口令>
/*启动加密服务,为所有的口令加密*/
Router(config)# service password-encryption
Router(config)# no service password-encryption
路由器标识配置
/*路由器名称*/
Router(config)# hostname <路由器名称,如:Tokyo>
Tokyo#
/*登录标题*/
Router(config)# banner motd #
<欢迎信息,如:Welcome!!!> #
Router(config)#
/*接口描述*/
Router(config)# interface Ethernet 0
Router(config-if)# description <接口描述信息>
|
|