Logging on Cisco IOS Devices

Logging is one of the things the Network Engineers are not really fond of, but you need to really understand why and how it needs to be used, for two reasons:
1. Not to miss a major event on a Device.
2. Not to get "overflown" by different events while "playing around" in a CLI.


Lets start with the Logging of a remote IP, or locally (in a FILE):
(config)#logging x.y.z.w

7 is DEBUGGING, so LOG EVERYTHING 0-7:
(config)#logging file flash:syslog 7
emergencies        System is unusable (severity=0)
alerts             Immediate action needed (severity=1)
critical           Critical conditions (severity=2)
errors             Error conditions (severity=3)
warnings           Warning conditions (severity=4)
notifications      Normal but significant conditions (severity=5)
informational      Informational messages (severity=6)
debugging          Debugging messages (severity=7)

Set the SEVERITY level:
(config)#logging trap 4 <- FROM WARNING-4 (INCLUDING 4) TO MORE CRITICAL (ALERT-1, CRITICAL-2, ERROR-3)

Add SEQUENCE numbers:
(config)#service sequence-numbers <- "SERVICE" command IS FOR SYSTEM GENERAL SETTINGS

Add/Remove TIMESTAMPS
(config)#no service timestamps debug
(config)#no service timestamps log

Set the LOGGING messages to be saved in Local:
(config)#logging facility local4

Specific (more GRANULAR) logging settings can be configured on the Interface Level:
(config-if)#logging event ?
  bundle-status        BUNDLE/UNBUNDLE messages
  link-status          UPDOWN and CHANGE messages
  nfas-status          NFAS D-channel status messages
  power-inline-status  Inline power messages
  spanning-tree        Spanning-tree Interface events
  status               Spanning-tree state change messages
  subif-link-status    Sub-interface UPDOWN and CHANGE messages
  trunk-status         TRUNK status messages

No comments:

Post a Comment

Most Popular Posts