aaa accounting

Enables accounting for command or login information; information is forwarded to the accounting server.

Syntax

aaa accounting { commands | exec } default start-stop [ none | radius | tacacs+ ]
no aaa accounting { commands | exec } default start-stop [ none | radius | tacacs+ ]

Command Default

Accounting is disabled.

Parameters

commands
Causes command accounting.
exec
Causes login accounting.
default
Causes the sending of logged information to the default server.
start-stop
Causes the sending of a "start" accounting notice at the beginning of a process and a "stop" accounting notice at the end of a process. The "start" accounting record is sent in the background. The requested user process begins regardless of whether the "start" accounting notice was received by the accounting server.
none
Disables accounting services.
radius
Specifies using the RADIUS server for accounting.
tacacs+
Specifies using the TACACS+ server for accounting.

Modes

Global configuration mode

Usage Guidelines

Before enabling login (EXEC) or command accounting for RADIUS, at least one RADIUS server must be configured on the device.

In RADIUS command accounting:
  • All command accounting packets are sent to the initial RADIUS server configured (rather than any RADIUS server used for authentication). When the initial server fails, packets are sent to the next configured server in round-robin fashion.
  • Commands with a partial timestamp are not accounted.
The following configuration commands are not accounted:
  • abort
  • end
  • exit
  • help
  • no vlan
  • service
  • top
The following operational commands are not accounted:
  • cipherset
  • copy
  • delete
  • dir
  • dot1x
  • exit
  • help
  • history
  • logout
  • oscmd
  • ping
  • rename
  • reload
  • resequence
  • send
  • show cipherset
  • show cli
  • show file
  • show history
  • show netconf-state
  • show parser dump
  • show startup-config
  • ssh
  • telnet
  • traceroute
  • quit
  • help

The no form of the command disables accounting. You can also disable accounting by using the aaa accounting command specifying the none option.

Examples

The following example configures command accounting, with the CLI information being forwarded to the TACACS+ server.

device(config)# aaa accounting commands default start-stop tacacs+

The following example configures command accounting, with the CLI information being forwarded to the RADIUS server.

device(config)# aaa accounting commands default start-stop radius

The following example disables login accounting by specifying the none option; command accounting (when also configured) remains active.

device(config)# aaa accounting exec default start-stop none 

The following example disables login accounting by using the no aaa accounting command; command accounting (when also configured) remains active.

device(config)# no aaa accounting exec default start-stop