|
Posted by Paul Thomas on June 26, 2007, 2:34 pm
If you were Registered and logged in, you could reply and use other advanced thread options > Paul Thomas a =E9crit :
>
>
>
> > I've seen a script a few years ago that would automate the
> > configuration of many routers but now I cannot find it unfortunately.
> > The way the script would work is as follows. I can't use Kiwi Cat
> > Tools because I have more than 5 devices and no budget for this
> > project and also I would really like to use this from unix.
>
> > The user would create the items to be placed into the config exactly
> > as you would type them if you were telnet/ssh in (including any no
> > commands if needed). You would place these commands into a plain text
> > file with the filename being the device hostname/ip. When you ran the
> > script you would pass it a directory and the script would telnet to
> > each device (obtained from the filename) then send that file to the
> > open telnet session.
>
> > tFTP isn't an option for me as this is a lab environment with no
> > access other than a termserv. I cannot put the configs on a file
> > server / router in the lab as there isn't always connectivity to all
> > devices. The only constant access to the devices is telnetting to a
> > termserv. Security isn't a concern either.
>
> > Google isn't giving me any love on this one and I'm trying to avoid
> > recreating the will using Net::Telnet[::Cisco] if I don't have to.
>
> IIRC, it could be "CiscoT", that you can find here:
>
> ftp://ftp.ripe.net/pride/tools/contrib.tar.gz
>
> Hope this helps.
Thanks for the prompt reply but that's not what I was looking for.
Here is an example.
The following files are in /tmp/cisco/changes
cat host1
conf t
no ip access-list 10
ip access-list 10 permit ip any any
end
wr me
##
cat host2
conf t
no ip access-list 10
ip access-list 10 permit ip any any
end
wr me
I would then type 'pushchanges /tmp/cisco/changes' and it would log
into routers, enter enable mode, then cat the text to the telnet
session. I made up the name pushchanges and I have no idea what
language that script was written in.
I expect I'll be writing some perl to do this but just trying not to
re-invent the wheel....especially since I'm not a fast (or good)
programmer.
|