Chapter 5 · CCNA 200-301 Study Guide · Based on the CCNA 200-301 v2.0 exam blueprint (effective February 2027)

Chapter 5: Security Fundamentals

Security is one of the largest CCNA domains, and it is where memorized definitions meet real incidents. This chapter covers threats, VPNs, access control lists, Layer 2 defenses, device hardening, and wireless security. Cisco loves testing the differences between similar technologies — watch for every comparison table.

5.1 Security Concepts: Know Your Enemy

5.1.1 Malware

TypeHow it spreadsWhat it does
VirusAttaches to a host program; needs user action to spreadInfects files, corrupts data
WormSelf-replicating; no host, no user action neededSpreads across networks, consumes resources
TrojanDisguised as legitimate software the user installsOpens backdoors, steals data
RansomwareDelivered by phishing or trojansEncrypts files, demands payment
SpywareBundled downloads, silent installsSecretly monitors; keyloggers steal passwords via keystrokes
RootkitInstalled by other malwareHides itself and attacker tools from the OS
Key point

The most tested malware fact: a virus needs a host and a human; a worm spreads itself. Malware moving across the network with nobody clicking anything is a worm.

Exam tip

Scenario: "users report encrypted files and a ransom note" — ransomware; the exam-correct response is backups and incident response, not paying. "Keylogger" is a type of spyware, not a separate top-level category.

5.1.2 Social Engineering and Phishing

Social engineering attacks the human. Phishing: fraudulent messages impersonating a trusted sender to steal credentials or deliver malware. Variants: spear phishing (targeted at a person/org), whaling (aimed at executives), vishing (voice calls), smishing (SMS), pretexting (invented scenario, e.g. fake IT support), baiting (lure such as a free USB drive), tailgating (following someone through a secured door).

Key point

The defense against social engineering is user training and verification procedures, not technology. "Security awareness training" beats any firewall answer.

5.1.3 Denial of Service

DoS overwhelms a target from a single source so legitimate users can't get through. DDoS does it from many sources at once — typically a botnet of compromised devices — making it far harder to stop. Mitigations: rate limiting, filtering, and cloud scrubbing services that absorb the flood upstream.

5.1.4 Man-in-the-Middle

In a MITM attack, the attacker secretly sits between two parties, intercepting or altering traffic. Examples: ARP spoofing on a LAN (poisoned ARP caches redirect traffic through the attacker) and evil-twin access points mimicking a legitimate SSID. Defenses: encryption, mutual authentication, VPNs, and Dynamic ARP Inspection (5.4.2).

network engineer tracing cables in a server rack while investigating a security alert
network engineer tracing cables in a server rack while investigating a security alertPhoto: Field Engineer via https://www.pexels.com/photo/442150/

5.2 VPNs

A VPN builds an encrypted tunnel across an untrusted network (usually the internet) so private traffic travels safely.

5.2.1 Site-to-Site vs. Remote-Access

Site-to-siteRemote-access
ConnectsEntire networks (branch to HQ)Individual users to the corporate net
EndpointsRouters/firewalls at each siteVPN client on the user's device
AvailabilityAlways onOn demand
Typical protocolIPsecIPsec or SSL/TLS
Exam tip

"Traveling employee needs access from a hotel" = remote-access. "Connect the Chicago and Dallas offices permanently" = site-to-site. Match the scenario.

5.2.2 IPsec Fundamentals

IPsec secures IP traffic, most often for site-to-site VPNs. Its two core protocols are a classic exam trap:

Key point

AH = authentication only. ESP = encryption. When a question demands confidentiality, the answer is ESP.

Two modes: transport mode encrypts only the payload (original IP header visible) — used host-to-host. Tunnel mode encrypts the entire packet inside a new IP header — used gateway-to-gateway (site-to-site).

IKE (Internet Key Exchange) sets up the tunnel: Phase 1 builds a secure channel between peers (authentication plus Diffie-Hellman key exchange); Phase 2 negotiates the IPsec security associations that protect the data.

5.2.3 SSL VPNs

SSL/TLS VPNs use web-style encryption. Clientless mode needs only a browser; full-tunnel client mode (e.g. Cisco AnyConnect) gives complete network access like IPsec remote-access. Advantage: easy firewall traversal over TCP 443.

5.3 Access Control Lists

An ACL is an ordered permit/deny list checked top-down, first match wins. No match hits the implicit deny all at the end — the most tested ACL fact on the exam.

