I'm searching for a way to log every command executed on a cisco switch/router, I have a catalyst 2960s with lanbase image, and a catalyst 4500e with ipbase image.

I've found a way to log commands executed in config mode with the following configuration

    log config
     logging enable 100
     notify syslog

but I want to log every command including show version for example. Any ideas ?


I'm not sure there is a way to log the "show" commands themselves into an archive.

You can achieve beyond logging config mode changes using Accounting TACACS+ features (an example with the ASA firewall is shown below, but same concept applies to switches/routers):


To send accounting messages to the TACACS+ accounting server when you enter any command other than show commands at the CLI, use the aaa accounting command command in global configuration mode.

However, it looks like this CCIE has a workaround if you don't use TACACS+ : http://blog.ipspace.net/2006/11/cli-command-logging-without-tacacs.html -- but the caveat is that you would end up with an "echo" if you leave console logging enabled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.