PORT-SECURITY

PORT-SECURITY

The Port Security feature is used to restrict traffic on a switch interface (also called a "switchport") by identifying and limiting traffic allowed to enter that port based on source Ethernet MAC addresses.

Syntax to configure port security on a switch interface

Syntax:

Port Security:

Switch(config)#interface <type> <No.>

Switch(config-if)#switchport mode access

Switch(config-if)#Switchport port-security maximum <No. of MAC address>

Switch(config-if)#Switchport port-security mac-address <MAC ADDRESS/ sticky>

Switch(config-if)#Switchport port-security violation <shutdown/protect/restrict>

Switch(config-lf)#Switchport port-security


Configuration on Switch :-

Switch#conf t
Switch(config)#interface fastEthernet 0/2
Switch(config-if)#switchport port-security max 1
Switch(config-if)#switchport port-security mac-address 000c.8511.7dd6
Switch(config-if)#switchport port-security violation shutdown 
Switch(config-if)#switchport port-security
Switch(config-if)#exit



OUTPUT:

Switch#show port-security

Secure Port    MaxSecureAddr   CurrentAddr   SecurityViolation   Security Action
                        (Count)        (Count)           (Count) 
---------------------------------------------------------------------------------------------
Fa0/2                   1        1           0              Shutdown 

---------------------------------------------------------------------------------------------

Total Addresses in System (excluding one mac per port) : 0 
Max Addresses limit in System (excluding one mac per port): 1024




No comments:

Post a Comment