cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
768
Views
0
Helpful
5
Replies

CISCOWORKS MASS CONFIG

demem-cco
Level 1
Level 1

Hey guys! Need help!

We acquired Ciscoworks LMS 3.1 and I can't seem to find the info I need to use it properly for scripting.

I need to mass configure over 150 2960 switches with a conditional statement, and don't know how or where and in what language to tell Ciscoworks to do that.

Basically I want to script something that would sound like this:

-Check each switch port, one at a time

-If the vlan is X, or Y or Z then

-Write all these interface commands

-Else write all those OTHER interface commands and check the next port!

Anyone can tell me how to do that!?

Thanx,

WANimal

5 Replies 5

Joe Clarke
Cisco Employee
Cisco Employee

This is best done with the baseline compliance feature of RME's Config Archive system. Checkout this whitepaper:

http://www.cisco.com/en/US/prod/collateral/netmgtsw/ps6504/ps6528/ps2073/prod_white_paper0900aecd8068cc98.pdf

Then look at these case studies:

http://www.cisco.com/en/US/prod/collateral/netmgtsw/ps6504/ps6528/ps2425/white_paper_c11-529569.html#wp9000239

I think what you want is covered by scenario 4b.

However, since you have an ELSE, you will need to create two different templates to accomplish what you want due to bug CSCtb42198.

Thank you my friend (jclarke)...

This at least definitely gives me an idea WHERE to look.

WANimal

One problem I encounter in case 4B is that it goes as deep as the interface to check compliance...but I need to go in a VLAN submode to check for compliance, as the compliance must run against the VLAN.

How do I get it down one level to check the VLAN's value??? And can it check with an OR or an AND statement between statements???

As in:

-Check every interface in turn

-Check VLAN value for this interface

-If value is X OR Y or Z

-Then input THESE interface commands

-Else input THOSE interface commands

WANimal

Your template would need a prereq/parent:

Commandlet CheckVlan

IsPrereq: YES

Submode: interface [#.*Ethernet.*#]

Body:

+ switchport access vlan [#(X|Y|Z)#]

Commandlet: DeployCommands

Parent: CheckVlan

Body:

+ command1

+ command2

...

Then, your other template would look like:

Commandlet CheckVlan

IsPrereq: YES

Submode: interface [#.*Ethernet.*#]

Body:

+ switchport access vlan [#!(X|Y|Z)#]

Commandlet: DeployCommands

Parent: CheckVlan

Body:

+ command1

+ command2

...

Thank you SIR! Kindly!

You're a savior!

I should be able to fix the rest from hereon end!!!

WANimal