Flickr Photos

    HP ProCurve CLI CheatSheet

    LOG
    log Display log events (most recent last)
    log -r Display log events (most recent first)
    log A12 Display log events of port a12
    log A12 -r Display log events of port a12 (most recent first)
    log 192.168.0.1 Display log events of 192.168.0.1
    MAC
    show mac A5 Show MAC-address of the device on port A5
    show mac A4-A6 Show MAC-adresss of the devices on ports between A4 and A6
    show mac 00112233-445566 Show which port device with MAC-address 00112233-445566 is connected
    VLAN
    show vlan Show information about vlans on this swtich
    show vlan ports A19 Show VLAN ID and status of specific ports (A19)
    show vlan Show ports on this vlan and port status
    configure
    vlan 19 Set switch to vlan 19
    name SupportVLAN Name this vlan as “SupportVLAN”
    tag A12 Set port a12 as tagged on vlan 19 (First do vlan <19>)
    tag A12,A13 Set ports a12 and 13 tagged on vlan 19 (First do vlan <19>)
    untag A12 Set port a12 as untagged on vlan 19
    vlan 19 tagged A12 Set port a12 as tagged on vlan 19
    vlan 19 untagged A12 Set port a12 as untagged on vlan 19
    vlan 19 untagged A12-A20 Set port a12-a20 as untagged on vlan 19
    no vlan 30 Remove vlan setting on port 30
    FLASH
    show flash Displays info about flash (version etc.)
    copy running-config tftp filename.txt Copy your running config to file filename.txt at tftp server which IP is .
    copy tftp startup 192.168.0.2 hp_2524 Copy your config (filename hp2524) from server 192.168.0.2 via tftp to switch
    copy tftp flash file.swi Download and update your flash with file.swi from tftp server at
    MISC
    copy flash flash secondary Copy software from primary to secondary image is not intuitive
    copy flash flash primary Updated secondary image first then You could copy from secondary to primary
    hostname poro_1 Set switch hostname as poro_1
    link-test 00112233-445566 Test connectivity between switches (this switch and 00112233-445566)
    show run Show running config
    password operator Set operator password (Normal user / read-only )
    password manager Set manager password (Admin user / read-write)
    password all Set operator and manager password
    enable Switch to manager lever from operator level
    ping 192.168.0.1 Ping IP 192.168.0.1
    chassislocate Turn on/off switch locator led or blink it (30 minutes)
    chassislocate blink 10 Blink switch locator led 10 minutes
    ntp1 first.timeserver.net Add first.timeserver.net to NTP server list
    timesync ntp Enable NTP syncronization with servers

    PROMPT
    Switch# Manager prompt
    Switch>_ Operator prompt

    Copyright © Petri Lopia ( www.petrilopia.net ) ver 1.02

    [note]
    Comments, corrections and so on are more than welcome.
    [/note]

    27 comments to HP ProCurve CLI CheatSheet

    • […] cheat sheet about HP ProCurve switch CLI but I didn’t find any so I decided to make my own: HP ProCurve CLI CheatSheet I know that it’s not perfect so any kind of feedback is more than welcome. VN:F […]

    • Dennis

      Thanks! This is good stuff :-)

    • Hello from Russia!
      Can I quote a post in your blog with the link to you?

    • Goassyhon

      Other variant is possible also

    • Feel free to tell me what variants you mean? Maybe I could add them to this cheatsheet.

    • Thanks! Just what i needed.

    • UnderV

      Nice CheatSheet :)

      I suggest to add command how to copy software from primary to secondary image.
      Software update could take a while (xmodem/tftp), so it is good to remember how to copy images from one place to other.

      Copy software from primary to secondary image is not intuitive:
      copy flash flash secondary

      If You updated secondary image first then You could copy from secondary to primary:
      copy flash flash primary

    • PRASHANT

      i would request you to provide some basic cmmds like system healt and all related???

      Regards

    • Christian

      hello.
      someone can tell me what is the equivalent command terminal monitor in cisco to Hp procurve (provision os)?

      • Pedro

        According to the “hp procurve command line interface reference” (ftp://ftp-boi.external.hp.com/pub/networking/software/59903044.pdf) :

        terminal monitor
        Enables real-time display of Syslog messages for a Telnet or SSH session.

        NOTE: You first must enable real-time display by entering the logging console command at the global CONFIG
        level of the CLI. You can enter this command from the serial console or from a Telnet or SSH session. See
        “logging” on page 6-60.

        So maybe you still need to enter “logging console”

    • loay abdelrazek

      i would like to know how to apply a route policy on a 8212 zl HP switch, we are using V1 modules so we cant do policy based routing policy, thats why are using route policy , but dont know how to apply it on an interface or a vlan, your help is much appreciated

    • Camilla

      You really make it seem so easy with your presentation
      but I find this matter to be really something which I think I would never understand.
      It seems too complicated and very broad for me.
      I am looking forward for your next post, I’ll try to get the hang of it!

    • Simon

      Petri,

      Thanks for the help, but I have a couple of important corrections…

      1. the second “show vlan” command (“Show ports on this vlan and port status”) should say
      #show vlan VLAN-ID (e.g. show vlan 19)

      2. IMPORTANT! The “no vlan 30” command doesn’t remove the VLAN setting on port 30… IT REMOVES THE VLAN WITH NO WARNING! The correct commands are:
      #no vlan 30 (Remove VLAN 30)
      #no vlan 30 [un]tagged A12 (Remove A12 from VLAN 30)

      Regards and thanks.

    • Johng951

      I think this is a real great blog post.Much thanks again. eadgdeedaebk

    • Nice sheet and layout

      Please add the shortcut commands to disable and re-enable a port? or admin down an interface…

      I’m NOT sure but believe they are “shutdown” the specific port and “undo shutdown”…maybe ADD and “interface” group of common commands?

      Best,

      Z

    • Vitalhostage

      Another handy one is
      SHOW CDP neighbours
      To see what other switches are connected to the one your configuring.

    • Kyaw

      Hi,
      I would suggest you can also put “SHOW LLDP INFO REMOTE (interface numbers)”. It will show you what other HP switches and H3C switches are connected to your switch as well as their hostname and ip address.

    • John

      Does anyone know if you can insert a comment in a configuration similar to Cisco with the “!”?

      • obelix

        Although there’s no direct equivalent to the Cisco IOS “!” to add comment lines to an HP ProCurve switch config file, you can achieve a similar result by using multiple “alias” commands within the config file, with a final “no alias” command at the end of the script to tidy things up:


        alias COMMENT "Some procurve configuration comment line here"
        ...
        alias COMMENT "Second line of comment"
        ...
        no alias COMMENT

    • MikeW

      with newer code to get mac address information is sh mac-a They have added more commands that now “mac” is not unique.

    • bud

      THANKS

      printable link would be GREAT!!

    • nishadmorey

      Hi,

      Can u tell me command for getting IP address of that particular port.?
      I have tried show arp [port-no] but this was not worked.

      • MIke

        A switch will not cache the IP of attached devices only the MAC address (LAYER 2) so to get the device information you will need to know the IP, ping it from a Layer 3 switch or router, do a SH ARP and look for the MAC address of that IP, make a copy of the MAC address. Then go the the switch and SHOW MAC-ADDRESS (MAC-ADDRESS that you copied) and it will show you which port has that address.

    • Ganthum

      my favorite:
      show run structured
      it gives you a cisco-like layout of the individual port configs.

      Also, provision supports the pipe command to include or exclude text
      sh mac-address | include “0021a5″
      for those times you are looking for a particular mac address prefix.

      or if you want to see all devices on vlan 50 that are not on port 48:
      sh mac-address vlan 50 | exclude ” 48 “

    Leave a Reply

    You can use these HTML tags

    <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>