5.3.1 Standard vs. Extended

StandardExtended
Numbers1–99, 1300–1999100–199, 2000–2699
Filters onSource IP onlySource/destination IP, protocol, ports
PlacementClose to the destinationClose to the source
Exam tip

Placement exists for one reason: a standard ACL sees only the source, so placing it near the source blocks that source everywhere. Extended ACLs are precise enough to live near the source. Expect "where do you place it and why" questions.

Named ACLs (ip access-list extended BLOCK-TELNET) allow descriptive names and per-line editing — numbered ACLs force you to rebuild the list to remove a line.

R1(config)# ip access-list extended BLOCK-TELNET
R1(config-ext-nacl)# deny tcp 192.168.10.0 0.0.0.255 host 192.168.20.5 eq 23
R1(config-ext-nacl)# permit ip any any
R1(config-ext-nacl)# exit
R1(config)# interface gigabitEthernet 0/0
R1(config-if)# ip access-group BLOCK-TELNET in

The explicit permit ip any any is mandatory — otherwise the implicit deny kills everything else. One ACL per interface, per direction (in/out), per protocol.

5.3.2 Wildcard Masks

A wildcard mask is the inverse of a subnet mask: 0 = bit must match, 1 = bit ignored.

Worked calculation

Derive the wildcard mask for 10.1.4.0/22. Step 1: /22 subnet mask = 255.255.252.0. Step 2: Subtract each octet from 255: 255−255=0; 255−255=0; 255−252=3; 255−0=255. Final answer: 0.0.3.255 → permit 10.1.4.0 0.0.3.255.

Worked calculation

ACL entry: deny tcp 172.16.0.0 0.0.255.255 any eq 23. Does a Telnet packet from 172.16.5.9 match? Step 1: Wildcard 0.0.255.255 — first two octets must match exactly, last two ignored. Step 2: 172.16.5.9 vs 172.16.0.0 — 172=172, 16=16, rest ignored. Address matches. Step 3: Protocol TCP, destination port 23 — both match. Final answer: yes, the packet is denied. The entry covers all of 172.16.0.0/16 for Telnet.

Key point

0.0.0.0 = match one exact host (like the host keyword). 255.255.255.255 = match any address (like any).

Try it yourself

Write the wildcard mask for 192.168.50.128/26.

Show solution

/26 mask = 255.255.255.192. Subtract: 0.0.0.63. Entry: permit 192.168.50.128 0.0.0.63. (Shortcut: block size 64 → wildcard is one less, 63.)

Try it yourself

The server at 10.0.0.50 must allow web (TCP 80) from subnet 10.0.1.0/24 but block Telnet (TCP 23) from that subnet; all else flows. Standard or extended ACL, and where?

Show solution

Extended, as close to the source (users) as possible. A standard ACL filters only on source address — it cannot tell Telnet from web, so it would block everything from 10.0.1.0/24. Only an extended ACL matches destination ports (eq 23 vs eq 80). End with permit ip any any or the implicit deny breaks all other traffic.

5.4 Layer 2 Security

Switches forward frames without asking questions, so Layer 2 needs explicit defenses. These four work as a team.

5.4.1 DHCP Snooping

Stops rogue DHCP servers handing out bogus gateways/DNS to redirect traffic. Ports are trusted (uplinks toward the real DHCP server) or untrusted (everything else, the default); DHCP server messages (OFFER, ACK) on untrusted ports are dropped. It also builds a binding table (MAC–IP–port–VLAN) that powers DAI.

SW1(config)# ip dhcp snooping
SW1(config)# ip dhcp snooping vlan 10
SW1(config)# interface gigabitEthernet 0/1
SW1(config-if)# ip dhcp snooping trust
Key point

Trust the uplink, distrust the edge. Forgetting to trust the uplink is the classic lab mistake — suddenly nobody gets an IP.

5.4.2 Dynamic ARP Inspection

DAI stops ARP spoofing (the classic MITM setup) by checking ARP packets on untrusted ports against the DHCP snooping binding table and dropping mismatches. No binding table = nothing to validate, so DAI requires DHCP snooping. Static-IP devices need static mappings or ARP ACLs.

5.4.3 Port Security

Limits MAC addresses per port, defeating MAC flooding and rogue devices:

