Skip to content

AAA Configuration

[Command] show aaa

[Purpose] View the authentication, authorization and billing settings configured in the network node

[View] System view

[Use Cases]

sonic# show aaa
AAA accounting debug False
AAA accounting command local (default)
AAA authentication debug False
AAA authentication login tacacs+,local
AAA authentication failthrough True
AAA authentication fallback True
AAA authorization debug False
AAA authorization auth_cmd False
AAA authorization command tacacs+,local
AAA authorization auth_service True

aaa accounting command {tacacs+|radius|local|default}

Section titled “aaa accounting command {tacacs+|radius|local|default}”

[Command] aaa accounting command {tacacs+|radius|local|default}

[Purpose] Configure AAA Audit Method

[Parameter]

ParameterDescription
tacacs+Command Auditing Using TACACS+
radiusCommand Auditing Using RADIUS
localLocal Audit
defaultReset to default values, local auditing

[View] System configuration view

[Notes] After enabling TACACS+ or RADIUS auditing, commands executed by users at the command line will be logged on the TACACS+ server or RADIUS server.

hint{type=“warning”} [Important Notes] TACACS+,RADIUS, and local are optional parameters that can be configured individually or in combination, but TACACS+ and RADIUS cannot be configured simultaneously.

[Use Cases]

sonic(config)# aaa authentication login tacacs+ local
sonic(config)# aaa authentication login radius local

[Command] aaa authentication debug enable

[Purpose] Enable user authentication debug information

[View] System configuration view

[Notes] After enabling user authentication debug information, the user’s permission details will be printed in the device’s /var/log/syslog log upon successful authentication and login.

[Use Cases]

sonic(config)# aaa authorization debug enable

aaa authorization command {tacacs+|radius|local|default}

Section titled “aaa authorization command {tacacs+|radius|local|default}”

[Command] aaa authentication command {tacacs+|radius|local|default}

[Purpose] Configure AAA Command-Line Authentication Method

[Parameter]

ParameterDescription
tacacs+Using tacacs + for command authentication
radiusAuthentication via RADIUS server
localCommand Local Authentication
defaultReset back to default values, local forensics

[View] System configuration view

[Notes] TACACS+, RADIUS, and Local are optional parameters that can be configured individually or in combination, but TACACS+ and RADIUS cannot be configured simultaneously.

After enabling TACACS+ or RADIUS authentication, the system will authenticate based on the user level configured for that user in TACACS or RADIUS. The system currently supports four distinct permission types:

  • 0: Non-login user
  • 1: Read-only user, only supports viewing with show commands
  • 2-14: Regular user, possesses execution permissions for all commands except system commands (reboot/image-update/delete startup-config/)
  • 15: System user, capable of executing all commands including system commands

[Use Cases]

sonic(config)# aaa authentication command tacacs+,local

aaa authorization mode {service|cmd} enable

Section titled “aaa authorization mode {service|cmd} enable”

[Command] aaa authorization mode {service|cmd} enable no aaa authorization mode {service|cmd} enable

[Purpose] Configure the AAA command authentication method

[Parameter]

ParameterDescription
serviceGrant permissions to the command line based on different service functions.
cmdAuthorize the command line based on the regular expression match results of the command line.

[View] System configuration view

[Notes] When users employ TACACS+ or RADIUS authentication and require more granular authentication methods beyond user levels, server/cmd authentication can be configured:

  • server: Authenticates based on the service associated with functional features. For example, a Level 2 user can only access the interface view for related operations but cannot configure other functions.
  • cmd: Classifies based on command-line keywords. For example, authentication succeeds when commands containing show or ping are executed, while other commands fail authentication and are not permitted.

When multiple authentication methods coexist, they are matched sequentially in the order: user level -> service authentication -> command-line authentication. If authentication fails at any higher level, the process immediately terminates. If a user lacks sufficient permissions, authentication at lower levels is not attempted.

[Important Notes]

For the mapping between functional features and services, please consult technical support personnel.

It is not recommended to enable both service-level authentication and command-line authentication simultaneously.

During cmd authentication, regardless of whether the device is configured with service authentication, the authentication sequence on the server side remains: user level > service authentication > command-line authentication.

[Use Cases]

sonic(config)# aaa authorization mode service enable