Backup configuration file to a TFTP server using SNMP

Issue Description

Saving the configuration on devices after every change made is very important to keep the network stable if something goes wrong. One rebooting switch can cause 5-6 minutes of downtime if it loads the last up-to-date  configuration from flash and everything comes to normal. Not having the last configuration loaded on such device, after rebooting may cause serious problems even loops producing much more downtime.
Another safety measure is to keep configuration copies on a external server. If you want to replace a damaged switch you will have to redo the configuration on the new one because the file from the broken one may be lost. In this case, the configuration file can be copied from the external server
An easy way to backup configs on an server is to make a NMS to save configuration files for you.

Solution

The next OID shows you how to backup configuration files from Huawei S5700 switches on a TFTP server.

snmpset -v2c -c Root@456 10.0.0.1 1.3.6.1.4.1.2011.6.10.1.2.4.1.2.3 i 3 1.3.6.1.4.1.2011.6.10.1.2.4.1.3.3 i 21.3.6.1.4.1.2011.6.10.1.2.4.1.4.3 s current.cfg 1.3.6.1.4.1.2011.6.10.1.2.4.1.5.3 a 10.0.0.1001.3.6.1.4.1.2011.6.10.1.2.4.1.9.3 i 4

Root@123 is the write community
10.0.0.1 is the ip address of the switch
3 for copying running configuration to network
2 for using tftp
current.cfg is the destination filename
10.0.0.100 is the ip address of the tftp server
4 means creating the table
.3 is a index
1. if it is not entered, there will be “Error in packet.Reason: noCreation (That table does not support row creation or that object can not ever be created.”
2. make sure the index is not used, if the index has been used there will be “Reason: inconsistentValue (The set value is illegal or unsupported in some way)”

to release  the  index 3(6 means delete)
snmpset -v2c -c Root@456 10.0.0.1 1.3.6.1.4.1.2011.6.10.1.2.4.1.9.3 i 6

More related switches:

S5700-10P-LI-AC

S6720-30C-EI-24S-AC

S2309TP-EI-AC

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s