Security is a critical aspect of networking to ensure data confidentiality, integrity, and availability.
These are foundational steps to secure networking devices like routers and switches:
Password Protection:
Purpose: Prevent unauthorized access to device configuration.
Implementation:
enable secret cisco123
service password-encryption
Secure Remote Access (SSH):
Why SSH?: Unlike Telnet, SSH encrypts communication, making it secure for remote device management.
Configuration Steps:
Set a domain name:
ip domain-name mydomain.com
Generate RSA keys for encryption:
crypto key generate rsa
Create a username and password:
username admin password cisco123
Enable SSH on the vty lines:
line vty 0 4
login local
transport input ssh
Disabling Unused Ports:
Why Disable Unused Ports? To prevent unauthorized devices from connecting to the network.
Configuration:
Select the range of unused ports:
interface range GigabitEthernet0/1 - 24
Shut them down:
shutdown
Configure Banner Messages:
Warn unauthorized users with a message:
banner motd "Unauthorized access is prohibited"
Check Passwords:
show running-config | include enable secret
Verify SSH Configuration:
show ip ssh
Check Port Status:
show ip interface brief
DDoS (Distributed Denial of Service):
Phishing:
MITM (Man-in-the-Middle):
Firewalls:
What They Do: Block unauthorized traffic based on predefined security rules.
Configuration Example:
access-list 100 permit tcp any any eq 80
access-list 100 deny ip any any
interface GigabitEthernet0/0
ip access-group 100 in
Intrusion Prevention Systems (IPS):
Strong Password Policies:
P@ssw0rd123!.Regular Updates and Patches:
Encryption:
Check Active ACLs:
show access-lists
Monitor for Intrusion Attempts:
show logging
A VPN (Virtual Private Network) creates a secure, encrypted connection (or tunnel) between two networks or between a device and a network over the internet.
IPsec (Internet Protocol Security):
SSL (Secure Sockets Layer):
IPsec VPN Configuration (Basic Site-to-Site Example):
Define interesting traffic (traffic to be encrypted):
access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
Configure IKE Phase 1 parameters:
crypto isakmp policy 1
encryption aes
hash sha256
authentication pre-share
group 2
Configure IPsec parameters:
crypto ipsec transform-set MY_SET esp-aes esp-sha-hmac
Create the VPN tunnel:
crypto map MY_VPN 10 ipsec-isakmp
set peer 203.0.113.2
set transform-set MY_SET
match address 101
Apply the crypto map to an interface:
interface GigabitEthernet0/1
crypto map MY_VPN
Check IPsec Status:
show crypto ipsec sa
Verify Tunnel Establishment:
show crypto isakmp sa
VPNs are categorized based on their use cases and configurations:
Remote Access VPN:
Site-to-Site VPN:
Clientless VPN:
Layer 2 Tunneling Protocol (L2TP):
Let’s expand on configuring Site-to-Site VPNs using IPsec.
Scenario:
203.0.113.1.203.0.113.2.Define the traffic to be encrypted between the two offices:
access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
Define the security parameters for establishing the VPN tunnel:
crypto isakmp policy 1
encryption aes
hash sha256
authentication pre-share
group 2
lifetime 86400
The pre-shared key must match on both ends of the VPN:
crypto isakmp key mysecurekey address 203.0.113.2
Define the encryption and integrity settings for data transfer:
crypto ipsec transform-set MY_TRANSFORM_SET esp-aes esp-sha-hmac
Link the policies to the VPN and apply it to the interface:
Create the crypto map:
crypto map MY_VPN 10 ipsec-isakmp
set peer 203.0.113.2
set transform-set MY_TRANSFORM_SET
match address 101
Apply the crypto map to the outgoing interface:
interface GigabitEthernet0/0
crypto map MY_VPN
A firewall is essential for filtering and monitoring network traffic based on pre-defined rules.
Configuration Example:
Deny all traffic except HTTP and HTTPS:
access-list 100 deny ip any any
access-list 100 permit tcp any any eq 80
access-list 100 permit tcp any any eq 443
interface GigabitEthernet0/0
ip access-group 100 in
IPS actively detects and blocks malicious traffic in real-time.
Configuration Example:
Enable IPS on an interface:
ip ips config location flash:/ips
ip ips name MY_IPS
interface GigabitEthernet0/0
ip ips MY_IPS in
Segmentation:
Use VLANs to isolate sensitive traffic (e.g., HR, Finance).
Example:
vlan 10
name HR
vlan 20
name Finance
DMZ (Demilitarized Zone):
Verify VPN Status:
Check IPsec SAs (Security Associations):
show crypto ipsec sa
Verify Firewall Rules:
show access-lists
Check IPS Logs:
show logging
| Feature | Purpose | Key Concepts | Configuration Example |
|---|---|---|---|
| Device Security | Protects network devices from unauthorized access. | Passwords, SSH, disable unused ports. | plaintext<br>enable secret cisco123<br>crypto key generate rsa<br>ip access-group 10 in |
| Common Attacks & Mitigation | Protects against DDoS, phishing, MITM attacks. | Firewalls, IPS, encryption, strong passwords. | plaintext<br>access-list 100 deny ip any any<br>access-list 100 permit tcp any eq 80 |
| VPNs | Securely connects remote users/sites to a network. | IPsec (Site-to-Site), SSL (Remote Access). | plaintext<br>crypto isakmp policy 1<br>crypto ipsec transform-set MY_SET esp-aes esp-sha-hmac |
Brute force attacks involve repeated login attempts with different passwords. Cisco IOS offers a simple way to mitigate this with the login block-for command.
login block-for 60 attempts 3 within 30
If 3 failed login attempts occur within 30 seconds, the device blocks further login attempts for 60 seconds.
This discourages automated password guessing.
Protects console or vty lines (Telnet/SSH) from unauthorized access attempts.
Cisco’s command:
service password-encryption
encrypts plain text passwords using Type 7 encryption, which is reversible and insecure.
Type 7 is not secure and can be decrypted easily.
It is not suitable for production environments.
Instead, use:
enable secret <password>
which uses MD5 hashing (Type 5) — a much stronger method.
| Feature | IDS (Intrusion Detection System) | IPS (Intrusion Prevention System) |
|---|---|---|
| Mode | Passive | Inline (Active) |
| Function | Detects and alerts | Detects and blocks |
| Action | Logs or generates alarms | Drops malicious traffic |
| Deployment | Monitors a copy of traffic | Directly in traffic path |
| Impact on traffic | None | Can affect latency if misconfigured |
IDS: “I detect and notify.”
IPS: “I detect and act.”
Cisco IPS Example:
ip ips name MY_IPS
ip ips config location flash:/ips
interface GigabitEthernet0/0
ip ips MY_IPS in
While IPsec provides secure encrypted tunnels, it cannot natively support multicast or non-IP traffic.
Encapsulates multiple protocols (e.g., OSPF, multicast)
Does not provide encryption
Combines GRE tunneling with IPsec encryption
Widely used in site-to-site VPNs that require routing protocol support
Basic Configuration Flow:
interface Tunnel0
ip address 10.1.1.1 255.255.255.0
tunnel source GigabitEthernet0/0
tunnel destination 203.0.113.2
ZBF is a stateful firewall model that segments the router into security zones and applies policies between zones.
Traffic within a zone is allowed by default.
Between zones, traffic is denied unless explicitly allowed by a policy.
Supports inspection, state tracking, and application awareness.
zone security INSIDE
zone security OUTSIDE
interface GigabitEthernet0/0
zone-member security INSIDE
interface GigabitEthernet0/1
zone-member security OUTSIDE
class-map type inspect match-any WEB_TRAFFIC
match protocol http
match protocol https
policy-map type inspect WEB_POLICY
class WEB_TRAFFIC
inspect
zone-pair security INSIDE-TO-OUTSIDE source INSIDE destination OUTSIDE
service-policy type inspect WEB_POLICY
| Feature | ZBF | Traditional ACLs |
|---|---|---|
| Stateful inspection | Yes | No |
| Granularity | Application-level protocols | IP/Port based only |
| Policy reusability | Modular class/policy-map | Line-by-line per interface |
| Topic | Key Concepts Added |
|---|---|
| Brute Force Protection | login block-for command |
| Password Security | Type 7 warning, recommend enable secret |
| IDS vs IPS | Detailed comparison + examples |
| GRE over IPsec | Tunneling + encryption combo use case |
| Zone-Based Firewall (ZBF) | Stateful firewall with zones and inspection logic |
Where should a standard ACL be placed relative to the destination network?
As close to the destination as possible.
Standard ACLs filter traffic based only on the source IP address. Because they do not evaluate the destination address or application type, placing them near the source could unintentionally block legitimate traffic destined for other networks. By placing the ACL closer to the destination network, administrators minimize the risk of denying traffic that should be permitted elsewhere in the network. This placement strategy ensures that only the traffic specifically intended for the protected network is filtered.
Demand Score: 89
Exam Relevance Score: 93
Which type of ACL filters traffic based on source address, destination address, and protocol information?
Extended ACL.
Extended ACLs provide more granular control compared to standard ACLs. They can evaluate multiple packet fields including source IP address, destination IP address, protocol type, and port numbers. This capability allows administrators to permit or deny specific application traffic between particular hosts or networks. Because extended ACLs can precisely define traffic flows, they are typically placed closer to the source of the traffic to prevent unnecessary packets from traversing the network.
Demand Score: 82
Exam Relevance Score: 92
Which switch security feature limits the number of MAC addresses that can be learned on a port?
Port security.
Port security is a Layer 2 security mechanism that restricts which devices can connect to a switch port. Administrators configure a maximum number of MAC addresses that the port can learn. If additional devices attempt to connect beyond this limit, the switch triggers a violation action. Common actions include protecting the port by dropping frames, restricting traffic from unknown devices, or shutting down the port entirely. This feature helps prevent unauthorized devices from accessing the network.
Demand Score: 81
Exam Relevance Score: 90
What are the three primary components of the AAA security framework?
Authentication, Authorization, and Accounting.
AAA is a security framework used to control and monitor access to network devices and services. Authentication verifies the identity of a user or device attempting to access the network. Authorization determines the level of access or privileges granted after authentication succeeds. Accounting records the actions performed by authenticated users, such as commands executed or session duration. Together, these components provide centralized security control and auditing capabilities in enterprise networks.
Demand Score: 74
Exam Relevance Score: 88