Usefull commands for programming a HP Switch
This post i mainly for my own bad memory, so bear with me if there ain’t no real structure, this i just a bunch of command all in one place 😀
.:Configuration:.
Menu ‘brings you into menu mode.
show running-config ‘show the current running config on screen
copy command-output “show running-config” TFTP x.x.x.x ” backupswitch.txt” ‘ Takes a backup of the running configuration
.:Firmware:.
copy flash tftp x.x.x.x “firmware.swi” primary ‘ Copies the file firmware.swi from your TFTP client into the primary ROM
.:VLAN:.
Show vlans ‘ returns a list of all present vlans
show vlans 13 ‘show detalied info about vlan 13
enter config
vlan 13 ‘puts you in configure mode of (vlan-13)
(vlan-13) name “Demo” ‘assigns the name demo to vlan 13
(vlan-13) untagged 20 or untagged 1-20 ‘untags either port 2wwww0 or 1 to 20, you can ofc also choose tagged
(vlan-13) ip address dhcp or x.x.x.x ‘assigns a IP address to this vlan, this IS A MOUST have when using switch as router
.:MAC address:.
show mac-address ‘show all learned MAC address on the switch
show mac-address 1 ‘shows all mac address seen on port 1 you can also use 1-5 which will show all on port 1 to 5
show mac-address 00:Fb:3e:21:aa:11 ‘shows which port that MAC address is located on
.:Routing:.
show ip route ‘shows all static routes on the switch
ip route x.x.x.x/24 y.y.y.y ‘ create a static route sending all packets to x.x.x.x to y.y.y.y
no ip route x.x.x.x/24 y.y.y.y ‘ removes the static route sending all packets to x.x.x.x to y.y.y.y
(vlan-xx) ip helper-address x.x.x.x ‘where to find the IP of a DHCP server
.:Management:.
show lldp info local-device ‘ shows info about the device you are currently connected to.
show lldp info remote-device ‘show which other LLDP enabled devices is connected to the device you work on and which ports they are connected to.
show lldp info remote-device 24 ‘shows detailed info about the remote device located on port 24
write memory ‘write running config
reboot ‘reboots the switch