Skip to content

CCNA course / Run the services networks rely on · Step 2 of 11

Guide: Device management and monitoringSwitch

Guide

Device management and monitoring: SSH, syslog, SNMP and NTP (CCNA and CCNP)

Use SSH to manage devices securely, syslog to record events, SNMP to monitor and notify, and NTP to keep clocks aligned. The same evidence helps troubleshoot management and monitoring failures.

5 parts · 50 practice questions

SSH access and syslog basics

The traditional IOS SSH server setup needs a hostname and an IP domain name before RSA keys are generated. SSH also needs user authentication and VTY lines that permit SSH. Configure ip ssh version 2 to select SSH version 2 where supported. login local checks the local username database, so a missing username makes authentication fail rather than granting access or falling back to the enable secret.

VTY configuration applies only to the line range selected. A device may have additional VTY lines, and a session can land on any available one. Apply consistent authentication, access-class and transport restrictions to every VTY that accepts inbound management sessions. access-class with in filters source addresses on the VTY itself; an unmatched source is denied by policy, although the client error text can vary. An interface ip access-group filters packets on an interface and is not the VTY line control.

Syslog severity has eight levels: 0 emergencies, 1 alerts, 2 critical, 3 errors, 4 warnings, 5 notifications, 6 informational and 7 debugging. Lower numbers mean greater severity. A configured threshold includes that level and every more severe level. Thus trap warnings sends levels 0 through 4, while trap debugging includes all eight levels.

logging host selects the remote syslog receiver and logging trap sets the remote severity threshold. Traditional IOS syslog uses UDP port 514 by default. UDP does not guarantee delivery. logging buffered stores recent messages in a bounded, circular RAM buffer; for example, 8192 is the requested buffer size in bytes. show logging displays logging destinations, thresholds and buffered messages when buffering is enabled.

service timestamps log datetime msec adds date, time and millisecond precision to log messages. The timestamp only helps correlate events when the device clock and timezone are correct. logging monitor sets the threshold for interactive terminal sessions, and terminal monitor enables those messages in the current VTY session only.

IOS XE
hostname R1
ip domain name example.net
username operator secret <secret>
crypto key generate rsa
ip ssh version 2
line vty 0 15
 login local
 access-class 10 in
 transport input ssh
service timestamps log datetime msec
logging host 192.0.2.50
logging trap warnings
logging buffered 8192
logging monitor informational
terminal monitor
show logging
Practice this part:CCNA: SSH & Syslog (10)
References (3)

Reading and routing syslog messages

An IOS message commonly appears as %FACILITY-SEVERITY-MNEMONIC:description. In %LINK-3-UPDOWN, LINK identifies the subsystem (facility), 3 means errors, and UPDOWN names the event (mnemonic). In %SYS-5-CONFIG_I, SYS is the facility and 5 is notifications. The severity numbers and names are: 0 emergencies, 1 alerts, 2 critical, 3 errors, 4 warnings, 5 notifications, 6 informational and 7 debugging.

Severity levels
0 through 7
IOS logging facility default
local7
Remote syslog default
UDP port 514

The syslog facility categorizes the message source for a receiving syslog system. Facility and severity together form the priority value; the protocol calculation is facility number multiplied by 8 plus severity. IOS can identify locally defined facilities as local0 through local7. The IOS logging facility default is local7. Facility is not the transport, encryption method or buffer size.

logging host <address> configures the remote destination. logging trap <level> controls the minimum severity forwarded: warnings sends levels 0 through 4, and debugging sends all levels 0 through 7. Remote syslog traditionally uses UDP port 514 by default. Configure timestamps with service timestamps log datetime msec, then synchronize the clock with NTP for meaningful event ordering.

The local RAM log buffer is separate from remote delivery. logging buffered <bytes> enables it and sets its maximum size; show logging displays its contents and current logging state, including trap severity and message counts for console, monitor, buffer and trap destinations. A message appearing locally does not prove the remote server received it, so check the receiver and network path separately.

IOS XE
logging facility local7
logging host 192.0.2.50
logging trap warnings
service timestamps log datetime msec
logging buffered 8192
show logging
References (2)

SNMP polling, security and notifications

An SNMP manager polls an agent for management information in its MIB. Community-based SNMP uses a configured community value; ro permits read requests and rw permits reads plus SET operations on writable objects, subject to configured restrictions. The words public and private are ordinary community names, not permission keywords. A community name alone does not provide SNMPv3-style cryptographic authentication or encryption.

SNMPv3 security models
noAuthNoPriv, authNoPriv and authPriv
SNMP polling
UDP port 161
SNMP notifications
UDP port 162

SNMPv3 User-based Security Model offers noAuthNoPriv, authNoPriv and authPriv. noAuthNoPriv has neither message authentication nor privacy. authNoPriv authenticates messages, commonly with HMAC-MD5 or HMAC-SHA, without encrypting them. authPriv adds privacy encryption, such as DES or AES depending on platform and configuration. Choosing SNMPv3 alone does not mean packets are encrypted; select authPriv and compatible algorithms at both ends.

