HP Procurve Cheat Sheet

Steps (9 total)


1. Config Files and Flash Files

#show config — Show config file
#show running config — Show running config file
#copy config config1 usb <file name> — Copy active config file to USB drive
#copy config config1 tftp <IP> <file name> — Copy your config to file to TFTP server.
#copy tftp config <fileneme> <IP> —Copy your config from TFTP server to switch
#show flash — Displays info about flash (version etc.)
#copy tftp flash <IP> <file name> <primary|secondary> — Download and update your flash with from TFTP server
#copy flash usb <file name> <primary|secondary> — Copy flash to USB drive
#copy flash tftp <IP> <file name> <primary|secondary> — Copy flash to TFTP server
#write memory — Save config


2. Event Logs

#log [<port>] [-r] — Display log events of port [most recent first]
#log <IP address> — Display log events of a specific IP


3. Miscellaneous

#hostname <hostname> — Set switch hostname
#link-test <destination switch MAC> — Test connectivity between switches (local switch and destination switch)
#ping <IP address> — Ping IP 192.168.0.1
#chassislocate — Turn on/off switch locator led or blink it (30 minutes)
#chassislocate blink <time> — Blink switch locator led set time in minutes
#ntp1 <time server name> — Add time server to NTP server list
#timesync ntp — Enable NTP synchronization with servers
#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
#exit — Exit current level
#logout — Logout out of the switch


4. PoE

#show power-over-ethernet brief [<port>] — To show PoE
#no interface <port> power-over-ethernet — To turn off for a port
#interface <port> power-over-ethernet — To turn on for a port


5. Ports and LACP Trunks

#interface <port> name <port-name> — Assign a port name to port-list
#show name — Show port name
#show interface — Show port statistics
#interface <port> lacp active — Configure dynamic LACP trunk on c1-c4
#no interface <port> lacp — Remove port from dynamic LACP (returns to passive LACP)
#show trunks [<port>] — Show trunk status (port optional)
#show lacp — Show data for LACP configured ports
#trunk <port> <trk1…trk36> <trunk|lacp> — Configure static trunk or LACP
#no trunk <port> — Remove trunk
#[no] int <port> rate-limit all <0…100> — Set (or remove) rate limit on port according to selected percentage
#show rate-limit all [<port>] — Show rate limit on all or selected ports
#[no] int <port> rate-limit icmp <0…100> — Set (or remove) rate limit to all ICMP traffic
#show rate-limit icmp [<port>] — Show ICMP rate limit on all or selected ports
#loop-protect <port range> — Turn on loop protection
#show loop-protect — Display loop protection


6. Security

#dhcp-snooping authorized-server <IP address> — Set authorized DHCP server(s)
#dhcp-snooping trust <port> — Set ports authorized to pass DHCP
#dhcp-snooping vlan <VLAN ID range> — Enable DHCP on specified VLANs
#dhcp-snooping — Enable DHCP globally
#dhcp-snooping option 82 — Enable option 82 (on edge switches)
#crypto key generate ssh — Generate an SSH key
#ip ssh — Enable SSH
#no telnet-server — Disable Telnet
#no web-management — Disable web interface
#arp-protect trust <port> — Set arp-protect trusted ports
#arp-protect vlan <VLAN ID range> — Enable arp-protect on specified VLANs
#arp-protect — Enable arp-protect globally


7. Show Information Commands

#show system-information — Show system information
#show name — Show port name
#show config — Show config file
#show mac <port> — Show MAC-address of the device on specified port
#show mac <mac address> — Show which port device with MAC-address is connected to
#show int d — Show real time port traffic
#show int custom — Show a custom view of port information
#show flash — Displays info about flash (version etc.)
#show interface — Show port statistics
#show run — Show running config
#show lacp — Show LACP information
#show trunks — Show trunk information
#show spanning-tree — Show STP information
#show rate-limit all [<port>] — Show rate limit on all or selected ports
#show rate-limit icmp [<port>] — Show ICMP rate limit on all or selected ports
#show snmpv3 <group|user> — Show SNMPv3 groups or users


