[c-nsp] Looking-glass software?

R. Scott Evans cisco-nsp at seidata.com
Thu May 18 11:04:33 EDT 2017


On 05/18/17 10:03, Patrick M. Hausen wrote:
> Hi, all
> 
> can anyone recommend a free looking-glass tool
> to run on my own NOC server for my own core routers?
> 
> My problem is finding a software that is preferably written in
> Perl or PHP and
> 
> * not unmaintained for years
> * breaking with current versions (5.24) of Perl
> * only supporting telnet instead of ssh
> * ...
> 
> I've been spending almost a day already chasing dead links
> on historic sites like traceroute.org, downloading, configuring,
> testing ...
> 
> So, any hints?
> 
> I had set up routerproxy to hand my less IOS-savvy colleagues a
> tool to quickly check some things, but that one goes in the
> "breaks with Perl 5.24" category ...
> 
> Thanks!
> Patrick

Hi Patrick,

If you prefer perl, are using a unix flavor, don't mind using a little 
bourne shell within it, and are comfortable coding, write your own... 
the relevant bits would look like:

$output = `(			sleep 1;
	echo $login;		sleep 1;
	echo $password;		sleep 1;
	echo term leng 0;	sleep 1;
	echo "** YOUR COMMAND **";		sleep 3;
	echo "** 2nd COMMAND IF NEEDED **";	sleep 3;
	echo exit;		sleep 1;
	) | /usr/bin/telnet $ip 2>&1`;

or

$output = `(			sleep 1;
	echo $login;		sleep 1;
	echo en;		sleep 1;
	echo $enable;		sleep 1;
	echo term leng 0;	sleep 1;
	echo "** YOUR COMMAND **";		sleep 3;
	echo exit;		sleep 1;
	) | /usr/bin/telnet $ip 2>&1`;

Alternatively if you are only using IOS or IOS-XE, not IOS-XR, and have 
netcat (nc) on your server I'd recommend using it in place of telnet as 
you can run the commands without specifying the sleep needed for the 
responses which greatly speeds up the program.  There may be a way to 
make XR work with it, but I've had no luck...
$output = `(
	echo $login;
	echo $password;
	echo term leng 0;
	echo "** YOUR COMMAND **";
	echo exit;
	) | /usr/bin/nc $ip 23 2>&1`;

Regards,
Scott



More information about the cisco-nsp mailing list