194
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies a port by its type and number.
vlan vlan-id: Specifies a VLAN by its ID in the range of 1 to 4094.
count: Displays only the count of the secure MAC addresses.
Usage guidelines
If you do not specify any parameters, the command displays information about all secure MAC
addresses.
Secure MAC addresses are those that are automatically learned by the port in autoLearn mode or
configured by the port-security mac-address security command.
Examples
# Display information about all secure MAC addresses.
<Sysname> display port-security mac-address security
MAC ADDR VLAN ID STATE PORT INDEX AGING TIME
0002-0002-0002 1 Security GE2/1/1 NOAGED
000d-88f8-0577 1 Security GE2/1/2 28
--- 2 mac address(es) found ---
# Display only the count of the secure MAC addresses.
<Sysname> display port-security mac-address security count
--- 2 mac address(es) found
# Display information about secure MAC addresses in VLAN 1.
<Sysname> display port-security mac-address security vlan 1
MAC ADDR VLAN ID STATE PORT INDEX AGING TIME
0002-0002-0002 1 Security GE2/1/1 NOAGED
000d-88f8-0577 1 Security GE2/1/2 28
--- 2 mac address(es) found ---
# Display information about secure MAC addresses on port GigabitEthernet 2/1/1.
<Sysname> display port-security mac-address security interface gigabitethernet 2/1/1
MAC ADDR VLAN ID STATE PORT INDEX AGING TIME
000d-88f8-0577 1 Security GE2/1/1 NOAGED
--- 1 mac address(es) found ---
# Display information about secure MAC addresses of port GigabitEthernet 2/1/1 in VLAN 1.
<Sysname> display port-security mac-address security interface gigabitethernet 2/1/1 vlan
1
MAC ADDR VLAN ID STATE PORT INDEX AGING TIME
000d-88f8-0577 1 Security GE2/1/1 NOAGED