HP ProCurve CLI CheatSheet

LOG
logDisplay log events (most recent last)
log -rDisplay log events (most recent first)
log A12Display log events of port a12
log A12 -rDisplay log events of port a12 (most recent first)
log 192.168.0.1Display log events of 192.168.0.1
MAC
show mac A5Show MAC-address of the device on port A5
show mac A4-A6Show MAC-adresss of the devices on ports between A4 and A6
show mac 00112233-445566Show which port device with MAC-address 00112233-445566 is connected
VLAN
show vlanShow information about vlans on this swtich
show vlan ports A19Show VLAN ID and status of specific ports (A19)
show vlanShow ports on this vlan and port status
configure
vlan 19Set switch to vlan 19
name SupportVLANName this vlan as “SupportVLAN”
tag A12Set port a12 as tagged on vlan 19 (First do vlan <19>)
tag A12,A13Set ports a12 and 13 tagged on vlan 19 (First do vlan <19>)
untag A12Set port a12 as untagged on vlan 19
vlan 19 tagged A12Set port a12 as tagged on vlan 19
vlan 19 untagged A12Set port a12 as untagged on vlan 19
vlan 19 untagged A12-A20Set port a12-a20 as untagged on vlan 19
no vlan 30Remove vlan setting on port 30 (Check comment by Simon before testing this)
FLASH
show flashDisplays info about flash (version etc.)
copy running-config tftp filename.txtCopy your running config to file filename.txt at tftp server which IP is .
copy tftp startup 192.168.0.2 hp_2524Copy your config (filename hp2524) from server 192.168.0.2 via tftp to switch
copy tftp flash file.swiDownload and update your flash with file.swi from tftp server at
MISC
copy flash flash secondaryCopy software from primary to secondary image is not intuitive
copy flash flash primaryUpdated secondary image first then You could copy from secondary to primary
hostname poro_1Set switch hostname as poro_1
link-test 00112233-445566Test connectivity between switches (this switch and 00112233-445566)
show runShow running config
password operatorSet operator password (Normal user / read-only )
password managerSet manager password (Admin user / read-write)
password allSet operator and manager password
enableSwitch to manager lever from operator level
ping 192.168.0.1Ping IP 192.168.0.1
chassislocateTurn on/off switch locator led or blink it (30 minutes)
chassislocate blink 10Blink switch locator led 10 minutes
ntp1 first.timeserver.netAdd first.timeserver.net to NTP server list
timesync ntpEnable NTP syncronization with servers

PROMPT
Switch#Manager prompt
Switch>_Operator prompt

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

50 comments to HP ProCurve CLI CheatSheet

  • Arlie Beissel

    Good post. I study something more challenging on different blogs everyday. It can all the time be stimulating to learn content from different writers and apply just a little something from their store. I’d favor to use some with the content material on my weblog whether you don’t mind. Natually I’ll give you a hyperlink in your internet blog. Thanks for sharing.

  • Charlie M. Stanley

    An obligation of appreciation is all together for this extraordinary article.

  • Frank Ross

    Thanks for the cheatsheet, very helpful!

  • Theo

    Hi,

    This ..:
    no vlan 30 Remove vlan setting on port 30

    is not true!
    This command will remove complete vlan 30 on the switch!

    But, thanks for the good work !

  • Chris Disabato

    The article is very useful. I learned a lot from it. Keep up the good work

  • Dave

    Sweet.

    How tops is ‘show run interface’ command

  • Smith

    Good post
    Thanks for providing a very useful information, really it’s awesome cheatsheet.
    HP Switches

  • Paul

    Very useful stuff, thank you. Amazing how support for Java drops and no alternative is presented by vendors.

  • te verde

    Hi, its good paragraph about media print, we all understand
    media is a great source of information.

  • brico

    Can I just say what a comfort to find someone who genuinely knows what
    they are talking about over the internet. You actually know how to bring an issue to light
    and make it important. A lot more people must check this out
    and understand this side of your story. I can’t believe you
    aren’t more popular because you definitely possess the gift.

  • ika

    thx for sharing can plz post all CLI possible.
    from assigning IP to the end all important cmd.
    hp 5130

  • benidorm

    Good article. I’m dealing with many of these issues as well..

  • Newb

    I am looking for a step by step CLI for the HP MSR 2020. I need to enable the web interface and password setup. once in the web interface I can set it up. Can anyone help a newb out.

  • SHASHANK GANGWAR

    HOW TOW CREATE VLAN IN HP SWITCES.
    HOW TO MAKE PORT AS TRUNK PORT AND ASSIGN IN THE PARTICULAR VLAN

    • fixitrod

      Create a VLAN (tagged for port 1)

      # vlan 10
      # tagged 1
      # ip address 10.10.10.10 255.255.255.0

      Make a port work like a Cisco Trunk Port
      HP uses tagged and untagged options only. A trunk in HP means aggregation or EtherChannel (in Cisco).

      Example…VLAN 1 (default/native untagged) and VLAN 10 and 20 tagged. This is for port 24

      vlan 1
      untagged 24
      vlan 10
      tagged 24
      vlan 20
      tagged 24

  • Theo

    Good day, hopefully get an answer here: I picked up a small ‘Procurve 408 switch’ from a garage sale for five bucks…looks to be perfect for home.

    Question: can you login to this thing/reset it/config it/do anything fancy ?
    Or is it just plug-n-play ?

    thx.

    • Petri

      Is it just 408? This website says that it’s unmanaged: http://h18000.www1.hp.com/products/quickspecs/archives_North_America/12000_na_v6/12000_na.HTML
      But I think that I have two switch which look like that and they have simple web ui but you can’t do much with it. I guess that they are different model… I guess that mine are 1700-8 have to check.

  • AbSoLuT

    Thanks for the info..
    what about creating a Trunk (Cisco lang) to connect multiple vlans (example, untagged 1 tagged 2-4) on the hp2910.
    Thanks,

  • Audi TT

    Thanks , I have just been looking for info approximately this subject
    for a while and yours is the greatest I have discovered so far.
    But, what about the conclusion? Are you sure about the supply?

  • Ian Fleming

    A Cisco ‘terminal monitor’ equivalent (a.k.a. ‘term mon’):

    switch(config)# debug event
    switch(config)# debug destination session

  • Paris Wells

    You need to use this on the 2910G Switch to get the extra commands :

    _cmdline-mode on

    Use password

    Jinhua1920unauthorized

  • mo

    NO WAY

    SHOW RUN STRUCTURED

    best tip advice comment for HP Switches EVER!!!!

    THANKS!!!!!!!!!!!!!!!!!!!!!

  • 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 “

  • 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.

  • bud

    THANKS

    printable link would be GREAT!!

  • MikeW

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

  • 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

  • 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.

  • Vitalhostage

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

  • zeek

    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

  • Johng951

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

  • 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.

  • 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!

  • 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

  • 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”

  • PRASHANT

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

    Regards

  • 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

  • Jones

    Thanks! Just what i needed.

  • Petri

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

  • Goassyhon

    Other variant is possible also

  • Polprav

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

  • Dennis

    Thanks! This is good stuff :-)

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>

  

  

This site uses Akismet to reduce spam. Learn how your comment data is processed.