Adding secure MAC addresses

  1. Enter system view.

    system-view

  2. Set the secure MAC aging timer.

    port-security timer autolearn aging [ second ] time-value

    By default, secure MAC addresses do not age out.

  3. Configure a secure MAC address.

    • Configure a secure MAC address in system view.

      port-security mac-address security [ sticky ] mac-address interface interface-type interface-number vlan vlan-id

    • Execute the following commands in sequence to configure a secure MAC address in interface view:

      interface interface-type interface-number

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

    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.