Categories
Welcome Center
Education & Development
Cyber Security
Virtualization
General
Certification Preparation
Project Management
Posts
Groups
Training Resources
Infosec
IT & Security Bootcamps
Practice Exams
Security Awareness Training
About Us
Home
General
Off-Topic
LAB automation
kasuj
Hi,
I'm looking for an script to automatically download/upload configuration files to a network devices mainly cisco or juniper. I'm trying to make my lab more automatic. Do you use/have anything like that?
Thank you,
Find more posts tagged with
Comments
networker050184
So are you wanting a script that logs into the device, pulls a new config down to start up and reloads the box? If so you can find plenty of perl and python scripts out there that will run commands on a Cisco router. Just set it up with the parameters you want and let it fly.
kasuj
Yes thats exactly what I need. Can you give me any examples?
I was thinking about creating something with expect but maybe there is something that works and I don't have to reinvent the wheel.
networker050184
Here is one in perl written by a guy I used to work with.
Great Perl Script
Pretty straight forward. It takes a flat text file with routers and file with commands and executes them. You could probably fix it up to take a variable of the router hostname to match a config file so each router can pull a different config.
A google search will pull up many more on the internet in all sorts of languages. I've always just grabbed something and modified it to meet my needs rather than writing something from scratch since I'm not all that great at scripting.
fiftyo
Some old python script I wrote.
https://github.com/lovwal/sysadmin/blob/master/sshscripts/template
Edit the command variables and add some sleep while fetching the new images. Use with caution though seeing its multithreaded and not 100% reliable all the time depending on what you are doing.
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of