MAC Locking Configuration Example

The following command line enables MAC locking both globally for the device and at the port level for ports ge.1.1 through 5:

System(rw)->set maclock enable ge.1.1-5
System(rw)->

The following command lines enable port ge.1.1 for a maximum of 3 static MAC address entries. This is followed by four static MAC address creation entries. The fourth entry fails because the maximum allowed has been set to 3:

System(rw)->set maclock static ge.1.1 3
System(rw)->set maclock 00-10-a4-e5-08-4e ge.1.1 create
System(rw)->set maclock 08-00-20-7c-e0-db ge.1.1 create
System(rw)->set maclock 00-60-08-14-4b-15 ge.1.1 create
System(rw)->set maclock 00-01-f4-2c-ad-b4 ge.1.1 create
Set failed for ge.1.1.
System(rw)->show maclock stations static
Port Number   MAC Address         Status          State           Aging
-----------   -----------------   -------------   -------------   -----
ge.1.1        00-10-a4-e5-08-4e   active          static          false
ge.1.1        00-60-08-14-4b-15   active          static          false
ge.1.1        08-00-20-7c-e0-db   active          static          false
System(rw)->

The following command lines configure ports ge.1.2 through 5 for dynamic MAC locking with a maximum of 15 users on each port. This line is followed by a line enabling MAC locking trap messaging on ports ge.1.1 through 5:

System(rw)->set maclock firstarrival ge.1.2-5 15
System(rw)->set maclock trap ge.1.1-5 enable
System(rw)->