22-15
Catalyst 2928 Switch Software Configuration Guide
OL-23389-01
Chapter 22 Configuring Port-Based Traffic Control
Configuring Port Security
Step 8
switchport port-security
[
mac-address
mac-address
[
vlan
{
vlan-id
|
{
access
|
voice
}}]
(Optional) Enter a secure MAC address for the interface. You can use this
command to enter the maximum number of secure MAC addresses. If you
configure fewer secure MAC addresses than the maximum, the remaining
MAC addresses are dynamically learned.
Note
If you enable sticky learning after you enter this command, the secure
addresses that were dynamically learned are converted to sticky
secure MAC addresses and are added to the running configuration.
(Optional)
vlan
—set a per-VLAN maximum value.
Enter one of these options after you enter the
vlan
keyword:
•
vlan-id
—On a trunk port, you can specify the VLAN ID and the MAC
address. If you do not specify a VLAN ID, the native VLAN is used.
•
access
—On an access port, specify the VLAN as an access VLAN.
•
voice
—On an access port, specify the VLAN as a voice VLAN.
Note
The
voice
keyword is available only if a voice VLAN is configured on
a port and if that port is not the access VLAN. If an interface is
configured for voice VLAN, configure a maximum of two secure
MAC addresses.
Step 9
switchport port-security
mac-address sticky
(Optional) Enable sticky learning on the interface.
Step 10
switchport port-security
mac-address sticky
[
mac-address
|
vlan
{
vlan-id
|
{
access
|
voice
}}]
(Optional) Enter a sticky secure MAC address, repeating the command as
many times as necessary. If you configure fewer secure MAC addresses than
the maximum, the remaining MAC addresses are dynamically learned, are
converted to sticky secure MAC addresses, and are added to the running
configuration.
Note
If you do not enable sticky learning before this command is entered,
an error message appears, and you cannot enter a sticky secure MAC
address.
(Optional)
vlan
—set a per-VLAN maximum value.
Enter one of these options after you enter the
vlan
keyword:
•
vlan-id
—On a trunk port, you can specify the VLAN ID and the MAC
address. If you do not specify a VLAN ID, the native VLAN is used.
•
access
—On an access port, specify the VLAN as an access VLAN.
•
voice
—On an access port, specify the VLAN as a voice VLAN.
Note
The
voice
keyword is available only if a voice VLAN is configured on
a port and if that port is not the access VLAN.
Step 11
end
Return to privileged EXEC mode.
Step 12
show port-security
Verify your entries.
Step 13
copy running-config
startup-config
(Optional) Save your entries in the configuration file.
Command
Purpose
Содержание Catalyst 2928
Страница 28: ...Contents xxviii Catalyst 2928 Switch Software Configuration Guide OL 23389 01 ...
Страница 32: ...xxx Catalyst 2928 Switch Software Configuration Guide OL 23389 01 Preface ...
Страница 496: ...26 14 Catalyst 2928 Switch Software Configuration Guide OL 23389 01 Chapter 26 Configuring SPAN Displaying SPAN Status ...
Страница 534: ...29 18 Catalyst 2928 Switch Software Configuration Guide OL 23389 01 Chapter 29 Configuring SNMP Displaying SNMP Status ...
Страница 700: ...Index IN 36 Catalyst 2928 Switch Software Configuration Guide OL 23389 01 ...