07-15-2012 04:52 PM - edited 03-07-2019 07:47 AM
Hi
I`m looking to automate some functions in a web application.
Functions like enable/disable interfaces on a Cisco 3550 switch.
Anybody know if there are some good scrips, or examples anywhere to get me started?
Solved! Go to Solution.
04-30-2017 05:03 PM
thank you very much Jon, you helped me a lot!!!!
I{ll keep looking and testing.
Thanks again!
09-12-2017 05:58 PM
hi
i am not that doog a scripting but part "while read ipadd" in the ssh.sh file isn´t working for me.
04-03-2018 04:21 AM
This Script worked very well, Thanks for that :)
in this script what should i add, so that it asks confirmation before proceeding to next router. like YES or NO prompt.
05-29-2019 11:05 PM
Hi,
I have been asked to take the capture of command "sh int des | i up" from a list of 494 cisco switches!
Is there a way to ssh into all these 494 devices and then have the output of each device captured in a separate file, ideally by the switch hostname?
Any help in this matter will be really appreciated.
Thanks.
05-01-2017 10:50 AM
how did you run it what are the setups and connection to the cisco devices and the computer?please help me.
05-02-2017 10:44 AM
sorry prabhuprakash781, I can't understand what you're saying...
what do you need exactly???
05-02-2017 10:52 AM
I want to know that, before running the script how should I connect the PC and cisco switch (either through the console or ethernet port) and any other setups needed on the PC.
how the script communicate with the switch?
05-02-2017 11:10 AM
PC must be on the same network that Switch, Routers, etc. Connect PC via ethernet cable to Swith where the other equipments are. Are you using Linux or Windows??
05-02-2017 11:28 AM
I'm Linux user...
follow the answer posted by siddhartham that's marked as the correct answer. It's very simple.
In linux you have to install expect and create the files in the main directoy....simple as that. Just keep in mind that you need to modify the script according to yor needs.
05-02-2017 11:44 AM
Thank you so much for your responses.i will try with your tips.
05-02-2017 11:13 AM
I have both .tell me for both.
06-03-2016 07:35 AM
hi, thanks for the example, it works fine but how can i execute commans that needs an input like this one:
send "crypto key generate rsa\r"
expect "Do you really want to replace them? [yes/no]:"
send "y\r"
expect "*[512]:"
i get this error:
sw3-foptop(config)#invalid command name "yes/no"
while executing
"yes/no"
invoked from within
"expect "% Do you really want to replace them? [yes/no]:""
06-14-2020 05:49 PM - edited 06-14-2020 05:50 PM
When attempting to run these scripts, I'm getting an error that says:
can't read "tr": no such variable while executing "set Password "@dm1n$tr@t0r!"" (file "./show-run.sh" line 9)
It looks like the expect library can't handle $ for passwords. Does anyone have any suggestions here?
08-04-2020 10:52 AM
I use Script N'Go to script devices. For simple tasks I create a CLI script, but if some logic is required I either build a Python script or create a Visual Script.
08-01-2022 04:35 AM
That really helped me a lot.
I also found a example for backing up config via TFTP that worked great.
Do you know any other resources with more examples, example enable, disable interfaces etc and many more?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide