Thursday, May 26, 2011

MISC Notes - Cisco IOS 'logging' Global Configuration Command

The logging {ip-addr} Global Configuration Command

C6500#clear logging
Clear logging buffer [confirm]
C6500#
C6500#sh log
Syslog logging: enabled (0 messages dropped, 0 messages rate-limited, 0 flushes,
 0 overruns, xml disabled, filtering disabled)
    Console logging: level debugging, 39 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 0 messages logged, xml disabled,
                     filtering disabled
    Buffer logging: level debugging, 39 messages logged, xml disabled,
                    filtering disabled
    Exception Logging: size (4096 bytes)
    Count and timestamp logging messages: disabled

No active filter modules.

    Trap logging: level informational, 29 message lines logged

Log Buffer (8192 bytes):
C6500#
C6500#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
C6500(config)#logging ?
  Hostname or A.B.C.D  IP address of the logging host
  buffered             Set buffered logging parameters
  buginf               Enable buginf logging for debugging
  cns-events           Set CNS Event logging level
  console              Set console logging parameters
  count                Count every log message and timestamp last occurance
  esm                  Set ESM filter restrictions
  event                Global interface events
  exception            Limit size of exception flush output
  facility             Facility parameter for syslog messages
  filter               Specify logging filter
  history              Configure syslog history table
  host                 Set syslog server IP address and parameters
  ip                   IP configuration
  listen               MWAM remote console and logging listen enabler
  monitor              Set terminal line (monitor) logging parameters
  on                   Enable logging to all enabled destinations
  rate-limit           Set messages per second limit
  reload               Set reload logging level
  source-interface     Specify interface for source address in logging
                       transactions
  system               enable/disable System Event Log
  trap                 Set syslog server logging level
  userinfo             Enable logging of user info on privileged mode enabling

C6500(config)#logging 10.10.10.10 ?
  <cr>

C6500(config)#logging 10.10.10.10
C6500(config)#end
C6500#
00:14:47: %SYS-5-CONFIG_I: Configured from console by console
C6500#
C6500#sh log
Syslog logging: enabled (0 messages dropped, 0 messages rate-limited, 0 flushes,
 0 overruns, xml disabled, filtering disabled)
    Console logging: level debugging, 40 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 0 messages logged, xml disabled,
                     filtering disabled
    Buffer logging: level debugging, 40 messages logged, xml disabled,
                    filtering disabled
    Exception Logging: size (4096 bytes)
    Count and timestamp logging messages: disabled

No active filter modules.

    Trap logging: level informational, 30 message lines logged
        Logging to 10.10.10.10, 1 message lines logged, xml disabled,
               filtering disabled

Log Buffer (8192 bytes):

00:14:47: %SYS-5-CONFIG_I: Configured from console by console
C6500#




The logging trap {severity-level} Global Configuration Command

C6500#sh run | in logging
logging 10.10.10.10
C6500#
C6500#clear logging
Clear logging buffer [confirm]
C6500#
C6500#sh log
Syslog logging: enabled (0 messages dropped, 0 messages rate-limited, 0 flushes,
 0 overruns, xml disabled, filtering disabled)
    Console logging: level debugging, 94 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 0 messages logged, xml disabled,
                     filtering disabled
    Buffer logging: level debugging, 9 messages logged, xml disabled,
                    filtering disabled
    Exception Logging: size (4096 bytes)
    Count and timestamp logging messages: disabled

No active filter modules.

    Trap logging: level informational, 48 message lines logged
        Logging to 10.10.10.10, 19 message lines logged, xml disabled,
               filtering disabled

Log Buffer (8192 bytes):
C6500#
C6500#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
C6500(config)#cdp ?
  advertise-v2  CDP sends version-2 advertisements
  holdtime      Specify the holdtime (in sec) to be sent in packets
  run           Enable CDP
  timer         Specify the rate at which CDP packets are sent       (in sec)

C6500(config)#cdp timer 15
C6500(config)#end
C6500#
00:43:01: %SYS-5-CONFIG_I: Configured from console by console
C6500#
C6500#debug cdp ?
  adjacency  CDP neighbor info
  events     CDP events
  ip         CDP ip info
  packets    CDP packet-related information

C6500#debug cdp packets
CDP packet info debugging is on
C6500#
00:43:18: CDP-PA: version 2 packet sent out on GigabitEthernet5/3
00:43:31: CDP-PA: version 2 packet sent out on GigabitEthernet5/3
00:43:44: CDP-PA: version 2 packet sent out on GigabitEthernet5/3
C6500#
C6500#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
C6500(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>

C6500(config)#logging trap debugging ?
  <cr>

C6500(config)#logging trap debugging
C6500(config)#
00:43:57: CDP-PA: version 2 packet sent out on GigabitEthernet5/3
C6500(config)#




The Default Severity Levels of the logging buffered {severity-level} and logging trap {severity-level} Global Configuration Commands

C6500#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
C6500(config)#logging buffered debugging
C6500(config)#logging trap information
C6500(config)#
C6500(config)#do sh run | in logging
logging 10.10.10.10
C6500(config)#
C6500(config)#do clear logging
Clear logging buffer [confirm]
C6500(config)#
C6500(config)#do sh log
Syslog logging: enabled (0 messages dropped, 0 messages rate-limited, 0 flushes,
 0 overruns, xml disabled, filtering disabled)
    Console logging: level debugging, 92 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 0 messages logged, xml disabled,
                     filtering disabled
    Buffer logging: level debugging, 7 messages logged, xml disabled,
                    filtering disabled
    Exception Logging: size (4096 bytes)
    Count and timestamp logging messages: disabled

No active filter modules.

    Trap logging: level informational, 46 message lines logged
        Logging to 10.10.10.10, 17 message lines logged, xml disabled,
               filtering disabled

Log Buffer (8192 bytes):
C6500(config)#
C6500(config)#logging buffered ?
  <0-7>              Logging severity level
  <4096-2147483647>  Logging buffer size
  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)
  filtered           Enable filtered logging
  informational      Informational messages            (severity=6)
  notifications      Normal but significant conditions (severity=5)
  warnings           Warning conditions                (severity=4)
  xml                Enable logging in XML to XML logging buffer
  <cr>

C6500(config)#
C6500(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>

C6500(config)#

No comments:

Post a Comment