Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Cisco Telnet

by McA (Curate)
on Aug 16, 2013 at 11:37 UTC ( #1049727=note: print w/ replies, xml ) Need Help??


in reply to Cisco Telnet

Checkout whether Net::Telnet::Cisco has the possiblity to define a network timeout.

Update: A quick look at the manual pages let me find this:

$ok = $obj->login([Name => $username,] [Password => $password,] [Passcode => $passcode,] # for Secur-ID/XTACACS [Prompt => $match,] [Timeout => $secs,]);

I would try to find a feasible value for 'Timeout'.

McA


Comment on Re: Cisco Telnet
Download Code
Re^2: Cisco Telnet
by mvip (Acolyte) on Aug 19, 2013 at 11:23 UTC

    Tnx for the reply ... McA i wast trying with that but not working ... i put 10 seconds for timeout but nothing the script just end stoped ....

      Hi,

      In Re: Cisco Telnet ~~David~~ is showing you how to wrap the call to login with an eval block to catch an exception. Then you are able to log that issue and proceed in your loop.

      Is that what you meant?

      McA

        well no, and i try that eval procedure and it just gave me the error massage that is saying the router is down and can't connect and the script end. I need something that will tel me that and continue. For example if i have 100 routers and the script start from 1 and as he going on 2,3,4,5 ... (lets say that router 10 is down ) when he comes to router 10 to say i can't connect to this router, and to moves on, and that is router 11, 12, 13 ... not to stop and end. For now iv try eval procedure and with sub routines and iv got nothing ... and i need this because i have to set the same config and settings on almost 300 routers and some of them are down some of them are not that ip end etc.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2014-08-28 04:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (256 votes), past polls