Hp/CLI: Unterschied zwischen den Versionen

Aus SchnallIchNet
< Hp
Wechseln zu: Navigation, Suche
(Upgrade)
 
Zeile 152: Zeile 152:
  
  
 +
 +
=== Redundant Management Modules ===
 +
 +
Check Management Modules
 +
 +
<pre>
 +
# show redundancy
 +
 +
Configured Mode: Nonstop Switching
 +
Current Mode  : Nonstop Switching
 +
 +
Rapid Switchover Stale Timer : 90
 +
Failovers    : 0
 +
Last Failover :
 +
 +
Slot Module Description                      State    SW Version    Boot Image
 +
---- ---------------------------------------- -------- ------------- ----------
 +
MM1  HP J9827A Management Module 5400Rzl2    Active  KB.16.04.0009 Primary 
 +
MM2  HP J9827A Management Module 5400Rzl2    Standby  KB.16.04.0009 Primary
 +
</pre>
 +
 +
Copy the new firmware to whatever image partition you want.<br/>
 +
See 'Single Management Modules' if you dont know how that works.<br/>
 +
In this example I use the secondary.<br/><br/>
 +
 +
Change the default config for secondary partition:
 +
 +
startup-default secondary config config1
 +
 +
check the config file configuration:
 +
 +
<pre>
 +
# sh config file
 +
 +
Configuration files:
 +
 +
id | act pri sec | name
 +
---+-------------+------------------------------------------------
 +
  1 |  *  *  *  | config1
 +
  2 |            |
 +
  3 |            |
 +
</pre>
 +
 +
Set the system to boot from partition 'secondary' by default
 +
 +
boot set-default flash secondary
 +
 +
Check if everything is as expected
 +
 +
show flash
 +
show config files
 +
show redundancy
 +
 +
Write the memory to disk
 +
 +
wr mem
 +
 +
Now reboot the '''standby''' management module<br/>
 +
this will have no effect on the active running code version of the switch<br/>
 +
as only the standby module reboots to the new code version.
 +
 +
boot standby
 +
 +
!!! wait for secondary management module to be restarted !!!<br/>
 +
run:
 +
 +
show redundancy
 +
 +
Now failover to '''standby''' management module (!!! THIS is where outage occures !!!)
 +
 +
redundancy switchover
 +
 +
check lacp
 +
 +
sh lacp
 +
 +
ping some systems attached to the switches
  
 
== Auth ==
 
== Auth ==

Aktuelle Version vom 2. März 2022, 12:59 Uhr

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


Upgrade

Single Management Module

Enable SCP file transfers

ip ssh filetransfer

Show the current flash memory

# sh flash
Image             Size (bytes) Date     Version 
----------------- ------------ -------- --------------
Primary Image    :    33104874 10/13/17 KB.16.04.0009        
Secondary Image  :    18499135 08/24/15 KB.15.17.0008       

Boot ROM Version 
----------------
Primary Boot ROM Version   : KB.16.01.0006
Secondary Boot ROM Version : KB.16.01.0006

Default Boot Image   : Primary
Default Boot ROM     : Primary

Copy your local image to the switch:
If you want to update the primary flash use path: /os/primary
primary and secondary are the actual filenames - No directories!!

scp tmp/coresw/KB_16_09_0019.swi coresw2:/os/secondary

Show the flash again and notice the new version on the image you upgraded:

sh flash
Image             Size (bytes) Date     Version 
----------------- ------------ -------- --------------
Primary Image    :    33104874 10/13/17 KB.16.04.0009
Secondary Image  :    34246053 12/10/21 KB.16.09.0019

Boot ROM Version 
----------------
Primary Boot ROM Version   : KB.16.01.0006
Secondary Boot ROM Version : KB.16.01.0006

Default Boot Image   : Primary
Default Boot ROM     : Primary

Now check availability of multiple config files and
which one is used for each partition.

# !!!!!!!!!!!! This needs to be checked !!!!!!!!!!!!
# Show the available config files as there might be more than one! 
# This will show you which config exists, is actually running (act), which will be started if booting 
# primary boot image (pri) and which one will be started if booting from secondary partition/image

ff3coresw01# sh config files

Configuration files:

 id | act pri sec | name
 ---+-------------+------------------------------------------------
  1 |  *   *      | config1
  2 |          *  | config2
  3 |             |

As you can see above:

  1. The current running-config is config1 and this is also used by default if booting the primary flash
  2. The default config for booting the secondary flash image would be config2, which nobody knows what it does.
  3. If needed list the configs by: show config config-filname
  4. Change defaults for flash image 'secondary' to also use config1 by default.
startup-default secondary config config1

and check the result:

sh config files 

Configuration files:

 id | act pri sec | name
 ---+-------------+------------------------------------------------
  1 |  *   *   *  | config1
  2 |             | config2
  3 |             |

As you can see: config1 will be used by default if booting from the secondary image now.

Reboot system now:

boot system flash secondary 

or specify the config to use with your reboot command:

boot system flash secondary config config2

Be careful as I assume that will not change any defaults and
might mess up your config on unexpected reboot!


Redundant Management Modules

Check Management Modules

# show redundancy 

 Configured Mode: Nonstop Switching 
 Current Mode   : Nonstop Switching

 Rapid Switchover Stale Timer : 90
 Failovers     : 0
 Last Failover : 

Slot Module Description                       State    SW Version    Boot Image
---- ---------------------------------------- -------- ------------- ----------
MM1  HP J9827A Management Module 5400Rzl2     Active   KB.16.04.0009 Primary  
MM2  HP J9827A Management Module 5400Rzl2     Standby  KB.16.04.0009 Primary

Copy the new firmware to whatever image partition you want.
See 'Single Management Modules' if you dont know how that works.
In this example I use the secondary.

Change the default config for secondary partition:

startup-default secondary config config1

check the config file configuration:

# sh config file

Configuration files:

 id | act pri sec | name
 ---+-------------+------------------------------------------------
  1 |  *   *   *  | config1
  2 |             |
  3 |             |

Set the system to boot from partition 'secondary' by default

boot set-default flash secondary

Check if everything is as expected

show flash
show config files
show redundancy

Write the memory to disk

wr mem

Now reboot the standby management module
this will have no effect on the active running code version of the switch
as only the standby module reboots to the new code version.

boot standby

!!! wait for secondary management module to be restarted !!!
run:

show redundancy

Now failover to standby management module (!!! THIS is where outage occures !!!)

redundancy switchover

check lacp

sh lacp

ping some systems attached to the switches

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.