Script to automate Cisco device configuration?


Recommended Posts

I am looking for a script of some kind which lets you automate cisco switch/router configuration without having knowledge with the IOS CLI. possibly perl/expect script, where the user enters things such as management IP, vlan details, username and passwords, which port is assigned to a vlan etc. They can then run the script which will generate the output and write it to the switch. Or even just generate a config so the user can copy it to the switch.
 
I know this is possible but I don't have the knowledge of scripting/programming but I am willing to learn. All help/inputs are very appreciated.
Link to comment
Share on other sites

You should be able able to backup config and restore the config, except would need to change IP separately.

Also, there is Cisco Network Assistant which is free and provides a GUI.

Not the answer you wanted, but hopefully someone else can help.

Link to comment
Share on other sites

The network Assistant can be very helpful for non techie to make simple changes like assign port to vlan and such.

http://www.cisco.com/c/en/us/products/cloud-systems-management/network-assistant/index.html

What switches are you dealing with exactly, it is possible to enable the http/https server of the switch as well (depending on what it is exactl)

The small business line like the sg300 have a pretty nice gui.

Keep in mind if you wanted something that generates configs for you, you have to be careful on the exact versions of the IOS, and the switch models - while many commands are same across models, their can be some real syntax differences and changes. For example the nexus line is way different than say older 6500 series.

Are you wanting this for specific switch and ios version?

Link to comment
Share on other sites

You can generate a backup of a switch and modify that backup as needed so that they can import. 

 

You could create a script or even a db that would give you the output that you want (access could do this quite easily)...fill in fields run report that would put those fields in predefined areas of the script, if field does not exist do not put field in report...then they can copy/paste report.

Link to comment
Share on other sites

I will take a look at network assistant though it is not what I am looking for.

It is all kind of access and distribution switches i.e 2900, 3500 and 3700 series. Most of the time it is about some switches at once (max 15 a week) and sometimes 150 switches within 45 days (this happens rarely, in the summer we're going to change more than 400 switches so a script would be great). Nexus and 6500 series are not often changed so I will not even think about them for now.

 

Today we have templates that we use for these switches, of course we change mgmt IP, hostname, etc and deploy it manually. 

It would be much easier to create a scrip on a Linux server and connect like 16 switches at once providing mgmt IP, hostname, switch model, etc via the script. 

 

Once I consulted for a company (for 2 weeks) and they had this kind of setup and the script even upgraded the switch, that is pretty cool imho. Back then I was not interested in these stuff and didn't care much about it. :(

sc302, can you give some examples?

Link to comment
Share on other sites

Unfortunately no, not without creating the database myself and creating the custom reports. 

 

It can be done, but it will take some time to get it right mapping the fields and creating the front end for the end users.  Not something that I can put together in a few hours...maybe a few days or a week (not versed well enough to be able to do this in a few hours or a day).

 

maybe look into this to see if it would do what you want

http://www.kiwisyslog.com/products/kiwi-cattools/product-overview.aspx

 

You will be able to globally manage the switches if you have access to it where you are at.

Link to comment
Share on other sites

This is not what I am looking for unfortunately :(

Any other suggestions? Some Linux gurus?

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.