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

Automated Mass Deployment

PLC
Level 1
Level 1

Hi Everyone,

I have a project to upgrade several sites with new cisco 2911 routers and 2960x switches that already have been purchased.  

I have my own scripts (wordpad) for standard configs like aaa, accesslists, local logins, and etc..

is there an easier way to push out scripts ? or any good advise out there on a deployment besides having a standard configs in a word pad and copy and pasting?

Thank you!

PC

5 Replies 5

ajay chauhan
Level 7
Level 7
Python script works you can generate configuration for multiple sites and push that to devices as well.
I worked on 20 K + devices for config /code upgrade. Only condition is whatever you do should be standard across all devices.
Ajay

thanks! I will have to look into python.

I have putty and crt for ssh /telnet 

whats the advantages or difference between python and Cisco macros ?

Is there a good site where I can read up on building a python script? And how to deploy it?

Oh and what's a good client application to create the script? 

Hiii,

I would recommend you  first deploy  in GNS.

 - you need to install python in your machine, preferably  ver 2.7.installation is avaliable on youtube.

- most of your query will be answer on http://stackoverflow.com/.

###################################################

telnet program script use in gns ro get sh ip int brief

##################################################

import sys
import telnetlib
import os

# 1.1.1.1 is router IP, for simplicity  i have use "no login" under VTY so that router wont ask #user name and password,
IP="1.1.1.1"
tn =telnetlib.Telnet(IP)
TELNET_PROMPT=IP
TIMEOUT=5
tn.write("term len 0" + "\n")
tn.write("en"+"\n")
tn.write("cisco"+"\n")

tn.write("sh ip int brief "+"\n")
tn.write("#stop"+"\n")
output=tn.read_until("#stop", TIMEOUT)
print output
c=open("CommandPJNB520.txt","r")
for line in c:
 tn.write(line)
 tn.write("########################################################"+"\n")
tn.write("#stop"+"\n")
output=tn.read_until("#stop", TIMEOUT)
D=open(r"c:\Python27\PostTESTPJNB520.txt", "w")
sys.stdout = open(r"c:\Python27\PostTESTPJNB520.txt", "a")
print output



SOHAN HEGDE
Level 1
Level 1

Hi,

 Personally i won't recommend using python script or any other script for AAA configuration, you may lose the access;.

for rest of the config. you can use python. you need to import  telnetlib library for telnet and paramiko for SSH.

Review Cisco Networking for a $25 gift card