3 Nov 2003 14:07
[zebra 20635] Re: Net::Telnet module and ZebraB
Joep Gommers <jgommers <at> gfo.nl>
2003-11-03 13:07:47 GMT
2003-11-03 13:07:47 GMT
Moyaze Shivji wrote:
>Hi
>
>I wonder if someone could please give me some advice on using the
>Net::Telnet module with Zebra.
>
>I am basically trying to run a script that will telnet to Zebra on port
>2605, enter the password, then enter the enable password, then go
>into configuration terminal mode (conf t) and then change the hostname of
>the bgpd daemon. Seems like a very trivial script to do but I am
>having problems making the script enter the enable password and am only
>able to enter the first password and issue a show command to the
>Zebra router. The script below just does that :
>
>#!/usr/bin/perl -w
>use Net::Telnet ();
> $t = new Net::Telnet (Timeout => 10,
> );
>$host = "localhost";
>$passwd = "zebrapasswd";
> $t->open(Host => $host,
> Port => 2605);
>$t->print("$passwd");
> <at> lines = $t->cmd("show ip bgp sum");
>print <at> lines;
>exit();
>
>
>I would be grateful if someone could provide some advice what needs to be
(Continue reading)
RSS Feed