Violation modeActionDefault?
shutdownPort goes err-disabled; manual recovery neededYes
restrictDrops frames, sends SNMP/syslog, port stays upNo
protectSilently drops frames, no notificationNo
SW1(config)# interface gigabitEthernet 0/5
SW1(config-if)# switchport mode access
SW1(config-if)# switchport port-security
SW1(config-if)# switchport port-security maximum 2
SW1(config-if)# switchport port-security violation restrict
SW1(config-if)# switchport port-security mac-address sticky

Sticky MACs learn and remember the first MACs seen — no manual entry needed. Port security requires an access port (switchport mode access first). Default maximum is 1 MAC.

Try it yourself

A user plugs a small unmanaged switch into a wall jack (PortFast port, default port-security). The port goes err-disabled within seconds. Which two mechanisms are most likely responsible?

Show solution

1. BPDU Guard — the downstream switch sends BPDUs; a PortFast port receiving a BPDU err-disables immediately. 2. Port security (shutdown mode) — the default max of 1 MAC is exceeded the moment a second device appears. BPDU Guard usually fires first since BPDUs arrive instantly.

5.4.4 Spanning-Tree Guards and VLAN Best Practices

Exam tip

"Prevent a rogue switch from becoming root?" = Root Guard. "Shut down a PortFast port that receives a BPDU?" = BPDU Guard. One guards the role, the other the edge port.

close-up of a network switch with labeled ports and cables in an office wiring closet
close-up of a network switch with labeled ports and cables in an office wiring closetPhoto: Brett Sayles via https://www.pexels.com/photo/2881232/

5.5 Device Hardening

5.5.1 Passwords, SSH, and Banners

R1(config)# hostname R1
R1(config)# ip domain-name certcrack.lab
R1(config)# crypto key generate rsa modulus 2048
R1(config)# ip ssh version 2
R1(config)# line vty 0 4
R1(config-line)# transport input ssh
R1(config-line)# login local
R1(config-line)# exit
R1(config)# username admin privilege 15 secret Str0ngP@ss!

transport input ssh is what actually kills Telnet on the VTY lines.

Key point

Given a VTY config on the exam, check three things: transport input ssh, login local (with a username defined), and no Telnet.

5.5.2 Disable What You Don't Use

Every running service is attack surface: no ip http server, disable CDP/LLDP on untrusted edges, and shut down unused switch ports (or park them in a dead-end VLAN). An enabled, unconfigured port is an open door.

5.5.3 AAA: TACACS+ vs. RADIUS

AAA = Authentication (who are you?), Authorization (what may you do?), Accounting (what did you do?). Centralize it on a server (e.g. Cisco ISE) instead of local passwords per device.

TACACS+RADIUS
OriginCisco-proprietaryOpen standard
TransportTCP 49UDP 1812 / 1813
EncryptionEntire packetPassword only
AAA handlingSeparates auth, authz, acctCombines auth + authz
Best forDevice administrationNetwork access (802.1X, VPN, wireless)
Exam tip

"Encrypts the entire payload, TCP 49" = TACACS+. "Open standard over UDP" = RADIUS. Use-case split: TACACS+ administers devices; RADIUS authenticates users onto the network.

Try it yourself

Centralized auth for 40 routers/switches is needed. Requirements: authorization separate from authentication, and all exchanged data encrypted — not just passwords. Which protocol, and why is the other wrong?

Show solution

TACACS+: it separates authentication, authorization, and accounting, encrypts the full packet, and runs over TCP 49. RADIUS is wrong here because it merges authentication with authorization and encrypts only the password. (RADIUS would be right for a different job, like 802.1X user logins.)

5.6 Wireless Security

Wireless frames reach anyone listening, so encryption and strong authentication are mandatory. WEP is broken — know it only to reject it. WPA was interim and is deprecated. The real comparison:

WPA2WPA3
Personal handshakePSK (4-way handshake)SAE (Simultaneous Authentication of Equals)
Dictionary attacksVulnerable to offline brute forceResistant by design
Forward secrecyNoYes
EncryptionAES-128 (CCMP)AES-128, optional 192-bit (Enterprise)
Management framesUnprotected by defaultPMF required

WPA2 was weakened by the KRACK attack (2017) on its handshake. WPA3 comes in Personal (passphrase) and Enterprise (802.1X/EAP with RADIUS — see 5.5.3) modes.

Key point

