8 Replies Latest reply on Jul 27, 2009 6:58 PM by Steve Welsh

    problem in config mode on HP switch

    Ferry

      Hi forum users,

      I was playing with the demo version and it came to my attention that Cattools only lists the 2600 series of HP switches. We also use the 5400 and 8200 series. It seems to work also.

      I am writing this because of a small problem I cannot trace. I have no problem logging on to my HP 2610 switch. Also when in "enabled" mode I can run all switch commands. The problem is when I want to go into "config" mode on the switch strange things happen.

      As a test I did the following:
      In the CLI option box I scripted the following HP commands:

      config
      no vlan 60
      vlan 60
      name nuwerkthet
      exit
      wr mem
      exit
      exit
      exit
      y

      This script go's into config mode and deletes vlan 60. After that it constructs vlan 60 with the name "nuwerkthet". Then an exit and a WRite MEMory command. Than I exit the switch and logout.

      When looking at the Info log I keep receiving the message "Did not receive expected response to XXXXXXXXXX. It also takes the script very long to finish. (about 5 min.).

      The script does not end (logout) and wants to start again. I then abort it by hand.

      When looking at log text I see the commands stated before my prompt name. Is this normal? I would think it should come after the prompt. (see log file below).

      configFERRY_werkplek(config)#
      vlan 60FERRY_werkplek(vlan-60)#
      name testvlanFERRY_werkplek(vlan-60)#
      exitFERRY_werkplek(config)#
      wr memFERRY_werkplek(config)#
      exit
      exitFERRY_werkplek>
      exitDo you want to log out [y/n]? y

      After ending the script I found that my command was written to the switch. So it did work. But I think something is not right. Can anyone inform me about this problem?

      Thank you.
      Ferry

       

        • Re: problem in config mode on HP switch

          You have gotten farther than me.  I am trying to backup the config in a HP 2610 and it won't login.  What fields did you fill in for setting up the switch?

            • Re: problem in config mode on HP switch
              Ferry

              Hi Morgandc (and other users),


               


              It took me some time to get the settings right but this is what I came up with.


              Go to “devices”


              Select the tab “device information”


               


              Vendor = “all vendors”


              Device type = “HP.switch 2500”


              Group = “Default” (or your group name if you have one)


              Host name = [your switch name] (for reference)


              Host address = [your IP address]


              Model = “HP2600”


              Connect via = “direct connect”


              Method = “telnet”


              Port = “23” (if that is your telnet port)


              Stack = [blank]


               


              After this press the “telnet” button. If a telnet session starts up you know that you can connect. If not take an other look at your settings.


               


              Go to the tab “passwords”


               


              Fill in “password”, “managed password” and your SNMP read/write strings.


               


              In the tab “prompts” and “extra info” I have no settings.


              In the tab “contact info” I placed my email address (this is for system messages).


               


              That’s it.


              I think my problem has something to do with the settings in the “prompt” tab.


              Should I solve it I’ll post it on the forum.


               


              Hope this helps. Have a nice weekend,


               


              Ferry

                • Re: problem in config mode on HP switch
                  Wardini

                  Hi Ferry,

                  Much Kudos for getting this to work as much as you have and for helping Morgandc. Hopefully I can help you a little bit further.

                  If you want to modify the config the Device.CLI.Modify Config activity is the best one to use as this should handle the change to config better. It should automatically put you into config mode, so you don't need the config commands, and also issue the commands to save to NVRAM and exit so you don't need these either. (I suspect part of your problem may be that as you issue the commands to exit, which the script should automatically do, the script gets confused as to where it is and hangs.)

                  Please try the Device.CLI.Modify Config activity with the cut down list of commands and let me know how you get on.

                  Generally speaking the fields on the prompts tab should be left blank, they are used quite rarely.

                  I would also like to just clarify one other point. The telnet button actually just opens your default telnet client, so you can manually check your device settings. It doesn't actually use or test any of the functionality of CatTools.

                  That said, good job and please let me know how you get on or if you hit any more problems.

                  Regards,

                  Wardini

                    • Re: problem in config mode on HP switch
                      Ferry

                      Hi Wardini,


                       


                      Thanks for your reply. It helped me a lot. First of all my apologies for suspecting that using the telnet button tests the functionality of Cattools. I should have noticed that this button only brings up the login prompt of the switch and does not log you in.


                       


                      I forgot to mention that I was already using the Device.CLI,Modify action in Cattools. Your comment about cutting down on the script was the right answer. I rewrote the CLI commands as fallows:


                       


                      no vlan 60
                      vlan 60
                      name MYtest
                      wr mem


                       


                      First I tried the script without the “wr mem” command. The script runs OK (and without error) but does not write the script command to the HP config file. So I tried it again with the “wr mem” command and it works perfectly. HP needs the “wr mem” to write from memory to the config file. Checking the “Save running-config to start-up config when completed” (in the “edit scheduled activity details”) will copy the commands to the running config file.


                      The script now starts and finishes without errors in about 16 seconds. (See the info log).


                      Thanks again.
                      Ferry


                        • Re: problem in config mode on HP switch
                          Wardini

                          Hi Ferry,

                          Good job. Thanks for letting me know it working.

                          Normally on the Cisco scripts we issue the write mem, or equivalent, as part of the activity but it may be that the HP does it differently, I'd have to look at the code to be sure, but if it's working that's sweet.

                          Regards,

                          Wardini

                      • Re: problem in config mode on HP switch

                        What checks do you have at the bottom of the passwords screen?  My backup config activity keeps failing with back password...  Since the login sequence is different on the hp than the cisco's there may be something else going on...  Do you have the banner page when you login to your switch?  If not that may be the difference, how did you turn it off?

                         

                        Thanks,

                        -Dwight

                          • Re: problem in config mode on HP switch
                            Ferry

                            Password checks I have are “Initial login requires password”. We do not use a username to logon to our switches only a password. If you use a username and password you should check “Initial login requires username/password”.


                            I also have the password field, manager password field and SNMP fields filled in with the appropriate passwords and community strings. On Cisco and HP you have the option to make an operator account and an administrator account.


                            I don’t think it has anything to do with a banner.


                            I tested a logon with Cattools on a cisco as well and it works OK.


                             


                            Ferry

                      • Re: problem in config mode on HP switch
                        Steve Welsh

                        Hi Ferry,

                        The HP.Switch.2500 device type script does (as you've found) handle more than just the listed switch series.  It was originally written against the 2500 series, however over time its been tweaked to work for many other series HP's (Procurves, etc.)... but not all!

                        The issue you are seeing is probably due to the 'Device.CLI.Send commands' activity script code for the HP, not being able to handle the entering of config mode due to the hostname prompt change to hostname(config)# from the enable mode prompt of hostname#.

                        It is also possible that the script isn't able to handle the "Do you want to log out [y/n]?" confirmation prompt either, as each of the commands entered within the CLI commands list in the activity 'Options' tab, require a device response.  Once the 'y' is issued to confirm logout, the device will not be able to provide CatTools with a response.

                        You could try using the 'Device.CLI.Modify config' activity instead, however I think this may also have some issue along the way with executing some of the commands and the device will either be left in a 'logged in' state (my first set of commands to try below), or you'll have a similar issue with the logout process (second set of commands to try).

                        *Note:  the 'Device.CLI.Modify config' activity automatically handles entering and exit of config mode

                        (Command set 1:)

                        - Enter the commands in the list box within the  'Options' tab of the 'Device.CLI.Modify config' activity

                        no vlan 60
                        vlan 60
                        name nuwerkthet

                        - If you wish to save configuration changes to memory, add a tick to the 'Save running config to start-up config when complete' option.  For the HP script, this will execute the 'write mem' command.

                        Result:  I think that CatTools will probably report that this has worked OK, however the device itself may have been left with the session still logged in.

                        (Command set 2:)

                        - Enter the commands in the list box within the  'Options' tab of the 'Device.CLI.Modify config' activity

                        no vlan 60
                        vlan 60
                        name nuwerkthet
                        exit
                        wr mem
                        exit
                        exit
                        exit
                        y

                        - Please ensure that you remove the tick in the 'Save running config to start-up config when complete' option, as the command list above should try to handle this instead.

                        Result: I think CatTools will probably still have an issue with the sending of the 'y', but the device itself would have had the session logged out correctly.

                        Please let me know how you get on.

                        Regards

                        Steve