cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3239
Views
0
Helpful
4
Replies

SGE2010 How do I trigger backups via SNMP?

JeffreyDW
Level 1
Level 1

Hi there,

I have been trying, so far unsucessfully, to trigger backups to a TFTP server of our SGE201 switches. I have testesd TFTP backups via the web interface, and that does work. I need SNMP as I  need a scriptable method to trgiger the backups on a regular schedule. I am running the SNMP query from a RedHat Linux server. So far I have the following query work out, but it is failing:

snmpset -v 1 -c COMMUNITY SWITCH.MGMT.IP.ADDRESS 1.3.6.1.4.1.9.6.1.101.87.2.1.7 i 2 1.3.6.1.4.1.9.6.1.101.87.2.1.8 i 3  1.3.6.1.4.1.9.6.1.101.87.2.1.9 a TFTP.SERVER.IP.ADDRESS 1.3.6.1.4.1.9.6.1.101.87.2.1.11 s FILENAME 1.3.6.1.4.1.9.6.1.101.87.2.1.17 i 4

The error I am getting is generic, and the same query failed on multiple switches running Software Version 3.0.0.18. The switch is set with the community having full SNMP-admin access from the server's IP address.

If anyone here has been able to run SNMP triggered backups and would be willing to post their query and/or software that would be greatly appreciated. Any other suggestions, comments or advice is equally welcome. Thank you for your time.

1 Accepted Solution

Accepted Solutions

Ivor Diedricks
Cisco Employee
Cisco Employee

Jeff,

The procedure to download or upgrade the config via SNMP is as follows:

1) Download the MIB files we officially released from cisco.com

http://www.cisco.com/cisco/software/release.html?mdfid=282414069&flowid=3650&softwareid=283415684&release=3.0.0&relind=AVAILABLE&rellifecycle=&reltype=latest

2) Compile the MIB files on MIB browser e.g. MG-SOFT, SilverCreek. Make sure there is no compilation errors.

3) Configure SNMPv2 or SNMPv3 accordingly on SGE2010 switch

4) Look for CISCOSBCopy.mib file.

The OID is SNMPv2-SMI::enterprises(1.3.6.1.4.1).cisco(9).otherEnterpise(6).ciscosb(1).odm1(101).CISCOSBCopy(87)

Using rlCopyTable(2), create an new entry on this particular table:

    a. rlCopyRowStatus: 4 (createAndgo)

   b. rlCopySourceLocation: 1  (local)
    c. rlCopySourceIpAddress: 0.0.0.0

    d. rlCopySourceUnitNumber: 1
    e. rlCopySourceFileName: (blank)
    f. rlCopySourceFileType: 3 (startup config), 2 is for running config


    g. rlCopyDestinationLocation: 3 (tftp)
    h. rlCopyDestinationIpAddress: 192.168.10.22 (tftp server ip)

    i. rlCopyDestinationUnitNumber: 1
    j. rlCopyDestinationFileName:  0x61:62:63 (in hex, abc)

By doing that, it should able to backup device startup config from device to remove tftp server.

View solution in original post

4 Replies 4

Ivor Diedricks
Cisco Employee
Cisco Employee

Jeff,

The procedure to download or upgrade the config via SNMP is as follows:

1) Download the MIB files we officially released from cisco.com

http://www.cisco.com/cisco/software/release.html?mdfid=282414069&flowid=3650&softwareid=283415684&release=3.0.0&relind=AVAILABLE&rellifecycle=&reltype=latest

2) Compile the MIB files on MIB browser e.g. MG-SOFT, SilverCreek. Make sure there is no compilation errors.

3) Configure SNMPv2 or SNMPv3 accordingly on SGE2010 switch

4) Look for CISCOSBCopy.mib file.

The OID is SNMPv2-SMI::enterprises(1.3.6.1.4.1).cisco(9).otherEnterpise(6).ciscosb(1).odm1(101).CISCOSBCopy(87)

