Switch port security configuration in cisco packet tracer

PRACTICAL NETWORK SECURITY CONCEPTS (PART-1) : SWITCHPORT SECURITY.

oluyede Segun (jr)
4 min readSep 6, 2021

--

INTRODUCTION

In a real-life setting, when a network connection is established , we need to be mindful of what plugs into the network, In some organizations , when people have access to switches they can try to plug into it, this can disrupt network connections and bandwidth usage, therefore it becomes very important to apply a form of security to the switch port interfaces to limit the number of devices that can plug into this switch, the following switch port security concepts can be applied.

  1. What is Switch port security?

Switch port provides the ability to limit what addresses will be allowed to send traffic on individual switch ports within the network. Switch port security limits the number of valid MAC addresses allowed on a port. When a MAC address, or a group of MAC addresses are configured to enable switch port security, the switch will forward packets only to the devices using those MAC addresses. Any packet coming from other device is discarded by the switch as soon as it arrives on the switch port.

2. What are the types of switch port security violations?

(i) Protect: when the maximum number of secure MAC addresses has been reached, packets from devices with unknown source addresses are dropped,In this mode, you are not notified when a security violation occurs.

(ii) Restrict: is identical with protect mode, but notifies you when a security violation occurs. Specifically, a SNMP trap is sent, a syslog message is logged and the violation counter increments.

(iii) Shutdown: this is the default behavior on a switch. In this mode, the switch ports shuts down when the violation occurs. Also, a SNMP trap is sent and the message is logged. You can enable the port again with the no shutdown interface configuration command.

3. Why do we need Switch port security?

The main reason is to prevent unauthorized user access to network via switches.

4. What Vendor switch devices support Switch port security?

Some network device vendors that support switch port security are: Cisco, Juniper, Forti-switch port e.t.c.

5 How do you configure switch port security on a cisco switch?

5.1 Notes about switch port security configuration

(i) We first need to make sure that the switch port interface is set to access , or trunk, because switch port security cannot be configured on a dynamic auto interface mode.

(ii) The default configuration of a Cisco switch has port security disabled. If you enable switch port security, the default behavior is to allow only 1 MAC address, shutdown the port in case of security violation and lastly sticky address learning is disabled by default.

5.2 Switch port security configuration in cisco packet tracer

NETWORK CONNECTION
Switch port security configuration on interface fast Ethernet 0/1 with shutdown violation
Switch port security configuration on interface fast Ethernet 0/2 with protect violation
No violation counts when checking for port security

5.3 Test Switch port by introducing a new laptop3 to port interface Fa0/1

Introducing a new laptop 3 causes port to shut down
Check counter for violation
port status is down
turn port interface back up
port now works with new laptop3

CONCLUSION

This write up explained the need for switch port security in a network setting.

WRITER: OLUYEDE SEGUN . A(jr)

Resources used (References) and further reading:

https://www.sysnettechsolutions.com/en/configure-port-security-in-cisco-packet-tracer/

linkedin profile: https://www.linkedin.com/in/oluyede-segun-adedeji-jr-a5550b167/

Link to download packet tracer file: https://projectsss.s3.us-east-2.amazonaws.com/switch_port_security.pkt

twitter profile: https://twitter.com/oluyedejun1

TAGS: #NETWORKSECURITY #SWITCHPORTSECURITY #CISCO #SWITCH #ROUTER #PACKETTRACER

--

--

oluyede Segun (jr)

Certified I.T specialist | Computer Network Admin | Cloud | Artificial intelligence ( Machine Learning & Data Science),& webdev. python/JavaScript language