Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Telnet problem - FC switch

Status
Not open for further replies.

trinita

IS-IT--Management
Oct 23, 2006
14
Hi all,

I've got a problem with fibre channel switch. I'd like to create a script that get login with a switch, interrogate it, and than archive the information into a file.
It sounds like just a piece of cake but my script doesn't work!
I tried with these module:
Net::Telnet
Net::Telnet::Brcd (for brocade switch)

Anyone of you have never tackeld this problem? Have you got a script as example?

I found these:

#!/usr/bin/perl
use Net::Telnet::Brcd;
%wwn_port=();
my $sw = new Net::Telnet::Brcd ();
my $sw_name='10.64.171.51';
my $user='admin';
my $pass='password';
$sw->connect($sw_name,$user,$pass) or die "\n";
%wwn_port = $sw->switchShow(-bywwn=>1);
my @lines = $sw->cmd("configShow");
print @lines;
---------------------------------
But the switch answers with strange characters

Thanks in advance for any suggestion

Ale
-
 
what do you mean by strange characters? have you tried binmode?

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Paul,

yesterday I received back some strange characters but today I tried again, probably changing something, and the answer is:

Net::Telnet::Brcd: Cannot login as admin/*****:
at nuovo1.pl line 8

Really strange, because the login credential inserted are correct. Have you got any idea?

Paul, another question: did you work with fiber channel switches? HAve you ever writen a script for them?

Trinità
 
Do you actually have a broccade switch or are you using that module because it is also a fiber switch?
 
Travs69,

working with brocade or cisco fc switch is part of my business, and one of the reasons I'm approaching Perl is for create little tool to make my job easier and more funny!!

So could you give me some suggestion? It should be really kind of you..

Have a nice day

Trinità
 
Net telnet itself is very simple.. I have never used the brcd pm. Have you turned on dump log and input log and see where your script is getting stuck?
 
Man,

unfortunally I'm at home, with a flou, and I'm not so smart with Perl to know what you're saying. I'll try it the next week.
Anyway brcd pm sound like a cool way to work, but I'm not able to make it work! In the same way I don't have any idea about how Net telnet...may you sand me some script suggestion...I can study starting from them.

Thanks

Trinità
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top