Spencer’s IT Tips & Tidbits: Automate HP Switch Config Backup

‘——–Start Of Script——–
Option Explicit
On Error Resume Next
Dim WshShell, strIP, strTFTP, strFile, strPassHP, strUser
Dim filesys, filetxt

strFile = « list_switch.txt »
strTFTP = « TFTP Server »
strUser = « manager »
strPassHP = « Password »

‘Opens IP address file for reading
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set filesys = CreateObject(« Scripting.FileSystemObject »)
Set filetxt = filesys.OpenTextFile(strFile, ForReading, True)

‘Opens the command prompt
set WshShell = CreateObject(« WScript.Shell »)
WshShell.run « cmd.exe »
WScript.Sleep 1000

Do While Not filetxt.AtEndOfStream
strIP = filetxt.ReadLine
Copy(strIP)
Loop

filetxt.Close
set WshShell = Nothing
set filesys = Nothing
WScript.Quit

Function Copy(strIP)
WshShell.SendKeys « telnet « & strIP
WshShell.SendKeys (« {Enter} »)
WScript.Sleep 1000
WshShell.SendKeys strUser
WshShell.SendKeys (« {Enter} »)
‘WshShell.SendKeys « p »
WshShell.SendKeys strPassHP
WshShell.SendKeys (« {Enter} »)
WshShell.SendKeys « copy running-config tftp  » & strTFTP &  »  » & strIP & « .txt »
WshShell.SendKeys (« {Enter} »)
WshShell.SendKeys « ^z »
WshShell.SendKeys « ^z »
WshShell.SendKeys « y »
WScript.Sleep 2000
WshShell.SendKeys (« {Enter} »)
End Function
‘——–End Of Script——–

Source : Spencer’s IT Tips & Tidbits: Automate HP Switch Config Backup

Spencer’s IT Tips & Tidbits: Automate HP Switch Config Backup

HP 5900AF – quelques commandes

# passage en mode conf

system-view

 

#nom du switch

sysname « NOM »

 

#configuration IP de l’interface de MGMT physique

interface interface M-GigabitEthernet 0/0/0

ip address 192.168.32.X 255.255.255.0

Lire la suite « HP 5900AF – quelques commandes »

HP 5900AF – quelques commandes

HP 5900AF INITIAL SETUP & IRF CONFIGURATION

For a complex project with many moving pieces, finding the right place to start can be difficult. We want to make sure we have a good foundation so that there will be less stress as we continue to add components. In order to accomplish this, I chose to start with the configuration of the Top-of-Rack HP 5900AF switches.

suite: http://infrastructurewarfare.com/projects/bare-metal-deployment/hp-5900af-initial-setup-irf-configuration/

HP 5900AF INITIAL SETUP & IRF CONFIGURATION

HP Procurve Networking Initial Setup

source: http://www.sysadmintutorials.com/tutorials/hp/hp-procurve-setup/

Note: HP Procurve Networking Configuration will be done via the CLI and assumes you have a console connection to the switch and are in configure mode. Enter configure mode by typeing configure.

Setting a hostname

  1. hostname “Coreswitch” (Include quotations”)

Setting an ip address to the default vlan

  • vlan 1
  • ip address 192.168.1.1 255.255.255.0
  • exit

Setting a default route

  • ip default-gateway 192.168.1.254

Lire la suite « HP Procurve Networking Initial Setup »

HP Procurve Networking Initial Setup