[c-nsp] modify cisco router config with scripting

chris stand cstand141 at gmail.com
Wed Jun 15 14:03:18 EDT 2011


Try "ciscocmd",
I think it is at version 1.5.
it is based on Expect and is pretty easy to do some great things with it.
I use it even from my linux box to do remote commands and then send the
output to my bash environment.

for instance I wanted to find some stuff from a file of mac addresses

for mac in `cat p `; do ./ciscocmd --ssh -u ME -p PSWD -t 6509 -c "show arp
| inc $mac "; done  |grep -i console

all from my desk without manually connecting

if you are interested I can share more,.





> Message: 8
> Date: Wed, 15 Jun 2011 17:26:47 +0800
> From: d tbsky <tbskyd at gmail.com>
> To: cisco-nsp at puck.nether.net
> Subject: [c-nsp] modify cisco router config with scripting?
> Message-ID: <BANLkTinm7LYY0qF-G8RqjyWHCHP+=8ALuw at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> hi:
>   I want to write a script to modify the acl entry for cisco 3725 and
> cisco 3750G.
> I find now cisco can use ssh pub key authentication to execute
> command. but it needs IOS version 15 which my platforms don't support.
> I can also use perl cisco module to emulate the cli interaction, but I
> think the method seems not very safe.
>
>  are there other ways to do this kind of work? can I use snmpset to
> modify acl or use snmpset to run some tclsh script on the
> router/switch?
>
>  thanks a lot for your information!!
>
> Regards,
> tbskyd
>
>
>


More information about the cisco-nsp mailing list