8. SNMPv3

#snmpv3 enable — Enable SNMP version 3
#snmpv3 only — Restrict SNMP to only version 3
#snmpv3 user <user name> — Adds an SNMP user and creates an optional password
#snmpv3 group <group> user <user> sec-model ver3 — Adds a user to a desired access group
#show snmpv3 <group|user> — Show SNMPv3 groups or users


9. VLANs

#vlan <vlan ID> name <vlan name> — Create VLAN and set its ID and name
#no vlan <port> — Remove vlan setting on port
#vlan <vlan ID> <tagged|untagged> <port> — Set port as tagged on vlan
#show vlan — Show information about VLAN on this swtich
#show vlan ports <port> — Show VLAN ID and status of specific port
#show vlan <VLAN ID> — Show ports on this VLAN and port status

Other Useful Commands:

ip default-gateway 10.10.10.1 

hostname <switch-name>

banner motd %
#######################################################################
# Authorized Users Only #
# The information on this computer and network is the property of #
# Kim Connect and is protected by intellectual property #
# rights. You must be assigned an account on this computer to #
# access the information and are only allowed to access information as #
# defined by the System Administrator(s). Your activities are #
# being monitored according to our security policies. #
#######################################################################
%

interface {ethernet-X} name “Uplink to RD-SSR-CORE1”

# Set NTP
timesync sntp
sntp server X.X.X.X
sntp unicast
time timezone -800 #GMT-8 equals PST

write memory
#show config
show run
show flash

Commands regarding Spanning Tree
http://h20564.www2.hpe.com/hpsc/doc/public/display?docId=emr_na-c03396721

config
Set priority: spanning-tree {port-number} priority {priority-value} # 32768 is default, 0 is highest
Set path cost: spanning-tree {port-number} path-cost {1=fiber,250=trunk4Gig,1000=gig,10000=100mb} #1 is highest

#Find port speed
show interfaces brief

# Clear statistics & log
clear statistics
clear log

# Set VLAN
vlan 2 name Guest-WIFI
vlan 2 tagged <port-list>
vlan 2 untagged <port-list>
[no] int <port-list> <tagged|untagged> vlan <vlan_ID>

# Set port for default
vlan 1 untagged <port number>

# Setup trunk
trunk 47-47 trk3 (trunk | lacp) # lacp is for link aggregation

#display live traffic
show int d

To show PoE
#show power-over-ethernet brief

To show PoE for a port
#show power-over-ethernet brief c13

To turn off for a port
#no interface c13 power-over-ethernet

To turn on for a port
#interface c13 power-over-ethernet

Loop Detection
Turn on loop detection
#loop-protect 1-24
#loop-protect disable-timer 300

Display loop detection
#show loop-protect

To remove interface 1 from VLANs 1, 3, 5, 6, 7, 8, 9, 10
HP Switch(config)#: no interface 1,6,7-10 tagged vlan 1,3,5-10
OR
no vlan 1 tagged 1,6,7-10

To specify that an interface cannot become a member of VLANs 4 and 5
HP Switch(config)#: interface 2 forbid vlan 4-5

Displaying a VLAN disabled for Layer 3
HP Switch(config)#: show ip

Displaying IPv6 Layer 3 status for a VLAN
HP Switch(config)#: show ipv6

The following example shows how to re-assign the Primary VLAN to VLAN 22 (first command line), rename the VLAN 22-Primary (second command line) and then display the result (third command line):
HP Switch(config)#: primary-vlan 22
HP Switch(config)#: vlan 22 name 22-Primary
HP Switch(config)#: show vlans

Allowing inter-VLAN DHCP service
vlan <number>
ip address x.x.x.x x.x.x.x
ip helper-address <ip-of-dhcp-server>
exit

Leave a Reply

Your email address will not be published. Required fields are marked *