Configuring a Cisco router to log to a central Syslog server. The options include configuring the local buffer size, log levels and the transport protocol being used, UDP or TCP.




Setting local buffer size:

1
Router(config)#logging buffered 4096

Setting the logging level for the local console:

1
Router(config)#logging console informational

Setting the logging level for remote syslog:

1
2
3
4
5
6
7
8
9
10
11
12
Router(config)#logging trap <severity level>

Router(config)#logging trap ?
  <0-7>          Logging severity level
  alerts         Immediate action needed           (severity=1)
  critical       Critical conditions               (severity=2)
  debugging      Debugging messages                (severity=7)
  emergencies    System is unusable                (severity=0)
  errors         Error conditions                  (severity=3)
  informational  Informational messages            (severity=6)
  notifications  Normal but significant conditions (severity=5)
  warnings       Warning conditions                (severity=4)

Configuring the syslog messages to include the source device name:

1
Router(config)#logging origin-id hostname

Configuring the logging transport protocol:

Setting transport protocol to UDP (Default):

1
Router(config)#logging host <syslog_server_ip>

or

Setting transport protocol to TCP (Only supported in later IOS versions):

1
Router(config)#logging host <syslog_server_ip> transport tcp port 514

Comments