Sunday, September 23, 2007

Set Screen logging Console to Log Buffer

This is simple way to disable logging appear on screen console, the name logging console. Logging console is very usefull information appear immediately on screen happen in the router or switch, but someday we don't need to appear in screen but still log all of happen in the device. So logging console set to save in logging buffer, and show it with 'show log'.

Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos
Router(config)#hostname R
R(config)#^Z
R#
*Mar 1 00:00:48.959: %SYS-5-CONFIG_I: Configured from console by console
R#conf t
Enter configuration commands, one per line. End with CNTL/Z.

R(config)#no logging console
R(config)#exit
R#conf t
Enter configuration commands, one per line. End with CNTL/Z.

R(config)#logging buffered

R(config)#do sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Virtual-Access1 unassigned YES unset up up
R(config)#int f0/0
R(config-if)#no shutdown
R(config-if)#^Z

R#sh log
Syslog logging: enabled (0 messages dropped, 1 messages rate-limited, 0 flushes, 0 overruns)
Console logging: disabled
Monitor logging: level debugging, 0 messages logged
Buffer logging: level debugging, 3 messages logged
Logging Exception size (4096 bytes)
Count and timestamp logging messages: disabled
Trap logging: level informational, 40 message lines logged

Log Buffer (4096 bytes):

*Mar 1 00:01:37.811: %SYS-5-CONFIG_I: Configured from console by console
*Mar 1 00:01:38.239: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:01:39.239: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

No comments: