cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6954
Views
0
Helpful
4
Replies

log commands executed in cisco switch

hamidul.islam
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

4 Replies 4

Antonio Knox
Level 7
Level 7

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.

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.

No, unfortunately, you won't be able to log previous sessions.

Please rate helpful posts.

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.

Review Cisco Networking for a $25 gift card