Configuration procedure

To configure a secure MAC address:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. (Optional.) Set the secure MAC aging timer.

port-security timer autolearn aging time-value

By default, secure MAC addresses do not age out.

3. Configure a secure MAC address.

  • In system view:port-security mac-address security [ sticky ] mac-address interface interface-type interface-number vlan vlan-id

  • In interface view:

    1. interface interface-type interface-number

    2. port-security mac-address security [ sticky ] mac-address vlan vlan-id

    3. quit

By default, no manually configured secure MAC addresses exist.

In a VLAN, a MAC address cannot be specified as both a static secure MAC address and a sticky MAC address.

4. Enter interface view.

interface interface-type interface-number

N/A

5. (Optional.) Enable inactivity aging.

port-security mac-address aging-type inactivity

By default, the inactivity aging feature is disabled.

6. (Optional.) Enable the dynamic secure MAC feature.

port-security mac-address dynamic

By default, the dynamic secure MAC feature is disabled. Sticky MAC addresses can be saved to the configuration file. Once saved, they can survive a device reboot.