LESSON PURPOSE Develop a practical security foundation for protecting network users, data, and infrastructure. The lesson connects core security concepts and organizational security programs with strong password practices and Cisco device-hardening techniques that reduce the attack surface and protect administrative access. |
Lesson Overview
Network security begins with understanding what must be protected, the threats that can affect it, and the controls used to reduce risk. This lesson introduces common security concepts such as threats, vulnerabilities, exploits, risk, the confidentiality-integrity-availability (CIA) triad, authentication, authorization, accounting, and the role of layered defense.
The lesson also explains how security programs convert these principles into operational practice through policies, standards, awareness, access control, incident response, patching, backups, and monitoring. It then focuses on password policy and Cisco device hardening, including secure management access, local/AAA authentication, encrypted credentials, disabling unnecessary services and interfaces, limiting management access, keeping software current, and verifying the hardened configuration.
Learning Objectives
• Explain fundamental security terms, including asset, threat, vulnerability, exploit, attack surface, risk, mitigation, and defense in depth.
• Describe the CIA triad—confidentiality, integrity, and availability—and relate each objective to practical network-security controls.
• Explain the purpose of a security program and distinguish policies, standards, procedures, awareness, monitoring, incident response, patching, and backup practices.
• Apply password-policy principles such as sufficient length, uniqueness, secure storage, controlled privilege, account lockout/rotation requirements where applicable, and multi-factor authentication when supported.
• Secure Cisco administrative access by preferring SSH/HTTPS over insecure management protocols and by using local authentication or centralized AAA as appropriate.
• Harden Cisco routers and switches by disabling unused interfaces/services, protecting privileged access, restricting management-plane reachability, applying login protection, and maintaining current software/configuration backups.
• Recognize common weak configurations such as Telnet, unnecessary HTTP services, default/shared credentials, unused active ports, excessive privilege, and unrestricted VTY access.
• Verify device-hardening controls with Cisco IOS show commands and troubleshoot access problems without weakening the intended security posture.
|
Learning goal Understand the security principles used to protect network users, infrastructure, management access, and administrative credentials; then apply a practical Cisco device-hardening baseline. |
1. Security Overview
Network security is the practice of protecting systems, data, users, and network services from unauthorized access, misuse, disruption, modification, or destruction. For CCNA, the goal is not to become a security analyst; it is to understand the security principles that affect everyday network design and device operation.
- Protect confidentiality, integrity, and availability of data and services.
- Reduce the attack surface of routers, switches, wireless infrastructure, and management systems.
- Authenticate administrators and control what each user is allowed to do.
- Harden device configuration, remove unnecessary services, and restrict management access.
- Collect logs and maintain accurate time so security events can be investigated.
The CIA security objectives
|
Objective |
Meaning |
Network example |
|
Confidentiality |
Only authorized users can view information. |
SSH instead of Telnet; encryption; access control. |
|
Integrity |
Information is not altered without authorization. |
Configuration control, hashes, signed software images. |
|
Availability |
Systems and services remain usable. |
Redundancy, backups, DoS protection, resilient design. |
Defense in depth
A secure network does not depend on one control. Multiple layers work together: physical security, segmentation, ACLs, secure protocols, AAA, endpoint protection, logging, patching, backups, and user awareness. If one layer fails, another layer still reduces risk.
2. Core Security Concepts
Network security is the practice of protecting devices, users, applications, data, and network services from unauthorized access, misuse, disruption, modification, or destruction.
A secure network is designed to reduce risk, prevent unauthorized activity, detect attacks, limit the impact of a compromise, and recover from security incidents.
|
Term |
Definition |
Example |
|
Asset |
Something valuable that must be protected. |
Router configuration, customer data, credentials. |
|
Threat |
A potential cause of harm. |
Attacker, malware, insider mistake, power loss. |
|
Vulnerability |
A weakness that could be abused. |
Default password, outdated software, open Telnet. |
|
Exploit |
A method or code that takes advantage of a vulnerability. |
Using a known software flaw to gain access. |
|
Attack surface |
All reachable points that could be attacked. |
Open services, exposed interfaces, user accounts. |
|
Risk |
Likelihood and impact of a threat exploiting a vulnerability. |
Internet-exposed device with weak credentials. |
|
Mitigation |
A control that reduces likelihood or impact. |
ACL, patch, MFA, segmentation, secure protocol. |
Security principles
Least privilege: give users and processes only the permissions required.
Need to know: allow access only when the information is required for the job.
Separation of duties: split sensitive activities among multiple people or roles.
Secure by default: begin with the minimum exposed services and explicitly enable what is needed.
Zero trust concept: do not trust a user or device simply because it is inside the network; verify identity and access continuously where the architecture supports it.
|
CCNA memory point A threat is the potential danger, a vulnerability is the weakness, and an exploit is the method used to take advantage of that weakness. |
3. Common Threats and Attack Methods
|
Category |
What happens |
Typical mitigation |
|
Social engineering / phishing |
People are tricked into revealing credentials or executing malicious actions. |
Awareness training, MFA, verification procedures. |
|
Malware / ransomware |
Malicious software steals data, damages systems, or encrypts files. |
Endpoint protection, patches, backups, filtering. |
|
Password attacks |
Guessing, credential stuffing, brute force, stolen passwords. |
Long unique passwords, MFA, rate limiting, AAA. |
|
Reconnaissance |
Scanning and enumeration gather information before an attack. |
Reduce exposed services, ACLs, monitoring. |
|
Spoofing / MITM |
An attacker impersonates a host or intercepts traffic. |
Secure protocols, authentication, segmentation. |
|
DoS / DDoS |
Resources are exhausted so legitimate users lose service. |
Rate controls, upstream protection, resilient design. |
|
Misconfiguration |
Incorrect settings create unintended access or outages. |
Standards, review, automation, backups, validation. |
Why management protocols matter
Telnet, HTTP, SNMPv1/v2c, and other clear-text or weakly protected management methods can expose credentials or device information. Prefer secure alternatives such as SSH, HTTPS, and SNMPv3 where supported.
|
Service |
Common port/protocol |
Security note |
|
SSH |
TCP 22 |
Encrypted remote CLI; preferred over Telnet. |
|
HTTPS |
TCP 443 |
Encrypted web management; enable only when required. |
|
TACACS+ |
TCP 49 |
Centralized AAA; commonly used for network administration. |
|
RADIUS |
UDP 1812/1813 |
Authentication/authorization and accounting; common for network access. |
|
SNMPv3 |
UDP 161/162 |
Supports authentication and encryption. |
|
Syslog |
UDP/TCP 514 commonly |
Central event collection; protect transport when platform supports it. |
|
NTP |
UDP 123 |
Accurate time is essential for log correlation. |
4. Security Program and Operational Controls
A security program is the set of people, policies, processes, and technical controls used to manage risk over time. Network security is strongest when device configuration is supported by an operational program rather than treated as a one-time setup.
Core program elements
Asset inventory: know which devices, software versions, services, and owners exist.
Security policy and standards: define approved protocols, password requirements, remote access, and baseline configurations.
Awareness and training: teach users and administrators how to recognize phishing, social engineering, and unsafe behavior.
Vulnerability and patch management: identify weaknesses and update software in a controlled manner.
Configuration management: use standard templates, backups, peer review, and change control.
Logging and monitoring: centralize device logs, alerts, authentication records, and time synchronization.
Backup and recovery: protect configuration backups and test restoration procedures.
Incident response: define how to identify, contain, eradicate, recover from, and learn from security incidents.
Physical security: restrict access to network rooms, consoles, cables, and removable media.
Policy vs standard vs procedure
|
Document |
Purpose |
Example |
|
Policy |
States management intent and required outcome. |
Privileged network access must be authenticated and logged. |
|
Standard |
Defines mandatory technical requirements. |
SSH v2 only; minimum password length 12; centralized AAA. |
|
Procedure |
Explains the operational steps. |
Steps for creating an admin account or restoring a switch. |
5. AAA - Authentication, Authorization, and Accounting
AAA separates identity verification, permission control, and activity logging. A router or switch can use its local user database or a centralized AAA server. Centralized AAA improves consistency, revocation, and auditability across many devices.
|
AAA function |
Question answered |
Example |
|
Authentication |
Who are you? |
Validate username/password or another credential. |
|
Authorization |
What are you allowed to do? |
Permit an EXEC privilege level or command set. |
|
Accounting |
What did you do? |
Record logins, session duration, or commands. |
TACACS+ and RADIUS at CCNA level
|
Characteristic |
TACACS+ |
RADIUS |
|
Transport |
TCP 49 |
UDP 1812 authentication/authorization; 1813 accounting |
|
Typical use |
Network device administration |
Network access, wireless, VPN; can also support administration |
|
AAA handling |
Separates AAA functions |
Often combines authentication and authorization behavior |
|
Protection |
Encrypts the packet body after the TACACS+ header |
Protects the user password field; not the entire packet |
Design practice: Use centralized AAA when available, but keep a controlled local fallback account so an administrator can still access the device during an AAA-server outage.
6. Password Policy
A password policy should make privileged credentials difficult to guess, difficult to reuse, and difficult to expose. Long unique passwords or passphrases are usually more valuable than short passwords with predictable substitutions.
Recommended policy characteristics
Use a minimum length appropriate to organizational policy; longer passphrases improve resistance to guessing.
Require unique credentials for privileged accounts and avoid password reuse between systems.
Use MFA for administrator access where the platform and management system support it.
Do not send passwords through clear-text protocols.
Store device credentials using secret/hash-capable commands rather than reversible plain-text forms when possible.
Use login rate limiting or temporary lockout to slow brute-force attacks.
Change credentials immediately when compromise is suspected or when privileged access is no longer required.
Protect password-recovery and break-glass procedures; emergency access should be controlled and audited.
Cisco password command concepts
|
Command / feature |
Purpose |
Important note |
|
enable secret |
Protects privileged EXEC access. |
Preferred over legacy enable password. |
|
username <name> secret <secret> |
Creates a local account with a protected secret. |
Use privilege level only when required. |
|
service password-encryption |
Obfuscates certain plain-text passwords in the configuration. |
Type 7 is reversible; it is not strong password hashing. |
|
security passwords min-length <n> |
Enforces a minimum length on supported IOS/IOS XE platforms. |
Exact support varies by release. |
|
login block-for ... attempts ... within ... |
Temporarily blocks repeated failed login attempts. |
Helps slow brute-force attacks. |
7. Device Hardening Fundamentals
Device hardening removes unnecessary exposure and strengthens the services that must remain available. Apply a repeatable baseline to every router and switch, then add exceptions only when the design requires them.
Hardening checklist
- Change default credentials and use protected secrets.
- Use SSH v2 for remote CLI access; disable Telnet.
- Restrict VTY access to trusted management subnets with an ACL.
- Configure AAA or local login with a controlled fallback account.
- Set an EXEC idle timeout so abandoned sessions close automatically.
- Configure login failure logging and brute-force rate limiting.
- Disable unused services such as HTTP server if they are not required.
- Administratively shut down unused switch interfaces and place them in an unused VLAN when appropriate.
- Enable switch port security on user-facing access ports where appropriate to limit learned source MAC addresses.
- Use secure versions of management protocols (HTTPS, SNMPv3) when needed.
- Synchronize time with NTP and send logs to a central syslog system.
- Back up configurations and maintain a known-good recovery copy.
- Keep software current according to change-management and vendor guidance.
8. Cisco Secure Management Baseline
The following is a training example. Exact commands, cryptographic options, and syntax vary by Cisco platform and IOS/IOS XE release.
|
hostname R1 ! ip domain-name corp.example username netadmin privilege 15 secret <STRONG_SECRET> enable secret <ENABLE_SECRET> security passwords min-length 12 service password-encryption ! login block-for 120 attempts 3 within 60 login on-failure log login on-success log ! crypto key generate rsa modulus 2048 ip ssh version 2 ! ip access-list standard MGMT-ONLY permit 192.168.99.0 0.0.0.255 deny any log ! line vty 0 4 login local transport input ssh exec-timeout 5 0 access-class MGMT-ONLY in ! banner motd ^CUnauthorized access is prohibited.^C ! no ip http server |
What each control accomplishes
|
Control |
Effect |
|
SSH v2 + RSA keys |
Encrypts remote CLI traffic. |
|
VTY access-class |
Limits remote management to trusted source addresses. |
|
exec-timeout |
Closes idle administrative sessions. |
|
login block-for |
Temporarily blocks repeated failed login attempts. |
|
login success/failure logging |
Creates an audit trail for authentication events. |
|
no ip http server |
Removes an unnecessary management service when HTTP is not used. |
Verification
|
show ip ssh show users show login show access-lists MGMT-ONLY show running-config | section line vty
show running-config | include username|enable secret|service password |
9. Centralized AAA Configuration Example
A production design commonly sends device-administration authentication to TACACS+ servers and falls back to the local database if the servers cannot be reached. The exact syntax differs among IOS/IOS XE releases; treat this as a conceptual lab example.
|
aaa new-model ! tacacs server AAA1 address ipv4 192.168.99.10 key <SHARED_KEY> ! aaa group server tacacs+ TAC-GRP server name AAA1 ! aaa authentication login default group TAC-GRP local aaa authorization exec default group TAC-GRP local if-authenticated aaa accounting exec default start-stop group TAC-GRP ! line vty 0 4 login authentication default
transport input ssh |
Failure behavior
Normal: the device contacts the TACACS+ server and applies the centralized policy.
AAA server unreachable: the local database can be used when local fallback is configured.
Authentication rejected by a reachable AAA server: fallback normally should not silently override an explicit rejection; investigate policy and credentials.
Verification
|
show aaa servers show tacacs show users
show logging |
10. Logging, Time, and Secure Monitoring
Security events are difficult to investigate when devices disagree about time or logs exist only in local memory. Central logging plus NTP makes events easier to correlate across routers, switches, firewalls, servers, and authentication systems.
|
! Example logging and NTP service timestamps log datetime msec logging host 192.168.99.20 logging trap warnings ntp server 192.168.99.30 prefer ntp server 192.168.99.31 ! ! Example SNMPv3 concept - syntax varies snmp-server group NMS v3 priv
snmp-server user nmsuser NMS v3 auth sha <AUTH_SECRET> priv aes 128 <PRIV_SECRET> |
|
Service |
What to verify |
Useful command |
|
NTP |
Device is synchronized to the intended source. |
show ntp associations; show clock |
|
Syslog |
Remote collector receives messages with usable timestamps. |
show logging |
|
SNMPv3 |
Authentication/privacy are used for monitoring. |
show snmp user; show snmp group |
|
AAA |
Central server status and login records are available. |
show aaa servers / show logging |
11. Management-Plane Topology and Access Control
The management plane is the part of a network device used by administrators, monitoring systems, and management applications to configure, monitor, and troubleshoot the device.
Management access should be separated from normal user traffic whenever possible and restricted to trusted administrators, management networks, and approved protocols.
In this lab design, administrative access originates from the management subnet 192.168.99.0/24. Network devices accept SSH from that subnet, authenticate through AAA when available, and send logs/time traffic to dedicated management services.
Example: management ACL
|
ip access-list standard MGMT-ONLY permit host 192.168.99.50 permit host 192.168.99.51 deny any log ! line vty 0 4 access-class MGMT-ONLY in
transport input ssh |
|
Important A VTY ACL protects the management service by source address. It does not replace authentication, authorization, logging, or segmentation; use the controls together. |
12. Hardening Switch Access Ports and Port Security
Unused and endpoint-facing switch ports are another part of the attack surface. The exact security features used depend on the design, but a basic baseline can reduce accidental or unauthorized connectivity.
|
! Example unused interface baseline interface range GigabitEthernet1/0/20-24 description UNUSED - ADMIN SHUT switchport mode access switchport access vlan 999 shutdown ! ! Example endpoint port baseline interface GigabitEthernet1/0/10 description USER-PC switchport mode access switchport access vlan 10 spanning-tree portfast
spanning-tree bpduguard enable |
Why these controls help
|
Control |
Security effect |
|
shutdown unused ports |
Prevents casual connection to unused interfaces. |
|
unused VLAN |
Separates unused ports from production VLANs. |
|
static access mode |
Avoids unnecessary trunk negotiation on endpoint ports. |
|
PortFast + BPDU Guard |
Provides rapid host access while protecting an edge port from unexpected BPDUs. |
Port Security - Limiting MAC Addresses on Access Ports
Cisco switch port security limits which source MAC addresses are allowed to use a Layer 2 access port. It is commonly applied to endpoint-facing access interfaces to reduce the risk of unauthorized devices being connected and to control how many MAC addresses can be learned on a port.
How port security works
Configure the interface as a static access port and enable switchport port-security.
The switch learns or is configured with one or more secure MAC addresses for the interface.
The maximum secure MAC count controls how many source MAC addresses are permitted. A common Cisco default is one secure MAC address per port.
Traffic sourced from permitted secure MAC addresses is forwarded normally.
If an unauthorized source MAC appears or the configured maximum is exceeded, the configured violation mode determines the response.
Secure MAC learning methods
|
Method |
How it works |
Persistence / use |
|
Static secure MAC |
Administrator manually specifies the allowed MAC address. |
Remains configured until removed; useful for fixed devices. |
|
Dynamic secure MAC |
The switch dynamically learns the source MAC as a secure address. |
Not retained across reloads; the switch must learn the secure MAC again. |
|
Sticky secure MAC |
The switch dynamically learns the MAC and adds a sticky secure-MAC entry to the running configuration. |
Save the configuration when the learned sticky address must persist across reloads. |
Port-security violation modes
|
Mode |
Port stays up? |
Violating traffic |
Operational behavior |
|
shutdown (default) |
No |
Dropped |
Places the interface into an error-disabled state and generates violation notification/logging. |
|
restrict |
Yes |
Dropped |
Drops unauthorized frames, increments the violation counter, and generates notification/logging while valid traffic continues. |
|
protect |
Yes |
Dropped |
Silently drops unauthorized frames while valid secure-MAC traffic continues; no normal violation notification is generated. |
Basic sticky port-security configuration
The following CCNA lab example allows one endpoint on Gi1/0/10. The first learned MAC address becomes sticky, and an additional unauthorized MAC causes the port to shut down.
|
interface GigabitEthernet1/0/10 description USER-PC switchport mode access switchport access vlan 10 switchport port-security switchport port-security maximum 1 switchport port-security mac-address sticky switchport port-security violation shutdown spanning-tree portfast
spanning-tree bpduguard enable |
Example Static secure-MAC
Use a static secure MAC when the allowed endpoint MAC address is already known.
interface GigabitEthernet1/0/11 switchport mode access switchport access vlan 10 switchport port-security switchport port-security maximum 1 switchport port-security mac-address 0011.2233.4455
switchport port-security violation restrict |
Example IP phone plus PC
An access port carrying an IP phone and a downstream PC normally needs more than one secure MAC address. The exact maximum depends on the endpoint design and platform.
interface GigabitEthernet1/0/12 switchport mode access switchport access vlan 10 switchport voice vlan 20 switchport port-security switchport port-security maximum 2 switchport port-security mac-address sticky switchport port-security violation restrict spanning-tree portfast
spanning-tree bpduguard enable |
Verification commands
show port-security show port-security interface GigabitEthernet1/0/10 show port-security address show mac address-table interface GigabitEthernet1/0/10 show interfaces status err-disabled
show logging |
Reading show port-security interface
|
Field |
Meaning |
|
Port Security |
Shows whether port security is enabled on the interface. |
|
Port Status |
Shows Secure-up, Secure-shutdown, or other platform-specific state. |
|
Violation Mode |
Shows shutdown, restrict, or protect. |
|
Maximum MAC Addresses |
Configured secure-MAC limit. |
|
Total MAC Addresses |
Number of secure MAC addresses currently known. |
|
Sticky MAC Addresses |
Number of addresses learned using sticky learning. |
Recovering from a shutdown violation
First remove or correct the cause of the violation. Then restore the interface. A common manual recovery sequence is:
interface GigabitEthernet1/0/10 shutdown no shutdown |
Some Cisco platforms also support automatic err-disable recovery for port-security violations, but use that only when it matches the operational policy.
Port security vs. 802.1X
|
Feature |
Port security |
802.1X |
|
Primary control |
Permitted source MAC addresses and maximum MAC count |
User/device authentication before normal network access |
|
Typical use |
Simple Layer 2 access-port hardening |
Identity-based enterprise network access control |
Port Security Mini Lab
Objective: configure Gi1/0/10 for one sticky secure MAC address, trigger a violation with a second endpoint, verify the result, and recover the port.
Configure Gi1/0/10 as a VLAN 10 access port and enable port security.
Set maximum secure MAC addresses to 1, use sticky learning, and use shutdown violation mode.
Connect PC-A and generate traffic so its MAC address is learned.
Verify the secure MAC with show port-security interface Gi1/0/10 and show port-security address.
Disconnect PC-A and connect PC-B with a different MAC address. Generate traffic and observe the violation/error-disabled state.
Reconnect the authorized endpoint, remove the violation condition, and restore the interface with shutdown followed by no shutdown.
Change the violation mode to restrict and repeat the test to observe the difference.
show port-security interface GigabitEthernet1/0/10 show port-security address show interfaces status err-disabled
show logging |
Quick knowledge check
1. Which three objectives form the CIA triad?
Answer: Confidentiality, Integrity, and Availability.
2. Which AAA function answers “Who are you?”
Answer: Authentication.
3. Why configure an EXEC timeout?
Answer: To close idle administrative sessions.
4. What is the purpose of login block-for?
Answer: Temporarily block login attempts after repeated failures to slow brute-force attacks.
