#!/bin/bash # copy ProCurve config from switches to local files # SNMP RW comunity RWCOMMUNITY="private" # Network segment (last octet) where switches are located. # in my case - 10.0.0.100 - 10.0.0.150 for i in `seq 100 150` do snmpbulkwalk -t 1 -r 1 -v2c -c public 10.0.0.$i sysName $>/dev/null && \ swName=$(snmpbulkwalk -t 1 -r 1 -v2c -c public 10.0.0.$i sysName -OvQ) && \ echo -en 10.0.0.$i"\t" $swName"\n" && \ snmpset -v 2c -c "$RWCOMMUNITY" 10.0.0.$i 1.3.6.1.4.1.11.2.14.11.5.1.7.1.5.6.0 i 2 && \ tftp 10.0.0.$i -c get running-config $swName.cfg && \ snmpset -v 2c -c "$RWCOMMUNITY" 10.0.0.$i 1.3.6.1.4.1.11.2.14.11.5.1.7.1.5.6.0 i 1 doneFound via http://h30499.www3.hp.com/t5/Switches-Hubs-Modems-Legacy-ITRC/Backup-Procurve-Config-via-SNMP/m-p/3620644#M5881
sestdiena, 2013. gada 28. decembris
Automatic config backup from HP ProCurve switches
Abonēt:
Ziņas (Atom)