RE: Pushing Configuration to Cisco Routers/Switches

From: Huizinga, Rene (rhuizinga@upcbroadband.com)
Date: Thu Dec 21 2006 - 17:26:28 ART


Hi Guys,

Didn't really follow this thread here really, but you may want to try
'ciscocmd' , a bash-based script which can be used using cygwin as well.
Don't recall the dependencies, but wasn't much. Just do a quick search on
google, somewhere within sourceforge.net there's this project for
networking-tools. They have a few nice things there, I believe I got it from
there. Had to patch it a bit to also being able to use it for Junipers, but
OK, it isn't 100% perfect but runs really quite well ! You can either use it
with a single line, or with a txt-file for multiple-commands in one go. The
output can either go to stdout (screen) or also to ascii-files which are
created on a per-host basis. They can be created with prefix for clarity.
Both single hosts as well as sets out of a flat ascii-file can be processed.
It's expect-based.

Just took it because I was too lazy to try expect, although in the middle of
patching (IMHO I don't find it 100% bug-free/clean, though close) I must
admit I was in doubt if it was the right choice, already when looking at the
future, but so far still quite happy... :)

Cya
Rene.

P.S.

Wouldn't advise neccessarely to run it forked in a large number and would
probably advise/prefer to use it on a Unix or linux-host if you have the
option. Using it on a small Sun here.

Who knows, if you have some files from a source BSD-host you can transfer,
it could be a fun idea as well to run it off of a Juniper in the background,
scheduled... ;D Though not supported I bet for mixed environments with Cisco
the Juniper sales-rep's would love the idea... [VEG]

bash-2.05$ ciscocmd -h
ciscocmd v1.2 written by Alain Degreffe <eczema@ecze.com>

Usage: ioscmd [OPTION]...
Send command(s) to cisco host.

 -h --help display this help message.
 -u --username <username> define the username
password.
 -p --password <password> define the telnet password.
 -s --secretpassword <enable password> define the enable secret
password.
 -t --target <host> define the hostname to
connect.
 -T --targetfile <file> define a target file (one
host per line)
 -c --cmd <cmd> define de command to send.
 -e --enable set mode enable.
 -r --runfile <file> define a file with a set of
command to send.
 -l --log <file prefix> define a logfile prefix
 -a --append log will be appended to
existing file
 -P --prefix add the host prefix to each
line
 -m --maxfork <number> define maximum forked
process
 -w --wait <seconds> define max wait time for the
next prompt
 -b --batchfile <file> define a batch file to
process ciscocmd output
                                                All ciscocmd output will be
piped to this batch
 -d --debug <file> define a debug file name
 -q --quiet set program very quiet

bash-2.05$

 

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
gwendel@gregw.biz
Sent: Thursday, December 21, 2006 8:31 PM
To: ccielab@groupstudy.com
Subject: RE: Pushing Configuration to Cisco Routers/Switches

I would bet that someone has or could easily write a module for VB the same
way the net telnet module is used in perl to accomplish this.

Perl can be run on windows using http://www.activestate.com/.

> Out of my area of expertise...
>
> Most folks who chase Cisco probably don't chase VB.
>
> But I'm sure with 10,000+ people some might have the skill to try.
>
>
> --- Joe Rinehart <jjrinehart@hotmail.com> wrote:
>
>> Is there a way to use Visual Basic to do the same
>> thing?
>>
>> -----Original Message-----
>> From: Darby Weaver [mailto:darbyweaver@yahoo.com]
>> Sent: Wednesday, December 20, 2006 8:27 PM
>> To: Joe Rinehart; ccielab@groupstudy.com
>> Subject: Re: Pushing Configuration to Cisco
>> Routers/Switches
>>
>> Joe,
>>
>> Nothing to do with SSH actually. Alot to do with
>> SNMP
>> or automating interactive scripts.
>>
>> I like SNMP.
>>
>> Remember a little while back I mentioned RANCID
>> here,
>> well you can use it to push configs automatically.
>>
>> Solarwinds has a product called Cirrus that does the
>> same thing for Configutarion Management.
>>
>> The company that makes AdventNet has an offering as
>> well.
>>
>> There are others no doubt but this will give you a
>> place to start.
>>
>> If you have a *Nix background look at RANCID, if you
>> don't have *Nix background it may just be the
>> incentive you have been looking for.
>>
>> Good Luck!
>>
>> --- Joe Rinehart <jjrinehart@hotmail.com> wrote:
>>
>> > Hey folks, real-world question here.
>> >
>> > I know that newer versions of CiscoWorks and other
>> > applications have the
>> > capability of pushing configurations to routers
>> and
>> > switches. How exactly
>> > does it do that and how can that basic
>> functionality
>> > be created? I figure
>> > its an ssh kind of thing, but not sure.
>> >
>> >
>> >
>> > Any ideas?
>> >
>> >
>>
> _______________________________________________________________________
>> > Subscription information may be found at:
>> > http://www.groupstudy.com/list/CCIELab.html
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Tue Jan 02 2007 - 07:50:38 ART