04-25-2011 06:54 AM - edited 03-06-2019 04:46 PM
Hi
I am using cisco 3750 switches. I want to know if there are options to record or log all the commands that will be executed at the switch.
Thanks
Hamid
Solved! Go to Solution.
04-25-2011 07:43 AM
If you want to store the commands that you run for viewing later, you will need to run AAA Accounting to a TACACS server. Here is what you will need for this on the switch side. You will need to stand up a TACACS server if you don't have on already.
!---Define TACACS server where command history will be stored
tacacs-server host xxx.xxx.xxx.xxx
!---Send commands to Server for storing
aaa new-model
aaa accounting exec default start-stop group tacacs+
aaa accounting commands 15 default start-stop group tacacs+
Please rate if helpful.
04-25-2011 07:05 AM
You can do this by setting your history buffer. It is set to record thelast 10 commands by default.
http://www.cisco.com/en/US/docs/ios/12_0/configfun/configuration/guide/fcui.html#wp4051
View command history in exec mode with:
Switch#show history
If in config mode:
Switch(config)#do show history
Please rate helpful posts.
04-25-2011 07:36 AM
Yes it works.
Can i record or view the commands entered in the previous sessions? Or after i login to the switch can I start recording the commands that will be entered and which can be viewed later on.
thanks.
04-25-2011 07:39 AM
No, unfortunately, you won't be able to log previous sessions.
Please rate helpful posts.
04-25-2011 07:43 AM
If you want to store the commands that you run for viewing later, you will need to run AAA Accounting to a TACACS server. Here is what you will need for this on the switch side. You will need to stand up a TACACS server if you don't have on already.
!---Define TACACS server where command history will be stored
tacacs-server host xxx.xxx.xxx.xxx
!---Send commands to Server for storing
aaa new-model
aaa accounting exec default start-stop group tacacs+
aaa accounting commands 15 default start-stop group tacacs+
Please rate if helpful.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide