LEARN HOW TO CONFIGURE PORT BASED SECURITY IN CISCO SWITCHES (CCNA)

In this post i will show you how to add port based security in cisco switches . When you are  Network Engineer or Network Administrator  the main problem you face is how to protect cisco switches . I have shown you how to add console password , auxillary password . But anyone can configure switches if they connect to the port of cisco switches .  If you configure port based security no one else will be able to connect to switch except your pc . 

port based security in cisco switches

SWITCHES CONFIGURATION

Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security mac-address 0006.2AB5.404C

I HAVE BIND SWITCH PORT WITH PC MAC ADDRESS 
Switch(config-if)#switchport port-security violation shutdown
Switch(config-if)#exit
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console

 

Now to check 

Switch#show port-security int fa0/1
Port Security : Enabled
Port Status : Secure-up
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses : 1
Total MAC Addresses : 1
Configured MAC Addresses : 1
Sticky MAC Addresses : 0
Last Source Address:Vlan : 0000.0000.0000:0
Security Violation Count : 0

Switch#show port-security address
Secure Mac Address Table
——————————————————————————-
Vlan Mac Address Type Ports Remaining Age
(mins)
—- ———– —- —– ————-
1 0006.2AB5.404C SecureConfigured FastEthernet0/1 –
——————————————————————————
Total Addresses in System (excluding one mac per port) : 0
Max Addresses limit in System (excluding one mac per port) : 1024
Switch#

You can get mac address by ipconfig /all command 

macaddress in cisco packet tracer

Now only this pc will be able to connect to switch .

Try to connect different pc with that switch port , you won’t be able to connect .

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s