{"id":252,"date":"2021-04-18T22:22:36","date_gmt":"2021-04-18T21:22:36","guid":{"rendered":"http:\/\/localhost\/blog\/?p=252"},"modified":"2022-03-01T22:23:02","modified_gmt":"2022-03-01T22:23:02","slug":"hp-procurve-cli-cheat-sheet","status":"publish","type":"post","link":"https:\/\/www.davidirwin.co.uk\/index.php\/2021\/04\/18\/hp-procurve-cli-cheat-sheet\/","title":{"rendered":"HP Procurve CLI Cheat Sheet"},"content":{"rendered":"<h1>A list of basic commands for HP switches.<\/h1>\n<p>Notes:<br \/>\n&lt;&gt; indicates a changeable variable, such as port number or VLAN ID.<br \/>\n[] indicates an optional string or value.<br \/>\n&lt;port&gt; value can be either a single port (A1), multiple ports (A1,B3), or a port string (A1-B10).<br \/>\n| signifies interchangeable (or) values.<br \/>\n<strong>Config Files and Flash Files<\/strong><\/p>\n<p>#show config \u2014 Show config file<\/p>\n<p>#show running config \u2014 Show running config file<\/p>\n<p>#copy config config1 usb &lt;file name&gt; \u2014 Copy active config file to USB drive<\/p>\n<p>#copy config config1 tftp &lt;IP&gt; &lt;file name&gt; \u2014 Copy your config to file to TFTP server.<\/p>\n<p>#copy tftp config &lt;fileneme&gt; &lt;IP&gt; \u2014Copy your config from TFTP server to switch<\/p>\n<p>#show flash \u2014 Displays info about flash (version etc.)<\/p>\n<p>#copy tftp flash &lt;IP&gt; &lt;file name&gt; &lt;primary|secondary&gt; \u2014 Download and update your flash with from TFTP server<\/p>\n<p>#copy flash usb &lt;file name&gt; &lt;primary|secondary&gt; \u2014 Copy flash to USB drive<\/p>\n<p>#copy flash tftp &lt;IP&gt; &lt;file name&gt; &lt;primary|secondary&gt; \u2014 Copy flash to TFTP server<\/p>\n<p>#write memory \u2014 Save config<\/p>\n<p><strong>Event Logs<\/strong><\/p>\n<p>#log [&lt;port&gt;] [-r] \u2014 Display log events of port [most recent first]<\/p>\n<p>#log &lt;IP address&gt; \u2014 Display log events of a specific IP<\/p>\n<p><strong>Miscellaneous<\/strong><\/p>\n<p>#hostname &lt;hostname&gt; \u2014 Set switch hostname<\/p>\n<p>#link-test &lt;destination switch MAC&gt; \u2014 Test connectivity between switches (local switch and destination switch)<\/p>\n<p>#ping &lt;IP address&gt; \u2014 Ping IP 192.168.0.1<\/p>\n<p>#chassislocate \u2014 Turn on\/off switch locator led or blink it (30 minutes)<\/p>\n<p>#chassislocate blink &lt;time&gt; \u2014 Blink switch locator led set time in minutes<\/p>\n<p>#ntp1 &lt;time server name&gt; \u2014 Add time server to NTP server list<\/p>\n<p>#timesync ntp \u2014 Enable NTP synchronization with servers<\/p>\n<p>#password operator \u2014 Set operator password (Normal user \/ read-only )<\/p>\n<p>#password manager \u2014 Set manager password (Admin user \/ read-write)<\/p>\n<p>#password all \u2014 Set operator and manager password<\/p>\n<p>#enable \u2014 Switch to manager lever from operator level<\/p>\n<p>#exit \u2014 Exit current level<\/p>\n<p>#logout \u2014 Logout out of the switch<\/p>\n<p><strong>PoE<\/strong><\/p>\n<p>#show power-over-ethernet brief [&lt;port&gt;] \u2014 To show PoE<\/p>\n<p>#no interface &lt;port&gt; power-over-ethernet \u2014 To turn off for a port<\/p>\n<p>#interface &lt;port&gt; power-over-ethernet \u2014 To turn on for a port<\/p>\n<p><strong>Ports and LACP Trunks<\/strong><\/p>\n<p>#interface &lt;port&gt; name &lt;port-name&gt; \u2014 Assign a port name to port-list<\/p>\n<p>#show name \u2014 Show port name<\/p>\n<p>#show interface \u2014 Show port statistics<\/p>\n<p>#interface &lt;port&gt; lacp active \u2014 Configure dynamic LACP trunk on c1-c4<\/p>\n<p>#no interface &lt;port&gt; lacp \u2014 Remove port from dynamic LACP (returns to passive LACP)<\/p>\n<p>#show trunks [&lt;port&gt;] \u2014 Show trunk status (port optional)<\/p>\n<p>#show lacp \u2014 Show data for LACP configured ports<\/p>\n<p>#trunk &lt;port&gt; &lt;trk1\u2026trk36&gt; &lt;trunk|lacp&gt; \u2014 Configure static trunk or LACP<\/p>\n<p>#no trunk &lt;port&gt; \u2014 Remove trunk<\/p>\n<p>#[no] int &lt;port&gt; rate-limit all &lt;0\u2026100&gt; \u2014 Set (or remove) rate limit on port according to selected percentage<\/p>\n<p>#show rate-limit all [&lt;port&gt;] \u2014 Show rate limit on all or selected ports<\/p>\n<p>#[no] int &lt;port&gt; rate-limit icmp &lt;0\u2026100&gt; \u2014 Set (or remove) rate limit to all ICMP traffic<\/p>\n<p>#show rate-limit icmp [&lt;port&gt;] \u2014 Show ICMP rate limit on all or selected ports<\/p>\n<p>#loop-protect &lt;port range&gt; \u2014 Turn on loop protection<\/p>\n<p>#show loop-protect \u2014 Display loop protection<\/p>\n<p><strong>Security<\/strong><\/p>\n<p>#dhcp-snooping authorized-server &lt;IP address&gt; \u2014 Set authorized DHCP server(s)<\/p>\n<p>#dhcp-snooping trust &lt;port&gt; \u2014 Set ports authorized to pass DHCP<\/p>\n<p>#dhcp-snooping vlan &lt;VLAN ID range&gt; \u2014 Enable DHCP on specified VLANs<\/p>\n<p>#dhcp-snooping \u2014 Enable DHCP globally<\/p>\n<p>#dhcp-snooping option 82 \u2014 Enable option 82 (on edge switches)<\/p>\n<p>#crypto key generate ssh \u2014 Generate an SSH key<\/p>\n<p>#ip ssh \u2014 Enable SSH<\/p>\n<p>#no telnet-server \u2014 Disable Telnet<\/p>\n<p>#no web-management \u2014 Disable web interface<\/p>\n<p>#arp-protect trust &lt;port&gt; \u2014 Set arp-protect trusted ports<\/p>\n<p>#arp-protect vlan &lt;VLAN ID range&gt; \u2014 Enable arp-protect on specified VLANs<\/p>\n<p>#arp-protect \u2014 Enable arp-protect globally<\/p>\n<p><strong>Show Information Commands<\/strong><\/p>\n<p>#show system-information \u2014 Show system information<\/p>\n<p>#show name \u2014 Show port name<\/p>\n<p>#show config \u2014 Show config file<\/p>\n<p>#show mac &lt;port&gt; \u2014 Show MAC-address of the device on specified port<\/p>\n<p>#show mac &lt;mac address&gt; \u2014 Show which port device with MAC-address is connected to<\/p>\n<p>#show int d \u2014 Show real time port traffic<\/p>\n<p>#show int custom \u2014 Show a custom view of port information<\/p>\n<p>#show flash \u2014 Displays info about flash (version etc.)<\/p>\n<p>#show interface \u2014 Show port statistics<\/p>\n<p>#show run \u2014 Show running config<\/p>\n<p>#show lacp \u2014 Show LACP information<\/p>\n<p>#show trunks \u2014 Show trunk information<\/p>\n<p>#show spanning-tree \u2014 Show STP information<\/p>\n<p>#show rate-limit all [&lt;port&gt;] \u2014 Show rate limit on all or selected ports<\/p>\n<p>#show rate-limit icmp [&lt;port&gt;] \u2014 Show ICMP rate limit on all or selected ports<\/p>\n<p>#show snmpv3 &lt;group|user&gt; \u2014 Show SNMPv3 groups or users<\/p>\n<p><strong>SNMPv3<\/strong><\/p>\n<p>#snmpv3 enable \u2014 Enable SNMP version 3<\/p>\n<p>#snmpv3 only \u2014 Restrict SNMP to only version 3<\/p>\n<p>#snmpv3 user &lt;user name&gt; \u2014 Adds an SNMP user and creates an optional password<\/p>\n<p>#snmpv3 group &lt;group&gt; user &lt;user&gt; sec-model ver3 \u2014 Adds a user to a desired access group<\/p>\n<p>#show snmpv3 &lt;group|user&gt; \u2014 Show SNMPv3 groups or users<\/p>\n<p><strong>VLANs<\/strong><\/p>\n<p>#vlan &lt;vlan ID&gt; name &lt;vlan name&gt; \u2014 Create VLAN and set its ID and name<\/p>\n<p>#no vlan &lt;port&gt; \u2014 Remove vlan setting on port<\/p>\n<p>#vlan &lt;vlan ID&gt; &lt;tagged|untagged&gt; &lt;port&gt; \u2014 Set port as tagged on vlan<\/p>\n<p>#show vlan \u2014 Show information about VLAN on this swtich<\/p>\n<p>#show vlan ports &lt;port&gt; \u2014 Show VLAN ID and status of specific port<\/p>\n<p>#show vlan &lt;VLAN ID&gt; \u2014 Show ports on this VLAN and port status<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A list of basic commands for HP switches. Notes: &lt;&gt; indicates a changeable variable, such as port number or VLAN ID. [] indicates an optional string or value. &lt;port&gt; value can be either a single port (A1), multiple ports (A1,B3), or a port string (A1-B10). | signifies interchangeable (or) values. Config Files and Flash Files [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,10],"tags":[],"class_list":["post-252","post","type-post","status-publish","format-standard","hentry","category-hp","category-networking"],"_links":{"self":[{"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=252"}],"version-history":[{"count":1,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/252\/revisions"}],"predecessor-version":[{"id":253,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/252\/revisions\/253"}],"wp:attachment":[{"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}