↪️
ccie.nyquist.eu
  • Table of Contents
  • Layer 2 Technologies
    • Ethernet Switching
      • L2 Switch Operations
      • Spanning Tree
        • 802.1d – STP
        • 802.1w – RSTP
        • 802.1s – MSTP
      • VTP 101
      • Private VLANs
      • VLANs
      • EtherChannel 101
    • Layer 2 WAN Protocols
      • HDLC
        • HDLC 101
      • PPP
        • PPP 101
        • PPP Authentication - PAP
        • PPP Authentication – CHAP
        • PPP Authentication – EAP
        • PPP Multilink
        • PPPoFR – PPP over Frame Relay
        • PPPoE – PPP over Ethernet
      • Frame Relay
        • Frame Relay 101
        • Frame Relay 102
        • Frame Relay Encapsulations – IETF vs Cisco
        • Multilink Frame Relay
        • Frame Relay Switching
        • Routing over Frame Relay
      • Bridging
        • Bridging on a router
        • MTU 101
    • Wireless
      • Wireless Principles
      • Wireless Implementations
      • Wireless Roaming
      • Wireless Authentication
        • WPA2 PSK
        • WPA2 802.1X
  • IPv4
    • IPv4 Addressing
      • Backup Interfaces
      • FHRP 101
      • DHCP 101
      • DNS 101
      • ARP 101
      • IPv4 101
      • Tunnel Interfaces
        • GRE Tunnels
      • BFD – Bidirectional Forwarding Detection
    • IPv4 Routing
      • How the routing table is built
        • How CEF works
        • Routing Order of Operations
        • NSF – Non Stop Forwarding
      • RIP
        • RIP 101
      • EIGRP
        • EIGRP 101
        • EIGRP Metric
        • More EIGRP Features
      • OSPF
        • OSPF 101
        • OSPF Areas
        • OSPF LSAs
        • OSPF Mechanics
      • IS-IS
        • IS-IS 101
        • IS-IS Mechanics – CLNP
      • BGP
        • BGP 101
        • BGP Attributes
        • More BGP
      • Route Redistribution
      • Policy based Routing
      • PfR 101 – Perfromance Routing
      • ODR
  • IPv6
    • IPv6-101
    • IPv6 Routing
    • Interconnecting IPv6 and IPv4
  • MPLS
    • MPLS 101
    • MPLS L3 VPN
  • Multicast
    • Multicast 101
    • PIM 101
    • IGMP 101
    • Inter Domain Multicast
    • IPv6 Multicast
    • Multicast features on switches
  • Security
    • NAT 101
    • NAT for Overlapping Networks
    • ACLs 101
    • ACLs 102
    • Cisco IOS Firewall
    • Zone Based Firewall
    • AAA 101
    • Controlling CLI Access
    • Control Plane
    • Switch Security
      • Switchport Traffic Control
      • Switchport Port Security
      • DHCP Snooping and DAI
      • 802.1x
      • Switch ACLs
    • IPSec VPN 101
      • IKE / ISAKMP 101
      • IPSEC Crypto Maps 101
      • IPSEC VTI 101
      • DMVPN 101
    • EAP 101
  • Network Services
    • NTP 101
    • HTTP 101
    • File Transfer 101 – TFTP & FTP
    • WCCP 101
  • QoS
    • QoS 101
    • Classification and Marking
    • Congestion Management
      • Legacy Congestion Management
      • SPD – Selective Packet Discard
      • CBWFQ
      • IP RTP Priority
    • Congestion Avoidance – WRED
    • Policing and Shaping
      • CAR 101
    • Compression and LFI
      • Header and Payload Compression
      • LFI for MultiLink PPP
    • Frame Relay QoS
      • Per VC Frame Relay QoS
    • RSVP 101
    • Switching QoS
  • Network Optimization
    • NetFlow 101 – TNF – Traditional NetFlow
    • NetFlow 102 – FNF – Flexible NetFlow
    • IP SLA 101
    • IP Accounting 101
    • Logging 101
    • SNMP and RMON 101
    • Cisco CLI Tips and Tricks
    • AutoInstall
    • Enhanced Object Tracking
    • Troubleshooting 101
    • SPAN, RSPAN, ERSPAN
  • Network Architecture
    • Hierarchical Network Architecture
    • SD Access
    • SD WAN