An agent can send notifications to a manager. A trap is unacknowledged, so the sender cannot know it arrived. An inform expects a response acknowledgment and may be retransmitted if no response arrives. Neither notification type inherently encrypts its content. Catalyst IOS XE uses UDP port 161 for SNMP polling and port 162 for notifications; these ports open when an SNMP host, user, community or manager command is configured.

A LINK facility message reports interface link-state events. Cisco documents %LINK-5-CHANGED with the text changed state to administratively down after an interface shutdown. Here LINK is the facility, 5 the severity, and CHANGED the mnemonic. Identifiers and severities vary by event and platform. Seeing a message locally does not prove a remote syslog server received it; verify delivery at the receiver.

IOS XE
snmp-server community Flackbox1 ro
snmp-server community Flackbox2 rw
snmp-server host 192.0.2.20 version 3 priv monitor
show logging
Practice this part:CCNA: SNMP (8)
References (2)

NTP synchronization and troubleshooting

ntp server <address> configures a client-to-server association: the device polls the specified time server. ntp peer configures a symmetric association between peers instead. NTP strata describe the number of NTP hops from an authoritative time source. In the general NTP hierarchy, stratum 0 is the reference clock, such as an atomic or GPS clock, and stratum 1 servers connect directly to it. The Catalyst 9300 IOS XE implementation does not support stratum 1 service or a direct radio or atomic clock connection, so use a supported upstream NTP server.

Reference clock
stratum 0
Directly connected servers
stratum 1
Unsynchronized clock
stratum 16

Cisco's Catalyst 9000 NTP guide defines strata 0 through 15 and says devices beyond 15 are unsynchronized, so stratum 16 means the clock is not a valid synchronized time source. That guide covers C9350 and C9610 support; confirm command behavior for the exact model and release. Shortly after adding an NTP server this can be temporary while the association is being established. Check show ntp status and show ntp associations detail for synchronization state, reachability and association validity. show clock detail reports the software clock's time source; after successful NTP synchronization it reports NTP. A manually set clock reports user configuration.

ntp master makes the device serve time using its own local clock, optionally at a configured stratum. It can provide isolated fallback time, but can distribute incorrect time if its clock is inaccurate. Use it only when that behavior is intended.

NTP authentication lets a client validate time updates with a configured key. Define the same key number and secret on the server and client. On the client enable ntp authenticate, define the key with ntp authentication-key, mark its number with ntp trusted-key, and reference it in ntp server <address> key <number>. The server needs the matching key definition to authenticate its responses; the client-side authenticate and trusted-key settings cause unauthenticated updates to be rejected.

IOS XE
ntp server 10.0.1.100
ntp authenticate
ntp authentication-key 1 md5 <shared-key>
ntp trusted-key 1
ntp server 10.0.1.100 key 1
ntp master 8
show ntp status
show ntp associations detail
show clock detail
Practice this part:CCNA: NTP (6)
References (2)

ENCOR depth: telemetry, Flexible NetFlow and EEM

Cisco DNA Center Assurance provides network and device health scores and is built on the Cisco Network Data Platform (NDP). NDP collects and correlates NetFlow, SNMP, wireless LAN controller and syslog data to monitor network performance. This controller and analytics function is separate from Catalyst IOS XE device configuration.

Flexible NetFlow has three core components. A flow record defines key fields that identify a flow and non-key fields and counters to collect. A flow exporter defines where and how flow data is sent. A flow monitor binds a record to a cache and can attach an exporter; apply the monitor to an interface to observe traffic. Cisco Flexible NetFlow supports NetFlow v9 and IPFIX export on supported platforms. IPFIX is the IETF template-based flow export standard derived from the NetFlow v9 model; NetFlow v5 has a fixed record layout.

An Embedded Event Manager applet responds to an event with ordered action statements. The action <label> cli command "<command>" statement runs the quoted IOS or IOS XE command through the CLI when the applet triggers. Use valid command syntax and the required privilege context for the target device.

The syslog facts remain important at ENCOR depth: severity 3 is errors, 4 warnings and 6 informational; severity numbering runs from 0 most severe to 7 least severe. In %LINK-3-UPDOWN, LINK names the facility or subsystem, 3 is severity and UPDOWN is the mnemonic. SNMPv3 authPriv provides authentication and encryption, while authNoPriv authenticates without encryption. Informs request acknowledgment and can be retransmitted; traps do not request acknowledgment.

IOS XE
flow record FLOW-RECORD
flow exporter FLOW-EXPORTER
flow monitor FLOW-MONITOR
action 2.0 cli command "show ip interface brief"
References (4)

Check your understanding

Device management and monitoring: SSH, syslog, SNMP and NTP (CCNA and CCNP)

All 5 sections · no timer

Unlimited retries

Questions from every section are combined into one assessment. Answer them all correctly to complete the article.

Your completion saves in this browser. Sign in to sync it to your account.