13 November 2009

Configuring Syslog in Cisco Routers

Enables logging to all supported destinations.
Router(config)# logging on

Logging messages will be sent to a syslog server host at address 192.168.10.53.
Router(config)# logging 192.168.10.53

Sets the syslog server logging level to value x, where x is a number between 0 and 7 or a word defining the level. The table that follows provides more details.
Router(config)# logging trap x

Syslog messages will now have a timestamp included.
Router(config)# service timestamps log datetime

There are eight levels of severity in logging messages, as follows:














Setting a level means you will get that level and everything below it. Level 6 means you will receive level 6 and 7 messages. Level 4 means you will get levels 4 through 7.















Configure the syslog SERVER
 
Ubuntu/Debian:
- Open /etc/default/syslogd with your favorite text editor.

- Find the line:
SYSLOGD=""

- Replace it with:
SYSLOGD="-ru syslog"

- Open /etc/syslog.conf and add:
local5.debug                     /var/log/cisco.log

- Restart the syslog daemon: 
/etc/init.d/sysklogd restart


biOos

No comments: