[Dev] cisco IOS retrieval failure

Ryan Kruse rkruse at alterpoint.com
Thu Dec 20 18:40:19 CST 2007


Everything Brett said is true.

Is your device listening on TCP\22?  If not, ziptie will go right to telnet.  Adapter Tool just does what you tell it though.  It has no trial and error logic.



----- Original Message -----
From: dev-bounces at ziptie.org <dev-bounces at ziptie.org>
To: ZipTie Development List <dev at ziptie.org>
Sent: Thu Dec 20 16:47:54 2007
Subject: Re: [Dev] cisco IOS retrieval failure

PingShan,
  I’ll let Ryan reply to some of this, but I’ll answer a few.  ZipTie tries protocols from “most secure” to “least secure” order, so it should be the case that if both SSH and Telnet are defined, that it will select SSH.  If it is not, it’s a bug in my opinion.

When the ZipTie server is driving the adapters for backup, it will submit one set of protocols at a time to the adapter until it succeeds or runs out of configured protocols or that device.  So, if you have SSH-SCP-Telnet-TFTP supported by the device and enabled as protocols, ZipTie will probably first attempt SSH-SCP for backup.  If that fails, it will attempt SSH-TFTP, then SSH, then Telnet-TFTP, and finally Telnet.  Ryan, correct me if I’m wrong.

In regards to SSH not failing immediately, it should.  Something else is going on here, like a failure response that we’re not expecting.  I’ll let Ryan help you with that as he is more familiar with it.

-Brett

On 12/20/07 4:16 PM, "PingShan Li" <lipingshan72 at gmail.com> wrote:



        Thank you for your reply.

        I downloaded the AdaptorTool program, one question I have is about the protocol. I have a Cisco IOS device that only supports telnet. If I use telnet, the retrieval works fine. But if I use SSH, it hangs ( i waited for 3 min ). SSH should not work in this case. But it would be nice to return immediately if SSH connection failed. Is there anyway i can make changes to the perl script and return immediately if SSH is not supported by the device?

        Another question is about which protocol to use.

        from core\org.ziptie.adapters\scripts\ZipTie\CLIProtocolFactory.pm, I think the algorithm to choose protocol is:
        1.       If only SSH is defined, it uses SSH.

        2.       If only Telnet is defined, it uses telnet.

        3.       If both SSH and telnet are defined, it will choose telnet and will not try SSH.


        Sometime I do not know what protocol the device supports. It can be helpful if i can specify the sequence of the protocols to try. For example, try SSH first, then try telnet. Is it possible to do this by changing the current perl script or iosInvoke.xml? If it is possible, would you please give me a direction on how to do it?

        If i do a retrieval from Ziptie client and three protocols are chosen for the Cisco device. Does ziptie try all the protocols at the same time or try them one by one to see which protocol the device supports?

        Thank you

        PingShan Li


        On Dec 20, 2007 3:13 PM, Ryan Kruse <rkruse at alterpoint.com> wrote:


                PingShan Li,

                Instead of running the Perl script directly, I suggest downloading our AdapterTool program.

                We have details docs here:
                http://staging.ziptie.org/documentation/latest/Content/index.html#d0e254  <http://staging.ziptie.org/documentation/latest/Content/index.html#d0e254> <http://staging.ziptie.org/documentation/latest/Content/index.html#d0e254>

                Those docs will soon more, so try this link if the one above doesn't work for you.
                http://www.ziptie.org/documentation/latest/Content/index.html  <http://www.ziptie.org/documentation/latest/Content/index.html> <http://www.ziptie.org/documentation/latest/Content/index.html>

                -Ryan


________________________________

                From: dev-bounces at ziptie.org [mailto:dev-bounces at ziptie.org] On Behalf Of PingShan Li
                Sent: Thursday, December 20, 2007 1:59 PM
                To: dev at ziptie.org
                Subject: [Dev] cisco IOS retrieval failure

                I am a newbie to ziptie and I have a problem with ziptie for cisco retrieval. Please let me know what I need to do to make it work.

                Thanks



                PingShan Li





                OS: Windows xp Professional 2002 sp2

                Perl: 5.8.8

                Ziptie version: 2007.9.2.v200711091724



                iosInvoke:



                <backup xmlns="backup">
                    <connectionPath host=" 192.168.20.2 <http://192.168.20.2/> <http://192.168.20.2/>  " xmlns="">
                        <credentials>
                            <credential name="roCommunityString" value="public"/>
                            <credential name="username" value="abc"/>
                            <credential name="rwCommunityString" value="private"/>
                            <credential name="enableUsername" value=""/>
                            <credential name="password" value="abc123"/>
                            <credential name="enablePassword" value="abc123"/>
                        </credentials>
                        <protocols>
                            <protocol name="Telnet" port="23">
                                <properties/>
                            </protocol>
                        </protocols>
                    </connectionPath>
                </backup>



                Command line:

                perl -I ..\..\ziptie.adapters.cisco.ios_2007.9.2.v200711091724\scripts invoke.pl ZipTie::Adapters::Cisco::IOS backup -i samples\iosInvoke.xml

                core\org.ziptie.adapters\scripts>perl -I ..\..\ziptie.adapters.cisco.ios_2007.9.2.v200711091724\scripts invoke.pl ZipTie::Adapters::Cisco::IOS backup -i samples\iosInvoke.xml
                2007-12-20 13:41:36 [ZipTie::Typer] Loading ziptie types from file './ziptie-types.xml'
                2007-12-20 13:41:36 [ZipTie::Typer] commandList => ZipTie::CliCommands::from_xml
                2007-12-20 13:41:36 [ZipTie::Typer] restoreFileInfo => ZipTie::RestoreFile::from_xml
                2007-12-20 13:41:36 [ZipTie::Typer] fileServers => ZipTie::ConnectionPath::FileServer::from_xml
                2007-12-20 13:41:36 [ZipTie::Typer] protocols => ZipTie::ConnectionPath::Protocol::from_xml
                2007-12-20 13:41:36 [ZipTie::Typer] credentials => ZipTie::Credentials::from_xml
                2007-12-20 13:41:36 [ZipTie::Typer] connectionPath => ZipTie::ConnectionPath::from_xml
                2007-12-20 13:41:36 [ZipTie::Typer] Using translator for type: connectionPath => ZipTie::ConnectionPath::from_xml
                Can't locate object method "backup" via package "ZipTie::Adapters::Cisco::IOS" at (eval 16) line 2.




                _______________________________________________
                Dev mailing list
                Dev at ziptie.org
                http://mailman.ziptie.org/listinfo/dev












More information about the Dev mailing list