![Cisco 2948G - Catalyst Switch Скачать руководство пользователя страница 312](http://html.mh-extra.com/html/cisco/2948g-catalyst-switch/2948g-catalyst-switch_configuration-manual_67462312.webp)
16-4
Catalyst 4500 Series, Catalyst 2948G, Catalyst 2980G Switches Software Configuration Guide
—
Release 8.1
78-15486-01
Chapter 16 Configuring Port Security
Configuring Port Security on the Switch
This example shows how to verify the port security:
Console> (enable) show port 2/1
Port Name Status Vlan Level Duplex Speed Type
----- ------------------ ---------- ---------- ------ ------ ----- ------------
2/1 connected 522 normal half 100 100BaseTX
Port Security Secure-Src-Addr Last-Src-Addr Shutdown Trap IfIndex
----- -------- ----------------- ----------------- -------- -------- -------
2/1 enabled 00-90-2b-03-34-08 00-90-2b-03-34-08 No disabled 1081
Port Broadcast-Limit Broadcast-Drop
-------- --------------- --------------
2/1 - 0
Port Align-Err FCS-Err Xmit-Err Rcv-Err UnderSize
----- ---------- ---------- ---------- ---------- ---------
2/1 0 0 0 0 0
Port Single-Col Multi-Coll Late-Coll Excess-Col Carri-Sen Runts Giants
----- ---------- ---------- ---------- ---------- --------- --------- ---------
2/1 0 0 0 0 0 0 0
Last-Time-Cleared
--------------------------
Fri Jul 10 1998, 17:53:38
This example shows how to enable port security on a port and manually specify the secure MAC address:
Console> (enable) set port security 2/1 enable 00-90-2b-03-34-08
Port 2/1 port security enabled with 00-90-2b-03-34-08 as the secure mac address
Trunking disabled for Port 2/1 due to Security Mode
Console> (enable)
Setting the Maximum Number of Secure MAC Addresses
You can set the number of MAC addresses to secure on a port. By default, at least one MAC address per
port can be secured. In addition to this default, a global resource of up to 1024 MAC addresses is
available to be shared by the ports. This means that if the entire global resource of 1024 MAC addresses
is used on some ports, you can still enable port security on the rest of the ports with a maximum of one
MAC per port.
If you reduce the maximum number of MAC addresses, the system clears the specified number of MAC
addresses and displays the list of removed addresses.
To set the number of MAC addresses to be secured on a port, perform this task in privileged mode:
This example shows how to set the number of MAC addresses to be secured:
Console> (enable) set port security 4/7 maximum 20
Maximum number of secure addresses set to 20 for port 4/7.
Console> (enable)
Task
Command
Set the number of MAC addresses to be secured
on a port.
set port security mod_num/port_num maximum
num_of_mac