Accounting

This scenario shows how to set up per-command accounting.

Tacacs Method

Description

A TACACS+ server is added to a TACACS+ group, which is added to an AAA list. This list is assigned to CLI’s command accounting. Whenever a command is executed, accounting packets are sent to the TACACS+ server.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 10.215.168.64/24
set system aaa group tacacs tacgroup1 server serv1
set system aaa list list1 method 1 group tacacs tacgroup1
set system aaa server tacacs serv1 address 10.215.168.1
set system aaa server tacacs serv1 encrypted-key U2FsdGVkX1+SthHOaXm7mGSi7Zsk179XPPQxvO+pPEw=
set system cli aaa accounting list1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data.
64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.084 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.084/0.084/0.084/0.000 ms

Step 3: Run command show running at DUT0 and expect this output:

Show output
# Teldat OSDx VM version v4.1.1.0
# Wed 03 Jul 2024 14:46:43 UTC +00:00
# Warning: Configuration has not been saved
set interfaces ethernet eth0 address 10.215.168.64/24
set system aaa group tacacs tacgroup1 server serv1
set system aaa list list1 method 1 group tacacs tacgroup1
set system aaa server tacacs serv1 address 10.215.168.1
set system aaa server tacacs serv1 encrypted-key U2FsdGVkX1+SthHOaXm7mGSi7Zsk179XPPQxvO+pPEw=
set system cli aaa accounting list1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'