Hello friends! In my today’s post, I will tell you how we can configure switch based port security. This is a very important part of networking as it helps us to secure our PC, otherwise, anyone can get access to a network if he/she could manage to get your port. So without wasting time let’s get started…..
# take a switch and a computer
# connect them using automatically choose connection type wire
Here fa0/1 port is connected to the computer
# now click on computer > desktop
# click on command prompt
# get the mac address of PC by using the command ipconfig /all
# note down the physical address/mac address of the computer
# now click on switch > cli
# write down the following commands
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security mac-address 00D0.BCE9.6835 (mac address of my PC was 00D0.BCE9.6835 )
Switch(config-if)#switchport port-security max 1
Switch(config-if)#switchport port-security violation shutdown
# to check settings you have made go to enable mode and write the command show port-security int fa0/1
Now as we have fixed the mac address of the computer to a port if any other computer is connected to that port it will be disconnected.
So this was how we can configure switch based port security. If you have any doubt, suggestion or advice regarding this post then please mention it in your comments.
you may also like:-