Skip to content

Prevent unauthorized devices from connecting to the network by enforcing MAC address restrictions on switch ports

Notifications You must be signed in to change notification settings

MGNMALIK/switch-port-security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Switch Port Security Simulation

This project simulates real-world network security by implementing switch port security in a small office LAN. The goal is to prevent unauthorized devices from connecting to the network by enforcing MAC address restrictions on switch ports.


Network Topology

  • Switch (2960) as the core network device
  • PC0 and PC1: Authorized workstations connected to F0/1 and F0/2
  • PC2: Unauthorized device (used to simulate intrusion)

Security Configuration Summary

Port Mode Max MACs Violation Action Sticky MACs
F0/1 Access 1 Shutdown Enabled
F0/2 Access 1 Shutdown Enabled

Port Security Commands Used

interface fastethernet0/1
 switchport mode access
 switchport port-security
 switchport port-security maximum 1
 switchport port-security violation shutdown
 switchport port-security mac-address sticky

Testing

  1. PC0 and PC1 were connected and their MAC addresses were locked in via sticky learning.
  2. PC2 was connected to F0/1 (previously used by PC0).
  3. Switch immediately shut down the port due to MAC address violation.
  4. Violation was confirmed using:
    show port-security interface fastethernet0/1
    

Recovery Procedure

To bring a shut-down port back online:

interface fastethernet0/1
 shutdown
 no shutdown

Project Files

Folder/File Description
packet_tracer_file/ .pkt simulation file
configs/ CLI commands and port status
README.md This documentation

Skills Practiced

  • Switch port configuration
  • MAC address control
  • CLI security commands
  • Troubleshooting secure shutdown ports

About

Prevent unauthorized devices from connecting to the network by enforcing MAC address restrictions on switch ports

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published