[nsp] Cisco commands automatically sent

Zhang, Anchi AZhang@reliant.com
Fri, 9 Aug 2002 11:57:24 -0500


If you have many Cisco devices, RANCID would be a much better choice.

http://www.shrubbery.net/rancid/


-----Original Message-----
From: Michal Mertl [mailto:mime@kpnqwest.cz]
Sent: Friday, August 09, 2002 10:28 AM
To: odusseus
Cc: cisco-nsp
Subject: Re: [nsp] Cisco commands automatically sent


On Fri, 9 Aug 2002, [iso-8859-1] odusseus wrote:

> Hi,
>
> +----------------+
> | Unix box       |
> | running a prog |
> +----------------+
>         |
>         |
>         |
>         |
>         V
> +---------------------+
> | Cisco device        |
> | (router or switche) |
> +---------------------+
>
>
> I would like to know if it is possible to write a program on a Unix =
box where it could automatically run some commands on a
> cisco devices (7200 series and 3500XL) like:
>
> enable
> conf t
> int fa0/1
> shut
> end
>

I know about at least two utilities - netcat and expect. Expect is much
more powerfull (can check results of commands - syntax error could stop
it) but harder to use. If you make sure the commands are correct I =
suggest
using netcat.

I use it like this:
nc ${address} 23 << END_OF_FILE
username
password
en
enable-password
conf t
int fa0/1
 shut
end
wr
END_OF_FILE

> Thank you.
>
> Regards,
>
> Christophe
> ------------------------------------------
>
> Faites un voeu et puis Voila ! www.voila.fr
>
> _______________________________________________
> cisco-nsp mailing list  real_name)s@puck.nether.net
> http://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/
>

--=20
Michal Mertl
Specialist IP Service Development
KPNQwest Czechia s.r.o.
GTS Czech a.s.
Vinohradska 184
130 52 Praha 3
Tel.: +420 2 96157111
Fax: +420 2 96157444
e-mail: Michal.Mertl@kpnqwest.cz
____________________________________________
Po=E8=EDnaje datem 1.5. 2002 do=B9lo k provozn=EDmu
slou=E8en=ED spole=E8nost=ED KPNQwest a GTS


_______________________________________________
cisco-nsp mailing list  real_name)s@puck.nether.net
http://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/