Syslog Messages and the debug Command
IOS creates messages, which are called syslog messages, when different events occur and, by default, sends
them to the console. The router also generates messages that are treated like syslog messages in response to
some troubleshooting tasks that you might perform. The debug command is one of the key diagnostic tools
for troubleshooting problems on a Cisco router. It enables monitoring points in the IOS and generates
messages that describe what the IOS is doing and seeing. When any debug command option is enabled, the
router processes the messages with the same logic as other syslog messages.
The console port always receives syslog messages; however, when you Telnet to the router no syslog
messages are seen unless you issue the terminal monitor command. Another alternative for viewing
syslog messages is to have the IOS record the syslog messages in a buffer in RAM and then use the show
logging command to display the messages. For Telnet users, having the messages buffered using the global
config command logging buffered is particularly useful. Finally, the logging synchronous lineconfiguration
subcommand can be used for the console and vtys to tell the router to wait until the last
command output is displayed before showing any syslog messages onscreen.
Syslog messages also can be sent to another device. Two alternatives exist: sending the messages to a syslog
server, and sending the messages as SNMP traps to a management station. The logging host command,
where host is the IP address or host name of the syslog server, is used to enable sending messages to the
external server. After SNMP is configured, the snmp-server enable traps command tells the IOS to
forward traps, including syslog messages.