Hp/CLI: Unterschied zwischen den Versionen
Cbs (Diskussion | Beiträge) |
Cbs (Diskussion | Beiträge) |
||
Zeile 65: | Zeile 65: | ||
reset interface stats of interface 26 | reset interface stats of interface 26 | ||
+ | |||
+ | |||
+ | == 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" | ||
Version vom 10. Mai 2019, 08:42 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!
DONOT(!!):
write mem
If everything is fine with your config:
no reload
will cancel 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
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.