Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^8: Net::Telnet::Cisco - command timed-out error- (send_wake)

by ArifS (Beadle)
on Oct 27, 2014 at 13:42 UTC ( [id://1105148]=note: print w/replies, xml ) Need Help??


in reply to Re^7: Net::Telnet::Cisco - command timed-out error
in thread Net::Telnet::Cisco - command timed-out error

Thank you for the update. I just tried as following-
use Net::Telnet::Cisco; my ($host, $user, $pass) = qw(10.10.1.1 user pass); my $cs = Net::Telnet::Cisco->new( Host => $host, Port => $port, Dump_Log => 'cisco.log', Prompt => '/(?m:^\W?[\w\/\d.:-]+[>#])/', ); $cs->send_wakeup('connect'); $cs->login( $user, $pass ); print "username and password sent\n"; my @cmd_output = $cs->cmd( 'show cdp nei' ); print @cmd_output; $cs->close;
But, I am getting the following error-
username and password sent command timed-out at c:\temp\dir6483.tmp\sendWake.pl line 28 Press any key to continue . . .
line 28: my @cmd_output = $cs->cmd( 'show cdp nei' );

After that when I use putty to access, I can see that it's displaying my "show cdp nei" and didn't ask for authentication, as I have already provided thru the script. However, it didn't display in the script output and gave me that error.

Please let me know.

##UPDATE:
never mind... it's working. I just had to add 'term leng 0' first. Thank you all.

Replies are listed 'Best First'.
Re^9: Net::Telnet::Cisco - command timed-out error- (send_wake)
by soonix (Canon) on Oct 27, 2014 at 14:18 UTC

    This is strange. Normally, putty doesn't "continue" sessions from other programs. (Also, the Cisco here at my workplace doesn't understand "show cdp"...)

    However, you still haven't told us what is in "cisco.log". You inserted the "dump_log" parameter as per Loops' advice, but didn't yet comment on the findings...

      It's working. I just had to add 'term leng 0' first. Thank you.
        where did you add 'leng 0' ???

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1105148]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (1)
As of 2024-04-25 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found