The Management of Network Devices with SNMP
 
 Contents
 Social Sites on the
 Network
 The Management of
 Network Devices with
 SNMP
 Moodle and Sakai
 Platforms
 What is Free RADIUS?
 CISN Archive
 Send Feedback
 
     
 

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 hot-line@metu.edu.tr
snmp ifmib ifindex persist
snmp-trial#

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 snmpset. 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> .1.3.6.1.4.1.9.2.1.55.<TFTP server IP ADDRESS> s bckup.10012009.cfg

For example;
$ snmpset -c odtuRW -v 2c 192.168.10.1 .1.3.6.1.4.1.9.2.1.55.192.168.10.10 s bckup.10012009.cfg

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 ".1.3.6.1." 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> .1.3.6.1.4.1.9.2.1.50.<TFTP server IP ADDRESS> octetstring komut.gonder

For example;
$ snmpset -c odtuRW -v 2c 192.168.10.1 .1.3.6.1.4.1.9.2.1.50.192.168.10.10 octetstring komut.gonder

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.

Hüsnü Demir

 
     
  - TOP -