Enabling Syslog on a Unix Server


You want to configure a Unix server to accept syslog messages from routers.


For most flavors of Unix and Linux, you simply need to modify the /etc/syslog.conf file on your Unix server to include the following entry (basic configuration):

local7.info /var/log/rtrlog

This example stores all router messages using the default logging facility for Cisco routers, local7. It also stipulates that router log messages with a severity level of informational or greater (refer to Table 18-1) will be directed to the file /var/log/rtrlog. The syntax of the syslog.conf file is log facility.priority notation, followed by a filename.

Note that the syslog.conf file needs tabs, and not spaces, between the various fields.



By default, your syslog server may not be equipped to handle router log messages. The above configuration entry will caused the syslog daemon to store all router messages, of informational severity level and higher, to a file called /var/log/rtrlog. Before the server will begin forwarding messages to this file, it must exist and have the proper file attributes:

Freebsd# cd /var/log
Freebsd# touch rtrlog
Freebsd# chmod 644 rtrlog

Then you should reload or HUP the syslog daemon to force it to read your new configuration file and begin storing router log messages. On System V-based Unix servers, use the following commands:

Solaris# ps -ef | grep syslogd
 root 142 1 0 Nov 12 ? 1:21 /usr/sbin/syslogd -m 30
Solaris# kill -HUP 142

On BSD-based Unix and Linux servers, use the following commands:

Freebsd# ps -aux | grep syslogd
root 66 0.0 0.2 960 624 ?? Ss 3Mar02 0:28.66 syslogd -m 30
Freebsd# kill -HUP 66

For more information on your syslog daemon and its configuration options, check your system's manual pages by using the Unix commands man syslog and man syslog.conf.

Note that some Unix flavors, including most Linux distributions, require the syslog daemon be initialized with the -r switch before they will accept remote syslog messages. See your manual pages for more information (man syslogd).

See Also

Recipe 18.7; Recipe 18.11; Recipe 18.12

Router Configuration and File Management

Router Management

User Access and Privilege Levels


IP Routing





Frame Relay

Handling Queuing and Congestion

Tunnels and VPNs

Dial Backup

NTP and Time


Router Interfaces and Media

Simple Network Management Protocol





First Hop Redundancy Protocols

IP Multicast

IP Mobility




Appendix 1. External Software Packages

Appendix 2. IP Precedence, TOS, and DSCP Classifications


show all menu

Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505
Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net