HPswitch

From Piszczynski

Basic commands

Config

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

handy

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

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

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

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

View MAC Address tables

Listing all learned MAC addresses on the switch, with the port number on which each MAC address was learned

show mac-address

Listing all learned MAC addresses on one or more ports, with their corresponding port numbers For example, to list the learned MAC address on ports A1 through A4 and port A6:

show mac-address a1-a4,a6

Listing all learned MAC addresses on a VLAN, with their port numbers This command lists the MAC addresses associated with the ports for a given VLAN. For example:

show mac-address vlan 100