111
4.10.4 CLI Commands of the Security
Command Lines of the Security configuration
Feature
Command Line
Port Security
Add MAC
Switch(config)# mac-address-table static 0012.7701.0101 vlan 1
interface fa1
mac-address-table unicast static set ok!
Port Security
Switch(config)# interface fa1
Switch(config-if)# switchport port-security
Disables new MAC addresses learning and aging activities!
Note: Rule: Add the static MAC, VLAN and Port binding first,
then enable the port security to stop new MAC learning.
Disable Port Security
Switch(config-if)# no switchport port-security
Enable new MAC addresses learning and aging activities!
Display
Switch# show mac-address-table static
Destination Address Address Type Vlan
Destination Port
------------------- --------------- ------- ------------------------
0012.7701.0101 Static 1 fa1
IP Security
IP Security
Switch(config)# ip security
Set ip security enable ok.
Switch(config)# ip security host 192.168.10.33
Add ip security host 192.168.10.33 ok.
Display
Switch# show ip security
ip security is enabled
ip security host:
192.168.10.33
802.1x
enable
diable
Switch(config)# dot1x system-auth-control
Switch(config)#
Switch(config)# no dot1x system-auth-control
Switch(config)#
authentic-method Switch(config)#
dot1x
authentic-method
local Use the local username database for authentication
radius Use the Remote Authentication Dial-In User
Service (RADIUS) servers for authentication
Switch(config)# dot1x authentic-method radius
Switch(config)#
radius server-ip
Switch(config)# dot1x radius
Switch(config)# dot1x radius server-ip 192.168.10.120 key
1234
RADIUS Server Port number NOT given. (default=1812)
RADIUS Accounting Port number NOT given. (default=1813)
RADIUS Server IP : 192.168.10.120
RADIUS Server Key : 1234
RADIUS Server Port : 1812
RADIUS Accounting Port : 1813