2-531
Catalyst 6500 Series Switch Command Reference—Release8.4
OL-6244-01
Chapter2 Catalyst 6500 Series Switch and ROM Monitor Commands set port security
This example shows how to set the aging type on a port to inactivity aging:
Console> (enable) set port security 5/1 timer-type inactivity
Port 5/1 security timer type inactive.
Console> (enable)
This example shows how to enable the automatic configuration feature:
Console> (enable) set port security auto-configure enable
Automatic configuration of secure learnt addresses enabled.
Console> (enable)
This example shows how to associate a MAC address with a list of VLANs:
Console> (enable) set port security 3/37 00-00-aa-00-00-aa 20,30
Mac address 00-00-aa-00-00-aa set for port 3/37 on vlan 20.
Mac address 00-00-aa-00-00-aa set for port 3/37 on vlan 30.
Console> (enable)
This example shows what happens if you configure a secure MAC address without sp ec ifyin g t h e
vlan_list argument. Note that the MAC address is automatically configured on the native VLAN:
Console> (enable) set port security 3/38 00-00-aa-00-00-aa
Mac address 00-00-aa-00-00-aa set for port 3/38 on vlan 1
Console> (enable)
If a specified VLAN is not the native VLAN of the port (in the case of an access port) or if it is not an
allowed VLAN on a trunk port, the command results in these messages:
Console> (enable) set port security 3/38 00-00-aa-00-00-aa 20
Vlan 20 is not the native vlan for access port 3/38.
Console> (enable)
Console> (enable) set port security 3/37 00-00-aa-00-00-aa 20,30,100
Vlan 100 is not a configured vlan on trunk/vvid port 3/37
Console> (enable)
Related Commands clear port security
show config
show port security