Powered by GitBook
On this page
  • Configuring Logging
  • Logging Destination
  • Timestamps and Line Numbers
  • Error message level
  • Additional settings
  • Logging configuration changes
  • Monitoring Logs

Was this helpful?

  1. Network Optimization

Logging 101

Configuring Logging

Logging messages generated by the router are sent to the logging process. It controls the distribution of the messages to various destinations. If the logging process is off, then only the console receives log messages. To enable logging, use:

R(config)# logging on

Without this command only the console will receive logs.

Logging Destination

R(config)# logging buffered [SIZE]
! Logs messages to an internal memory buffer.
R(config)# logging HOST-IP [LEVEL]
! Logs messages to a syslog server host.
R(config)# logging trap LEVEL
! Must be enabled in order to log messages to Syslog Host
R(config)# logging persistent
R(config)# logging file FILENAME [MAX-SIZE [MIN-SIZE]] [LEVEL]
! Logs messages to a file
R(config)# logging console
! Logs messages to con0 output
R(config)# logging monitor
! Logs messages to vty output

By default, debug information only appears on the console terminal. To show them on the current terminal, use:

Router# terminal monitor

By default, unsolicited debug information will interrupt solicited display information. Using synchronous logging, unsolicited debug information will only be displayed after the solicited information is displayed.

R(config-line)# logging synchronous [level LEVEL | all] [limit BUFFERS]

Timestamps and Line Numbers

By default, log messages are not time-stamped, but tou can set timestamping using:

R(config)# service timestamps log { uptime |  datetime [msec] [localtime] [show-timezone]}
! uptime – time since last reboot
! datetime - Current Datetime in UTC
! localtime – Shows the time in the configured timezone
! msec – adds milisec to the timestamp
! show-timezone – adds timezone to the time

Separate settings can be configure for debug messages:

R(config)# service timestamps log { uptime |  datetime [msec] [localtime] [show-timezone]}

You can also enable the services for adding sequence numbers to the log:

R(config)# service sequence-numbers

Error message level

R(config)# logging {console|monitor|trap} LEVEL
Level
Keyword
Description
Syslog

0

Emergencies

System unusable

LOG_EMERG

1

Alerts

Immediate action needed

LOG_ALERT

2

Critical

Critical conditions

LOG_CRIT

3

Errors

Error conditions

LOG_ERR

4

Warnings

Warning conditions

LOG_WARNING

5

Notifications

Normal but significant conditions

LOG_NOTICE

6

Informational

Informational messages

LOG_INFO

7

Debugging

Debugging messages

LOG_DEBUG

Additional settings

! Add an origin Identifier:
R(config)# logging origin-id {hostname|ip|ipv6|string STRING}
! Rate limit log messages per second:
R(config)# logging rate-limit [all|console] MESSAGES-PER-SEC [except LEVEL]
! Set the source of syslog messages:
R(config)# logging source-interface INTERFACE
! Log user information when a user uses the enable command:
R(config)# logging userinfo

Logging configuration changes

R(config)# archive
R(config-archive)# log config
R(config-archive-log-cfg)# logging enable
R(config-archive-log-cfg)# logging size SIZE
R(config-archive-log-cfg)# hidekeys
! Suppresses the display of passwords
R(config-archive-log-cfg)# notify syslog
! Enables sending of configuration changes to a syslog server

Monitoring Logs

To see the buffered logs, use:

R# show logging [count|history]

To see the archive logs, use:

R# show archive log config [all|user USER]
PreviousIP Accounting 101NextSNMP and RMON 101

Last updated 2 years ago

Was this helpful?