Logging Console Command on CISCO Router/Switch

Other Cisco Other Cisco Material Original source

Command

Logging Console

Use

This is a handy command that stores log messages so they can be reviewed later. This is a default command.
It is especially useful when you are telneting between multiple routers as you would normally miss the console or debug messages on the router your not connected to.
Each logging level also enables the logging level below it, so logging console 7 or logging console debug will enable all log messages.

Syntax

Router(config)#logging console

Optional Switches

<0-7> <4096-2147483647> alerts critical debugging emergencies errors filtered informational notifications warnings xml Logging severity level Logging buffer size Immediate action needed (severity=1) Critical conditions (severity=2) Debugging messages (severity=7) System is unusable (severity=0) Error conditions (severity=3) Enable filtered logging Informational messages (severity=6) Normal but significant conditions (severity=5) Warning conditions (severity=4) Enable logging in XML to XML logging buffer

Example

In this example, we will enable logging console debug.

Copy

R2(config)#logging console debug

Now we will telnet from R1 to R2 and check the debug output.

Copy

R2(config)#

*Mar 1 02:44:47.503: IP: tableid=0, s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB

*Mar 1 02:44:47.507: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 70, sending

*Mar 1 02:44:47.671: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB

*Mar 1 02:44:47.675: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 40, rcvd 4

R2(config)#

*Mar 1 02:44:48.807: IP: s=10.2.2.3 (FastEthernet1/0), d=224.0.0.5, len 80, rcvd 0

R2(config)#

*Mar 1 02:44:50.339: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.10, len 60, rcvd 2

*Mar 1 02:44:50.467: IP: s=10.1.1.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast

*Mar 1 02:44:50.995: IP: s=10.2.2.2 (local), d=224.0.0.5 (FastEthernet1/0), len 80, sending broad/multicast

R2(config)#

*Mar 1 02:44:55.171: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.10, len 60, rcvd 2

*Mar 1 02:44:55.259: IP: s=10.1.1.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast

R2(config)#

*Mar 1 02:44:57.531: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.9, len 92, rcvd 2

R2(config)#

*Mar 1 02:44:58.791: IP: s=10.2.2.3 (FastEthernet1/0), d=224.0.0.5, len 80, rcvd 0

*Mar 1 02:44:59.459: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.10, len 60, rcvd 2

R2(config)#
← All Other Cisco articles Home