Hp/CLI: Unterschied zwischen den Versionen
Cbs (Diskussion | Beiträge) |
Cbs (Diskussion | Beiträge) (→Interfaces) |
||
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
+ | == ProCurve Cheat Sheet == | ||
+ | |||
+ | see also: [[HP/ProCurve_CLI_CheatSheet]] | ||
+ | |||
+ | |||
+ | == Reset to default config == | ||
+ | |||
+ | erase startup-config | ||
+ | |||
+ | |||
+ | == reload after/at (critical changes) == | ||
+ | |||
+ | doing critical changes?<br/> | ||
+ | <br/> | ||
+ | beore you do your changes: | ||
+ | |||
+ | reload after 15 | ||
+ | |||
+ | will reload the switch after 15 minutes | ||
+ | |||
+ | reload at 21:30 | ||
+ | |||
+ | will reload the switch at 21:30 | ||
+ | |||
+ | show reload after | ||
+ | |||
+ | or | ||
+ | |||
+ | show reload at | ||
+ | |||
+ | will show you if a reload is scheduled | ||
+ | |||
+ | Do your changes now!<br/> | ||
+ | |||
+ | DO NOT(!!) do a 'write mem' | ||
+ | |||
+ | Verify everything is working as expected.<br/> | ||
+ | If it is, stop the reload timer: | ||
+ | |||
+ | no reload | ||
+ | |||
+ | will cancel the scheduled reload | ||
+ | |||
+ | write mem | ||
+ | |||
+ | writes your running config to flash | ||
+ | |||
+ | == Auth == | ||
+ | |||
+ | Set/Change Authorization | ||
+ | |||
+ | (config)# no password manager | ||
+ | Password protection for manager will be deleted, continue [y/n]? y | ||
+ | |||
+ | password manager user-name <USERNAME> plaintext <PASSWORD> | ||
+ | |||
+ | |||
+ | == Interfaces == | ||
+ | |||
+ | |||
+ | === reset counters === | ||
+ | |||
+ | clear statistics 26 | ||
+ | |||
+ | reset interface stats of interface 26 | ||
+ | |||
+ | |||
+ | === find switchport of device === | ||
+ | |||
+ | # ping 192.168.251.2 | ||
+ | |||
+ | # show arp | ||
+ | |||
+ | IP ARP table | ||
+ | |||
+ | IP Address MAC Address Type Port | ||
+ | --------------- ----------------- ------- ---- | ||
+ | 192.168.251.1 e8b748-c757b0 dynamic 13 | ||
+ | 192.168.251.2 005056-a61c1c dynamic 5 << It’s on port 5 | ||
+ | 192.168.251.5 005056-a606d9 dynamic 7 | ||
+ | |||
+ | If you already know the MAC: | ||
+ | |||
+ | # show mac-address 005056-a61c1c | ||
+ | |||
+ | Status and Counters - Address Table - 005056-a61c1c | ||
+ | |||
+ | Port | ||
+ | ------- | ||
+ | 5 | ||
+ | |||
+ | == oneLiners == | ||
+ | |||
+ | |||
+ | === is VLAN X in use? === | ||
+ | |||
+ | This command will show if the switch learned any MAC addresses on VLAN 302 | ||
+ | |||
+ | sh mac-address | inc " 302" | ||
+ | |||
== sflow == | == sflow == | ||
Zeile 51: | Zeile 151: | ||
− | == sFlow on ProCurve 2610 == | + | === sFlow on ProCurve 2610 === |
Shamelessly stolen from: [https://thwack.solarwinds.com/thread/23881 https://thwack.solarwinds.com/thread/23881] | Shamelessly stolen from: [https://thwack.solarwinds.com/thread/23881 https://thwack.solarwinds.com/thread/23881] |
Version vom 11. September 2020, 10:22 Uhr
Inhaltsverzeichnis
ProCurve Cheat Sheet
see also: HP/ProCurve_CLI_CheatSheet
Reset to default config
erase startup-config
reload after/at (critical changes)
doing critical changes?
beore you do your changes:
reload after 15
will reload the switch after 15 minutes
reload at 21:30
will reload the switch at 21:30
show reload after
or
show reload at
will show you if a reload is scheduled
Do your changes now!
DO NOT(!!) do a 'write mem'
Verify everything is working as expected.
If it is, stop the reload timer:
no reload
will cancel the scheduled reload
write mem
writes your running config to flash
Auth
Set/Change Authorization
(config)# no password manager Password protection for manager will be deleted, continue [y/n]? y
password manager user-name <USERNAME> plaintext <PASSWORD>
Interfaces
reset counters
clear statistics 26
reset interface stats of interface 26
find switchport of device
# ping 192.168.251.2
# show arp IP ARP table IP Address MAC Address Type Port --------------- ----------------- ------- ---- 192.168.251.1 e8b748-c757b0 dynamic 13 192.168.251.2 005056-a61c1c dynamic 5 << It’s on port 5 192.168.251.5 005056-a606d9 dynamic 7
If you already know the MAC:
# show mac-address 005056-a61c1c Status and Counters - Address Table - 005056-a61c1c Port ------- 5
oneLiners
is VLAN X in use?
This command will show if the switch learned any MAC addresses on VLAN 302
sh mac-address | inc " 302"
sflow
yadda
Configuring sFlow
[no] sflow <instance-Nr.> destination <ip-address> [udp-port-num]
Enables an sFlow receiver/destination. The receiver-instance number must be a 1, 2, or 3.
By default, the udp destination port number is 6343.
To disable an sFlow receiver/destination, enter no sflow receiver-instance.
sflow <instance-Nr.> sampling <PORT-LIST> sampling <rate>
Once an sFlow receiver/destination has been enabled, this command enables flow sampling for that instance.
The receiver-instance number is 1, 2, or 3, and the sampling rate is the allowable non-zero skipcount for the specified port or ports.
A good starting point for sampling rate is 500 on high volume switches rais this value to 2000 or 5000.
To disable flow-sampling for the specified <PORT-LIST> repeat the above command with a sampling rate of 0.
sflow <instance-Nr.> polling <PORT-LIST> polling <interval>
Once an sFlow receiver/destination has been enabled, this command enables counter polling for that instance.
The receiver-instance number is 1, 2, or 3, and the polling interval may be set to an allowable non-zero value to enable polling on the specified port or ports.
A good starting point for polling interval is 20.
To disable counter-polling for the specified <PORT-LIST>, repeat the above command with a polling interval of 0.
Viewing sFlow Configuration and Status
Show agent info:
show sflow agent
Show instance destination IP:
show sflow <instance-Nr.> destination
Show sampling/polling configuration:
show sflow <instance-Nr.> sampling-polling <PORT-LIST/range>
sFlow on ProCurve 2610
Shamelessly stolen from: https://thwack.solarwinds.com/thread/23881
For a HP Procurve 2610 sflow needs to be enabled. You do this by modifying mib variables.
Red items are variables you need to change. Notes on Red Items below
The following needs to be run in config mode:
setmib sFlowRcvrAddress.1 -o c0a80001 ^---- The IP address of the receiver in HEX setmib sFlowRcvrPort.1 -i 2055 ^---- Listen-Port of the receiver server setmib sFlowRcvrOwner.1 -D OwnerName sFlowRcvrTimeout.1 -i 214748364 setmib sFlowFsPacketSamplingRate.11.1.3.6.1.2.1.2.2.1.1.1.1 -i 37 setmib sFlowFsPacketSamplingRate.11.1.3.6.1.2.1.2.2.1.1.2.1 -i 37 setmib sFlowFsPacketSamplingRate.11.1.3.6.1.2.1.2.2.1.1.3.1 -i 37 setmib sFlowFsPacketSamplingRate.11.1.3.6.1.2.1.2.2.1.1.4.1 -i 37 ^--- This one is the Switchport to set Sampling Rate on setmib sFlowFsReceiver.11.1.3.6.1.2.1.2.2.1.1.1.1 -i 1 setmib sFlowFsReceiver.11.1.3.6.1.2.1.2.2.1.1.2.1 -i 1 setmib sFlowFsReceiver.11.1.3.6.1.2.1.2.2.1.1.3.1 -i 1 setmib sFlowFsReceiver.11.1.3.6.1.2.1.2.2.1.1.4.1 -i 1 ^---- This one is the Switchport to set the ENABLE Bit on
sFlowRcvrAddress is the hex IP address for the NetFlow Server.
sFlowRcvrPort is the port that Netflow is received on on the NetFlow server. Note: 2055 is default.
sFlowRcvrOwner is the owner tag in show sflow destination as far as I can tell it is simply descriptive.
sFlowRcvrTimeout is the amount of time to transmit sflow data to the destination. sflow will stop after this timer runs out. 214748364 = ~6.8 years.
The numbers highlighted in the mib variable strings are the ports that the variables are set on.
sFlowFsPacketSamplingRate is the packet sampling rate the faster the sampling the more accurate the data (and likely the slower the packet transfer from the overhead).
sFlowFsReceiver is the sflow enable bit.