Monday, October 15, 2007

Securing MAC

Cat3750(config-if)#switchport mode access
!--- Sets the interface switchport mode as access.

Cat3750(config-if)#switchport port-security
!--- Enables port security on the interface.

Cat3750(config-if)#switchport port-security mac-address 0011.858D.9AF9
!--- Sets the secure MAC address for the interface.

Cat3750(config-if)#switchport port-security violation shutdown
!--- Sets the violation mode to shutdown. This is the default mode.

Cat3750#show port-security interface fastEthernet 1/0/2
Port Security : Enabled
Port Status : Secure-shutdown
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 : 0011.8565.4B75:1
Security Violation Count : 1