WPA3 replaces the PSK handshake with SAE → forward secrecy + resistance to offline dictionary attacks. Either benefit named in a question means WPA3.

Try it yourself

An office uses WPA2-Personal with passphrase "summer2024". An attacker captures the 4-way handshake. (a) What attack is now practical? (b) Which WPA3 feature would have prevented it?

Show solution

(a) Offline dictionary/brute-force attack on the captured handshake — "summer2024" falls in seconds. (b) SAE. WPA3-Personal's SAE handshake resists offline dictionary attacks, and forward secrecy means a later password leak can't decrypt old captures.

End-of-Chapter Test

Q1 What is the fundamental difference in how a virus and a worm spread? A. A virus encrypts files; a worm deletes them B. A virus requires a host program and user action; a worm self-replicates across networks C. A worm requires a host program; a virus does not D. There is no difference; the terms are interchangeable

Q2 An attacker sets up a wireless access point using your company's SSID to intercept employee traffic. What is this? A. DDoS B. Phishing C. Evil twin (man-in-the-middle) D. SQL injection

Q3 Which IPsec protocol provides encryption of the data payload? A. AH B. IKE C. ESP D. GRE

Q4 A traveling salesperson needs occasional secure access to the corporate LAN from hotels. Which VPN type fits? A. Site-to-site IPsec VPN B. Remote-access VPN C. GRE tunnel without IPsec D. MPLS Layer 3 VPN

Q5 ACL entry: permit tcp 10.1.0.0 0.0.255.255 any eq 80. Which source address matches? A. 10.1.5.20 B. 10.2.5.20 C. 192.168.1.5 D. 11.1.0.5

Q6 Where should a standard ACL be placed? A. As close to the source as possible B. As close to the destination as possible C. On the core router only D. On every interface in both directions

Q7 Which feature uses the DHCP snooping binding table to validate ARP packets? A. Port security B. BPDU Guard C. Dynamic ARP Inspection D. Root Guard

Q8 A port with default port-security settings detects a second MAC address. What happens? A. The frame is silently dropped; the port stays up B. The frame is dropped, a syslog message is sent, the port stays up C. The port transitions to err-disabled D. The switch learns the new MAC normally

Q9 Which AAA protocol encrypts the entire packet, separates authentication from authorization, and uses TCP port 49? A. RADIUS B. TACACS+ C. Kerberos D. LDAP

Q10 What is the primary improvement of WPA3-Personal over WPA2-Personal? A. It uses WEP encryption for backward compatibility B. It replaces the PSK 4-way handshake with SAE, adding forward secrecy and resistance to offline dictionary attacks C. It removes the need for any passphrase D. It operates only on the 6 GHz band

---

ANSWERS

Answer key

Q1: B — A virus needs a host program and user action; a worm self-replicates with neither. File encryption describes ransomware, not viruses generally.
Q2: C — A rogue AP impersonating the legitimate SSID is an evil twin, a form of man-in-the-middle. Phishing (B) uses fraudulent messages, not rogue APs.
Q3: C — ESP provides encryption plus integrity. AH (A) authenticates only and never encrypts. IKE (B) negotiates the tunnel; it isn't the data-encryption protocol.
Q4: B — Occasional individual access from varying locations is the textbook remote-access VPN case. Site-to-site (A) permanently connects whole networks.
Q5: A — Wildcard 0.0.255.255 requires the first two octets to match 10.1 exactly. Only 10.1.5.20 qualifies; 10.2.5.20 fails the second octet.
Q6: B — Standard ACLs see only the source, so near-source placement would block that source everywhere. Place them close to the destination; extended ACLs go near the source.
Q7: C — Dynamic ARP Inspection validates ARP against the DHCP snooping binding table, dropping spoofed ARP. Port security limits MACs per port; BPDU/Root Guard protect spanning tree.
Q8: C — The default violation mode is shutdown, which err-disables the port. Silent drop is protect (A); drop-plus-syslog is restrict (B).
Q9: B — TACACS+: Cisco-proprietary, TCP 49, full-packet encryption, separated AAA. RADIUS (A) uses UDP 1812/1813, encrypts only the password, and merges auth with authz.
Q10: B — WPA3-Personal's SAE handshake replaces WPA2's PSK 4-way handshake, adding forward secrecy and dictionary-attack resistance. WEP (A) is long broken; passphrases are still required (C); band operation (D) is unrelated.