Saturday, April 24, 2010

Logging events on Cisco routers

Log events to your Syslog server:
Router(config)#logging 192.168.1.1 (your syslog server ip)
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)
  <cr>

Router(config)#logging trap notifications
Router(config)#logging source-interface fa0/0 (logging packets from a specific interface)
exit
Log events locally to the router memory buffer:
Router(config)#logging buffered
Router#show log