Show ip route ;显示IP路由表中的信息
Show ip traffic ;显示IP流量统计信息
2、debug命令
DEBUG不应在CPU使用率超过50%的路由器上运行。
1) 限制debug输出
在使用DEBUG获得所需数据后,要关闭Debug
使路由器对任何消息都配置使用时间戳:
Router#service timestamps debug datetime msec localtime
Router#service timestamp log datetime msec localtime
缺省,error和debug信息仅发送到console,telnet到路由器上看不到debug和log的信息。想在telnet中看到debug和log信息:
Router#terminal monitor
Router#terminal monitor ;关闭信息输出
Router#undebug all ;关闭debug进程及任何相关信息的输出
能够应用ACL到debug以限定仅输出需要的debug信息。
如仅查看从10.0.1.1到10.1.1.1的ICMP包:
Router(config)#access-list 101 permit icmp host 10.0.1.1 host 10.1.1.1
Router#debug ip packet detail 101
2) 全局debug命令:
3) 接口debug
4) 协议debug
5) IP debug
debug ip packets
3、logging命令
输出error和其他信息到console、terminal、路由器内部buffer或一台syslog服务器:
Router>show logging
Cisco路由器有8种可能的logging级:0-7
Logging级别 名称 描述
1 Emergencies 系统不能用的信息
2 Alerts 直接行动
3 Critical 紧急情形
4 Errors 错误信息
5 Warnings 警告信息
6 Notifications 正常但重要的情形
7 Informational 信息
8 Debugging 调试
缺省地,console、monitor、buffer的logging被配置为debugging级,而trap(syslog)服务器的logging被配置为informational。
4、执行路由核心复制
core dump包含一份当前系统内存中信息的精确拷贝。捕获包含在内存中信息的方法有:
1) 配置路由器在崩溃时执行Core Dump,存储到TFTP、FTP、RCP服务器:
对TFTP协议,只需指定TFTP服务器IP,无需任何附加的配置:
Router(config)#exception dump 192.168.1.1 ;TFTP服务器的IP地址
对FTP协议的配置:
Router(config)#exception dump 192.168.1.1 ;FTP服务器的IP地址
Router(config)#ip ftp username Kevin
Router(config)#ip ftp password aloha
Router(config)#ip ftp source-interface e0
Router(config)#exception protocol ftp
对RCP协议的配置:
Router(config)#exception protocol rcp
Router(config)#exception dump 192.168.1.1 ;RCP服务器的IP地址
Router(config)#ip rcmd remote-username Kevin
Router(config)#ip rcmd rcp-enable
Router(config)#ip rcmd rsh-enable
Router(config)#ip rcmd remote-host Kevin 192.168.1.1 kevin ;
2) 在系统没有崩溃的情况下,执行Core Dump命令。
Router#write core
Core Dump仅在Cisco工程师测试和解决路由器问题时有用。
5、ping命令
ping用于测试整个网络可达性和连通性。可在用户EXEC模式和特权EXEC模式下使用。
IP的ping使用ICMP协议提供连通性和可能性信息,缺省只发送5个echo信息。
扩展Ping的选项有:源IP地址;服务类型;数据;包头选项。
Ping的响应字符集
字符 解释 字符 解释
! Received an echo-reply message Q Source quench
. Timeout M Unable to fragment
U/H Destination unreachable A Administratively denied
N Network unreachable ? Unknown packet-type
P Protocol unreachable
6、traceroute命令
traceroute用于显示到达目标的包路径。可在用户模式和特权模式下使用。
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



