147
Usage guidelines
When both 802.1X authentication and MAC authentication are enabled on a port, you can delay MAC
authentication so that 802.1X authentication is preferentially triggered. If no 802.1X authentication is
triggered or if 802.1X authentication fails within the delay period, the port continues to process MAC
authentication.
Do not set the port security mode to mac-else-userlogin-secure or mac-else-userlogin-secure-ext when
you want to use MAC authentication delay. The delay does not take effect on a port in either of the two
modes. For more information about port security modes, see "Port security commands."
Examples
# Enable MAC authentication delay on interface GigabitEthernet 2/1/1 and set the delay time to 10
seconds.
<Sysname> system-view
[Sysname] interface gigabitethernet 2/1/1
[Sysname-GigabitEthernet2/1/1] mac-authentication timer auth-delay 10
Related commands
• display mac-authentication
• port-security port-mode
mac-authentication user-name-format
Use mac-authentication user-name-format to configure the type of user accounts for MAC authentication
users.
Use undo mac-authentication user-name-format to restore the default.
Syntax
mac-authentication user-name-format { fixed [ account name ] [ password { cipher | simple } password ]
| mac-address [ { with-hyphen | without-hyphen } [ lowercase | uppercase ] ] }
undo mac-authentication user-name-format
Default
Each user's MAC address is used as the username and password for MAC authentication. A MAC
address is in the hexadecimal notation without hyphens, and letters are in lower case.
Views
System view
Predefined user roles
network-admin
Parameters
fixed: Uses a shared account for all MAC authentication users.
account name: Specifies the username for the shared account. The name takes a case-sensitive string of
1 to 55 characters, excluding the at sign (@). If you do not specify a username, the default name mac
applies.
password: Specifies the password for the shared user account:
cipher: Sets a ciphertext password.