Syslog

  • severity levels
    • 0: emergency ≡ system may be unusable
    • 1: alert ≡ immediate action
    • 2: critical
    • 3: error
    • 4: warning
    • 5: notification ≡ normal, significant
    • 6: informational ≡ normal
    • 7: debugging (default for console, monitor, buffered)
  • banners
    • MOTD: always appears
    • login: VTY, before authC (does not appear in console)
    • enable: VTY, after authC
  • UDP 514, TCP 601
  • message length limit – 1024 bytes (including IP header)
(config)# logging trap [<LEVEL>]
(config)# logging console [<LEVEL>]
(config)# logging buffered [<LEVEL>] [<SIZE>]
(config)# logging <IP>

; log somewhere besides console
(config)# logging on

; limits entries inlog per second, except LEVEL and lower
(config)# logging rate-limit <mps> [except <LEVEL>]

(config)# service timestamps log datetime|uptime ...
(config)# service sequence-numbers

(config)# banner motd
(config)# banner login
(config)# banner exec
; EVENT = link-status, spanning-tree, ...
(config-if)# logging event <EVENT>
; 10 default, for all sessions
(config-line)# history size <N>
(config-line)# logging synchronous
(config-line)# exec-timeout 0 0
# show logging
# show history
; increase for this session only
# terminal history size <N>