cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1011
Views
2
Helpful
2
Replies

DNAC to search for config

BlueyVIII
Level 1
Level 1

Hi,

Is it possible to use DNAC (non SDA environment) to report on switches which have a particular config setting.

I'm looking to identify any switches in DNAC which have a legacy NTP server set. As DNAC holds all the current configs for my devices I'm hoping there a way to search and report on the existence of a particular IP Address in the running config arhives, without the need to select and search every switch?

2 Replies 2

Tomas de Leon
Cisco Employee
Cisco Employee

You can use the Command Runner Tool to accomplish this task:

------------------------------------------------------------------------------------------

CommandRunner-example_01.png

 

------------------------------------------------------------------------------------------

 

CommandRunner-example_02.png

 

------------------------------------------------------------------------------------------

 

CommandRunner-example_03.png

This is helpful, but unfortunately DNAC/Catalyst Center only allows command runner for up to 20 devices at a time.  It would be more useful to be able to download all running-config to several text files then grep against them for the config needed.

I've done this by painstakingly downloading each running config from the configuration viewer, then once all config files were in a single folder, I run this command from a terminal prompt within the folder path:
egrep "^interface Vlan" -A 4 *.txt | grep-v 'mac' | grep -v 'helper'  > ./interfaceVLAN.txt

this grep command will look for any matches starting with "interface Vlan" then grab the next four lines of text (-A 4).  from any .txt file (*.txt) within the folder. I then added a few more arguments to filter out stuff I don't care about (any lines containing 'mac' or 'helper'). Finally, it saves the output of the command into a file call interfaceVLAN.txt

Next I'll open that file and command+F to find whatever I'm looking for.  This works for any config you want to compile.

There is probably a way to tap into the DNAC API to pull configs in a single batch, but I haven't figured out how to do that yet.

Review Cisco Networking for a $25 gift card