Using rlCopyTable(2), create an new entry on this particular table:

    a. rlCopyRowStatus: 4 (createAndgo)

   b. rlCopySourceLocation: 1  (local)
    c. rlCopySourceIpAddress: 0.0.0.0

    d. rlCopySourceUnitNumber: 1
    e. rlCopySourceFileName: (blank)
    f. rlCopySourceFileType: 3 (startup config), 2 is for running config


    g. rlCopyDestinationLocation: 3 (tftp)
    h. rlCopyDestinationIpAddress: 192.168.10.22 (tftp server ip)

    i. rlCopyDestinationUnitNumber: 1
    j. rlCopyDestinationFileName:  0x61:62:63 (in hex, abc)

By doing that, it should able to backup device startup config from device to remove tftp server.

Thank you,

Do you also have any particular recommendations for a command line Linux client to do this? I need something that is scriptable so it can be run against a number of switches at set intervals.

Edit:

For other's reference, the following works for me with snmpset, replace .999 with what ever ID you prefer:

snmpset -v 2c -c COMMUNITY -r 0 SWITCH.MGMT.IP.ADDRESS 1.3.6.1.4.1.9.6.1.101.87.2.1.11.999 s FILENAME 1.3.6.1.4.1.9.6.1.101.87.2.1.10.999 i 1 1.3.6.1.4.1.9.6.1.101.87.2.1.9.999 a TFTP.SERVER.IP.ADDRESS 1.3.6.1.4.1.9.6.1.101.87.2.1.8.999 i 3 1.3.6.1.4.1.9.6.1.101.87.2.1.7.999 i 2 1.3.6.1.4.1.9.6.1.101.87.2.1.5.999 i 1 1.3.6.1.4.1.9.6.1.101.87.2.1.4.999 a 0.0.0.0 1.3.6.1.4.1.9.6.1.101.87.2.1.3.999 i 1 1.3.6.1.4.1.9.6.1.101.87.2.1.17.999 i 4

Message was edited by: Jeff Whitehouse

Jeff,

Here's the info I got from my team. First and foremost, you don't need all of the parameters you showed, just the ones I here:

snmpset -v 2c -c public 10.5.233.57

1.3.6.1.4.1.9.6.1.101.87.2.1.17.1 i 4

1.3.6.1.4.1.9.6.1.101.87.2.1.3.1 i 1

1.3.6.1.4.1.9.6.1.101.87.2.1.7.1 i 2

1.3.6.1.4.1.9.6.1.101.87.2.1.8.1 i 3

1.3.6.1.4.1.9.6.1.10 1.87.2.1.9.1 a 10.5.71.7

1.3.6.1.4.1.9.6.1.101.87.2.1.11.1 s example1.txt

(here is "translation" for above -

Received Message Data {

      Error-Status: noError,

      Error-Index : 0,

      Bindings {

            CISCOSB-COPY-MIB:rlCopyRowStatus.1,

                  SNMPv2-TC:RowStatus,

                  "4"

            CISCOSB-COPY-MIB:rlCopySourceLocation.1,

                  CISCOSB-COPY-MIB:RlCopyLocationType,

                  "1"

            CISCOSB-COPY-MIB:rlCopySourceFileType.1,

                  CISCOSB-COPY-MIB:RlCopyFileType,

                  "2"

            CISCOSB-COPY-MIB:rlCopyDestinationLocation.1,

                  CISCOSB-COPY-MIB:RlCopyLocationType,

                  "3"

            CISCOSB-COPY-MIB:rlCopyDestinationIpAddress.1,

                  IpAddress,

                  "10.5.71.7"

            CISCOSB-COPY-MIB:rlCopyDestinationFileName.1,

                  SNMPv2-TC:DisplayString,

                  "example1.txt"

      }

)

hi sir,

 

.1.3.6.1.4.1.9.9.96.1.1.1.1.2. this snmp oid (COPY-CONFIG-COPY.MIB)working fine for core switch 2950 (ios version 12.1).  but, .1.3.6.1.4.1.9.9.96.1.1.1.1.2. oid doesnot works in sg300 switch (ios version 1.3.0.1).

 

community changed RW , please tell me snmp mib oid for sg300 switch for backup configuration.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Switch products supported in this community
Cisco Business Product Family
  • CBS110
  • CBS220
  • CBS250
  • CBS350
Cisco Switching Product Family
  • 110
  • 200
  • 220
  • 250
  • 300
  • 350
  • 350X
  • 550X