The set interface gigabit-ethernet port-security mac-address vlan command configures a static secure MAC address.
The delete interface gigabit-ethernet port-security mac-address vlan command removes a static secure MAC address. No clear command can be used to remove a static secure MAC address.
set interface gigabit-ethernet <interface-name>port-security mac-address <mac-addr> vlan<vlan-id>
Specifies the physical interface name. For example, te-1/1/49, ge-1/1/1.
Specifies a static secure MAC address. The value is in the format H:H:H:H:H:H. An H contains 2 hexadecimal numbers.
Note that, the MAC address cannot be configured to a multicast MAC or the system MAC.
Specifies a VLAN. The value is an integer that ranges from 1 to 4094.
After port security is enabled, the dynamic MAC addresses learned on the secure interface will be changed to dynamic secure MAC addresses. When the secure interface goes down and up, or device reboots or restarts, dynamic secure MAC addresses are lost and need to be re-learned.
Dynamic secure MAC addresses will be aged out by the MAC aging time.
However, static secure MAC table entries are not lost in the case of interface state changing to down or the switch restarted or rebooted. The command set interface gigabit-ethernet <port-name> port-security mac-address <mac-addr> vlan <vlan-id> can be used to configure the
static secure MAC address.
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 port-security mac-address 22:00:00:00:00:00 vlan 1 admin@XorPlus# commit