By the end of this lesson you can
- Configure NTP clients and read stratum and sync state
- Send logs to a syslog server at the right severity
- Explain SNMP polling, traps, MIBs and OIDs, and compare v2c with v3
- Describe classification, marking, queuing, policing and shaping
- Back up a configuration and choose a secure transfer protocol
NTP: why every device needs the right time
When something goes wrong at 02:14 on the firewall, you want to line it up with what the core switch logged at 02:14. If one device is seven minutes fast, that timeline is useless. Wrong time also breaks certificate checks (a certificate can look "not yet valid") and some authentication.
- NTP uses UDP port 123 and is organised by stratum: stratum 1 servers are directly attached to a reference clock (GPS, atomic), stratum 2 learn from stratum 1, and so on. Stratum 16 means unsynchronised.
ntp server 192.168.1.100makes a Cisco device an NTP client of that server. Its own stratum becomes the server's plus one.- A device can also serve time to others; on IOS,
ntp mastermakes a router an authoritative source when nothing better exists. service timestamps log datetime msecputs the date and time, to the millisecond, on every log message.
R1(config)#ntp server 192.168.1.100
R1(config)#service timestamps log datetime msec
R1#show ntp status
Clock is synchronized, stratum 2, reference is 192.168.1.100
R1#show ntp associations
R1#show clock detailSyslog and severity levels
Cisco messages look like %LINK-3-UPDOWN: Interface GigabitEthernet0/0/1, changed state to down: facility (LINK), severity (3), mnemonic (UPDOWN), then the text. Syslog sends them to a server over UDP port 514.
| Level | Keyword | Meaning |
|---|---|---|
| 0 | emergencies | System unusable |
| 1 | alerts | Immediate action needed |
| 2 | critical | Critical condition |
| 3 | errors | Error condition, for example %LINK-3-UPDOWN |
| 4 | warnings | Warning |
| 5 | notifications | Normal but significant, for example %SYS-5-CONFIG_I |
| 6 | informational | Informational |
| 7 | debugging | Debug output, the least severe |
Choosing a level means "this level and everything more severe". logging trap informational (6) sends levels 0 to 6 and skips debugging. A common trap: thinking 7 is the most serious. It is the least.
R1(config)#logging host 192.168.1.100
R1(config)#logging trap informational
! older IOS form: logging 192.168.1.100
R1#show loggingSNMP: monitoring devices
A network management system (NMS, the manager) polls agents on devices with SNMP over UDP port 161, and agents send traps or informs (an inform is a trap that expects an acknowledgement) to UDP port 162 when something happens. The data is organised in a MIB (management information base); each value, such as sysUpTime or an interface counter, has an OID (object identifier).
| Version | Security | Use |
|---|---|---|
| SNMPv1, v2c | A community string, sent in cleartext. RO lets you read, RW lets you change settings. | Labs, or read only behind strict ACLs |
| SNMPv3 | Users with authentication and optional encryption (noAuthNoPriv, authNoPriv, authPriv) | Production: use authPriv |
R1(config)#access-list 20 permit host 192.168.1.50
R1(config)#snmp-server community CwmLabRO ro 20
! SNMPv3 outline (concept, see lab notes):
R1(config)#snmp-server group OPS v3 priv
R1(config)#snmp-server user nms1 OPS v3 auth sha AUTHPASS priv aes 128 PRIVPASSCommunities named public and private are the first thing scanners try. A read-write v2c community is effectively a cleartext admin password. Never configure one on a production device.
QoS in one picture
- Classification and marking: identify traffic and mark it so later devices do not have to look again. At Layer 3, the DSCP field in the IP header (voice is usually EF, value 46). At Layer 2, the 3 bit CoS field in the 802.1Q tag.
- Trust boundary: the point where you start believing markings. Usually the access switch port toward an IP phone, never a user PC that could mark its own downloads as voice.
- Queuing: a strict priority queue for voice (small, delay sensitive), weighted queues for the rest.
- Congestion avoidance: WRED drops some TCP packets early, so senders slow down before the queue overflows.
- Policing vs shaping: a policer drops or re-marks traffic above a rate; a shaper buffers and delays it. Service providers police; customers shape to stay under the contract rate.
Voice and video care about delay, jitter (variation in delay) and loss. Commonly quoted targets for voice are one way delay under about 150 ms, jitter under about 30 ms and loss under 1 percent.
Backups: TFTP, FTP and the secure options
| Protocol | Transport | Authentication | Encryption |
|---|---|---|---|
| TFTP | UDP 69 | None | None |
| FTP | TCP 21 control, 20 data (active mode) | Username and password | None, credentials in cleartext |
| SCP, SFTP | TCP 22 (SSH) | SSH credentials or keys | Yes |
R1#copy running-config tftp:
Address or name of remote host []? 192.168.1.100
Destination filename [r1-confg]?
!!
R1#copy tftp: running-config ! restore (merges into the running config)TFTP is fine on an isolated lab network and nowhere else: anyone on the path can read the file, and anyone who can reach the server can overwrite it. Your configuration contains password hashes, SNMP communities and keys, so treat backups like secrets.
Practise on R1
Server-Ops at 192.168.1.100 provides NTP (as a stratum 1 source in this console), syslog and TFTP. Outputs are modelled.
Missions 0/11
Flashcards: do you remember?
Tap a card to flip it. Try to answer in your head first; recalling is what makes it stick.
Quick quiz
Instant feedback on every answer. Score 70% or more to pass this lesson's quiz.
Q1Which severity is the least serious?
7 is debugging.
Q2Why does accurate time matter for security?
Timelines and certificate checks both need correct clocks.
Q3What protects SNMP traffic with authentication and encryption?
v1 and v2c send communities in cleartext.
Q4A provider drops traffic above the contracted rate. That is:
Shaping would buffer it instead.
Q5Which DSCP value is commonly used for voice?
Expedited Forwarding.
Q6Which protocol is the secure choice for copying configs?
SCP runs over SSH.
Hands-on lab
Packet Tracer lab 3.11: time, logs, SNMP and backups
You need: Cisco Packet Tracer (free with a Cisco Networking Academy account; version 9.0.1 was the current download on the NetAcad Resource Hub when this lesson was written). Devices: 1 x ISR4331, 1 x 2960, 1 x Server-PT (Server-Ops), 1 x PC-PT (NMS-PC).
Simulator lab, zero risk. This lab runs inside Cisco Packet Tracer, so it touches no real network. Packet Tracer is free with a Cisco Networking Academy account (netacad.com). It simulates a subset of Cisco IOS, so where support for a feature is uncertain we say so instead of promising it works.
Topology and addressing
| Device | Interface | IPv4 address / prefix | Default gateway or note |
|---|---|---|---|
| R1 | Gi0/0/0 | 192.168.1.1/24 | |
| SW1 | VLAN 1 | 192.168.1.2/24 | default gateway 192.168.1.1 |
| Server-Ops | Fa0 | 192.168.1.100/24 | NTP, syslog, TFTP, FTP |
| NMS-PC | Fa0 | 192.168.1.50/24 | MIB Browser |
Server services
On Server-Ops, open Services and turn on NTP, Syslog, TFTP and FTP. Add an FTP user with write permission.
NTP on R1 and SW1
ntp server 192.168.1.100 service timestamps log datetime msecSync can take a minute or more of simulated time; use the fast forward button.
Syslog on R1 and SW1
logging host 192.168.1.100 logging trap informationalIf
logging hostis rejected, try the older formlogging 192.168.1.100.Make some logs
Shut and unshut an interface, enter and leave configuration mode, then open Services, Syslog on Server-Ops and find the entries from 192.168.1.1 and 192.168.1.2.
SNMP on R1 (v2c, lab only)
R1(config)#access-list 20 permit host 192.168.1.50 R1(config)#snmp-server community CwmLabRO ro 20On NMS-PC open Desktop, MIB Browser: target 192.168.1.1, community CwmLabRO, then GET sysName or sysUpTime.
Back up the config
R1#copy running-config tftp: Address or name of remote host []? 192.168.1.100 Destination filename [r1-confg]?Check the TFTP file list on Server-Ops. Optionally try
ip ftp username,ip ftp passwordandcopy running-config ftp:.Verify
R1#show ntp status R1#show ntp associations R1#show clock detail R1#show logging
You are done when: show ntp status says synchronised with reference 192.168.1.100, show clock detail names NTP as the source, show logging shows trap level informational and host 192.168.1.100, Server-Ops lists syslog entries from both devices, the MIB Browser GET returns a value, and r1-confg appears in the TFTP list.
Packet Tracer limits and notes
- SNMPv3 commands (
snmp-server group,snmp-server user ... auth sha ... priv aes) in Packet Tracer are UNVERIFIED. If rejected, treat SNMPv3 as concept. ntp masterand NTP authentication on Packet Tracer routers are UNVERIFIED. The Server-PT NTP service is the dependable time source.- Whether
logging host,logging <ip>or both are accepted depends on the image: UNVERIFIED. - QoS configuration (class-map, policy-map, service-policy) support in Packet Tracer is partial and UNVERIFIED, so QoS stays conceptual here.
- FTP copy from IOS in Packet Tracer is UNVERIFIED; TFTP copy works in the outline author's experience.
show snmp communityis also UNVERIFIED. - Packet Tracer simulates a subset of IOS. If a command here is rejected in your version, note it, skip that step and carry on; the concept still applies to real Cisco gear.
Download the lab checklist (.txt) Print it or keep it open beside Packet Tracer.
Key takeaways
- Correct time everywhere, from NTP, makes logs and certificates trustworthy.
- Severity 0 is the worst and 7 the least; a trap level includes everything more severe.
- Send logs off the box and alert on config changes.
- SNMP v2c communities are cleartext; use v3 authPriv and ACLs.
- QoS manages congestion; it does not add bandwidth.
- Back up configs over SCP or SFTP and protect the files.
Finished the sections, quiz and lab? Mark the lesson complete. Progress is saved only in this browser.