02-11-2010 08:52 AM
I am working on enabling dot1x on switch ports and disabling inactive switch ports on over 350 Switches.
Senior Manager wants a weekly report that shows them statistics by port on were we are at with this project.
I am pretty sure that Cisco Works will not work for this, but I would like to double check.
I am thinking that we can have the program scan thru all the *.cfg files in a directory
IF Device = switch
Increment counter "Total Switches"
IF Interface (except Vlan) = Switch mode access
Increment counter "Total Access Ports"
IF (dot1x port-control and shutdown) increment counter "Dot1x Disabled Port"
Else
IF (dot1x port-control and NOT shutdown) increment counter "Dot1x Enabled Port"
Else
IF (switchport port-security and shutdown) increment counter "Port Security Disabled Port"
Else
IF (switchport port-security and NOT shutdown) increment counter "Port Security Enabled Port"
ELse
Exception Display value of Hostname and Interface (none of the above 4 conditions existed, error)
Else (except Vlan)
Increment counter "Total Trunk Ports"
If (switchport mode trunk and shutdown) increment counter "Disabled Trunk Port"
Else
If (switchport mode trunk and NOT shutdown) increment counter "Enabled Trunk Port"
EndIF
Exception Display value of Hostname and Interface (none of the above 2 conditions existed, error)
Any suggestions?
Solved! Go to Solution.
02-11-2010 09:02 AM
CiscoWorks will not do this for you, no. You could use the baseline compliance feature to see which ports match certain config patterns, but it would not give you a count like you want.
If you wanted to build your own script to comb through the configs, you could do this using the files in the shadow directory. Under NMSROOT/files/rme/dcma/shadow/Switches_and_Hubs/PRIMARY you will find configs for each switch. You could parse them, and build the desired counters.
02-11-2010 09:02 AM
CiscoWorks will not do this for you, no. You could use the baseline compliance feature to see which ports match certain config patterns, but it would not give you a count like you want.
If you wanted to build your own script to comb through the configs, you could do this using the files in the shadow directory. Under NMSROOT/files/rme/dcma/shadow/Switches_and_Hubs/PRIMARY you will find configs for each switch. You could parse them, and build the desired counters.
02-12-2010 07:49 AM
Thanks Joe for the confirming.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: