SNMP stands for Simple Network Management Protocol. With this protocol, it is possible to get various information from network devices or to make the necessary setting
on them. For this purpose higher software language may be used as well as ready made applications. The most common of these is the "net-snmp". The components such as,
snmpget, snmpset, snmpwalk, snmptable, that come with this application help in the management of the network via the SNMP.
To clarify the matter in hand we are going to save the structure file on a Cisco 3750 switching device used on the METU network with tftp using SNMP. Later we are going
to assign a new user, again using SNMP on the device.
Let us make sure that SNMP is active on the device.
snmp-deneme# show running-config | include snmp
snmp-server community odtuRO RO
snmp-server community odtuRW RW
snmp-server contact firstname.lastname@example.org
snmp ifmib ifindex persist
As can be seen above two 'COMMUNITY's have been defined. The first of these (odtuRO) is read only and the other (odtuRW) is defined to be both read and write. Those
interested may refer to the SNMP documentation for more detailed information. Now, having made these definitions, we are going to perform a tftp file transfer with
Let us first complete the preparations at the backup location.
$ touch /tftpboot/yedek.10012009.cfg
$ chmod 777 /tftpboot/yedek.10012009.cfg
Now we have to run the command in a structure below
$ snmpset -c odtuRW -v 2c <Device IP ADDRESS> .188.8.131.52.184.108.40.206.1.55.<TFTP server IP ADDRESS> s bckup.10012009.cfg
$ snmpset -c odtuRW -v 2c 192.168.10.1 .220.127.116.11.18.104.22.168.22.214.171.124.10.10 s
Be aware that we have used the name of the CAN WRITE COMMUNITY. From here on, we can pick up the structure file of the device easily whenever we want. It may be made
possible to run this command every night automatically so as to maintain the daily back up of the structure file. There is a defined number called OID in SNMP for each
operation and variable. The number series starting with ".126.96.36.199." is an example for this.
If we wish to send a command to the device, we can perform this via SNMP as well. As an example let us consider the user defining procedure we have worked on earlier.
Firstly, we create our file with the command below:
$ echo "username denek password deneginSifresi" > /tftpboot/komut.gonder
Then let us run just the command with the different OID number as we have done with the previous example.
$ snmpset -c odtuRW -v 2c <Device IP ADDRESS> .188.8.131.52.184.108.40.206.1.50.<TFTP
server IP ADDRESS> octetstring komut.gonder
$ snmpset -c odtuRW -v 2c 192.168.10.1 .220.127.116.11.18.104.22.168.22.214.171.124.10.10
Thus the command we have sent will automatically be put into operation and a new user on the device will have been created.
It is possible to read and change many variables remotely by making use of OID numbers. To find out about all the OID numbers that are supported by the device you may
use the snmpwalk program or refer to the manuals of the device.