Switchport security CCNA lab
In this CCNA lab, you have to configure switchport security on the hardware.
To enable security on the interface FastEthernet 0/2, configure the port to work in access mode.
Set the maximum number of MAC addresses allowed to connect to this switchport to 1.
If a violation occurs, meaning what will happen if any other MAC address tries to connect to this interface?
The violation mode is set to shutdown, which means the interface will disable itself due to the violation occurring or any other device trying to connect to the interface.
After the configuration, you can simulate the attack, and you will see how the link is shut down and goes into an err-disabled state.
switchport mode access
switchport port-security
switchport port-security
maximum 1
switchport port-security
violation shutdown
a port to max 1 MAC.
violation shutdown
β port goes err-disabled
if a 2nd device connects.
Use sh port-sec int fa0/2
to verify the config.
In a production network, security is required at every level.
On Layer 2 of the network model, we can harden the security on our Cisco switches and prevent various types of cyberattacks on our network.
Switches allow administrators to secure all the ports on the device, as unsecured ports can jeopardize the entire network.
It is a good practice to enable specified devices to be connected to the switchports; otherwise, any device can connect to the switch and become a part of the network.
Configuring switchport security eliminates lots of issues that can occur due to insecure ports.