大家通过console口或telnet方式配置Cisco产品时经常会遇到在输入命令时突然出现系统提示信息或状态信息,将我们输入的命令字符一分为二,字符淹没在这些信息中。有时如果系统有问题或我们打开过多的debug会导至我们根本无法正常输入命令。笔记以前也经常遇过这种情况,最近在读Cisco 2960交换机配置手册时找到了相关的处理方法,如下文:
1. Cisco文档中关于系统消息日志的说明。 (摘自配置文档,英文描述的很清楚也比较简单,没翻译)
Understanding System Message Logging
By default, a switch sends the output from system messages and debug privileged EXEC commands to a logging process. The logging process controls the distribution of logging messages to various destinations, such as the logging buffer, terminal lines, or a UNIX syslog server, depending on your configuration. The process also sends messages to the console.
When the logging process is disabled, messages are sent only to the console. The messages are sent as they are generated, so message and debug output are interspersed with prompts or output from other commands. Messages appear on the console after the process that generated them has finished.
You can set the severity level of the messages to control the type of messages displayed on the consoles and each of the destinations. You can time-stamp log messages or set the syslog source address to enhance real-time debugging and management. For information on possible messages, see the system message guide for this release.
You can access logged system messages by using the switch command-line interface (CLI) or by saving them to a properly configured syslog server. The switch software saves syslog messages in an internal buffer.
You can remotely monitor system messages by viewing the logs on a syslog server or by accessing the switch through Telnet or through the console port.
2. 关闭Consolo口系统信息日志
2960#conf t #输入全局配置模式#
Enter configuration commands, one per line. End with CNTL/Z.
2960(config)#line console 0 #进入consolo 0接口#
2960(config-line)# no logging synchronous #关闭非请求的同步信息日志#
2960#write #保存配置#
3. 关闭telnet终端连接端口的系统信息日志
2960#conf t #输入全局配置模式#
Enter configuration commands, one per line. End with CNTL/Z.
2960(config)#line vty 0 15 #进入virtual terminal虚拟终端接口#
2960(config-line)# no logging synchronous #关闭非请求的同步信息日志#
2960#write #保存配置#
我们也可使用以下命令完全关闭consolo口下的所有输出信息。
2960#conf t #输入全局配置模式#
Enter configuration commands, one per line. End with CNTL/Z.
2960(config)#no logging consolo #关闭consolo口系统消息日志输出#
如果想重新启用系统消息日志输出,在全局配置模式下输入logging on即可。
以下是交换机系统消息日志的默认配置供参考!
|
Debugging (and numerically lower levels; see Table 27-3). | |
|
Local7 (see Table 27-4). | |
|
Informational (and numerically lower levels; see Table 27-3). | |
参考文档:
《Catalyst 2960 Switch Software Configuration Guide, Rel. 12.2(37)SE》 -- Configuring System Message Logging







发表评论 评论 (2 个评论)