|
|
|
SNMP Made Simple - Simple Network Management ProtocolBy Asif Khan R At some point or other, if you are working with networks, you would have heard this term. The full form of this is much simpler and gives more confidence to use than the abbreviation. It stands for Simple Network Management Protocol. As the full form suggests, it is really simple. You need some sort of rules that can be understand between what you manage and yourself. This is the protocol part. And what you end up finally doing with it is Managing the Network. To begin with, it starts with managing a simple element or agent and then you decide to add more and more agents. Now you have a network of agents and you want to monitor and manage then using some application and this application would be termed as the manager. This is done in a simple way and hence it is called Simple Network Management Protocol. Of course it is simple if you only want to use it. If you want to develop SNMP itself, then this is not the article for you. First, let us decide on what to manage. Let us say a router or a switch or a computer for example, we need to have some software or something inside that will speak our language and will do what it is asked to do. If he starts understanding complex language, then it become difficult. So we teach the agent only 3 commands. And we have the manager who will issue some of these commands and also understand something the agent sends. This is the protocol we agree between the agent and the manager. It is termed SNMP and it is as simple as what we have just read. Now, what are all the things you would like to do on a router? Let us try to classify them. You would like to get the status of the router, get some important parameters on the router and get the current activities on the router. A verb which is common in all of theses tasks which we are planning to do is the word “get”. This is the first classification. So SNMP supports a command called the “GET” request. Now once you decide that you have to do a get, of course you will also know before hand what is that you want to get. Do you want to get the status, the parameter or the activities? These terms and the tasks would be different for each and every device. So how do we solve this problem? We could use a string and say that we want to get this string. Or we could do it based on some identifier and identify each of the element which we are interested in uniquely. This is what SNMP does and this is what is in broad terms meant by OID. So if you want to get the parameters of the router, you first need to know the address of the router. This is a IP address and then you also need to know what parameter you need on the router. Since we need to identify this parameter, we need to look up at something called the MIB and identify what is the OID of the parameter which we require to get it from the router. And we make our SNMP request of “GET” and the agent which is sitting on the router understands our language or protocol and replies back with the details as requested by the request. Now we have got some parameters from the router agent. We find that something is not as expected and we need to modify something more or ask the router to do some additional task or may be ask the router to download a new software that we know is available and bug free and which the router vendor has mentioned that we need to apply. Here in this case, we need to trigger some change operations. This is provided by a “SET” request in SNMP. As before as we have done with the “GET”, we need to identify which router we are interested in and which parameter we are interested in and we then identify the OID from the MIB and send it. The agent now again understands our protocol and will set the parameters which we have provided. One question that would be on your mind now, is how does just setting the variable help in making changes to the router. Sometimes the parameter is as simple as increasing for example the capacity of the router and sometimes it is much more than that. I would explain to you with an example of my first project which was software download. Assume that you have got a new software that you want the router to install. Of course the router is not like a windows machine, where you have a colourful big monitor and you do a series of clicks and everything is installed. Most probably what would need to be done would be the following. Place the software on some FTP server. Give the location of the FTP server and the user name and the password and the location of the file to someone and ask him to pick it up and give it to the router. This someone is our agent in the router. So what we do in this case is the following, we set some variables in the router that corresponds to the FTP server address, set one more variable that corresponds to the user name and again set one more variable to indicate the password of the FTP server and finally also set the variable to tell him where the new software is located. All “SET” operations are done by the SNMP manager to the agent on the router. Finally we ask the agent to initiate the software installation. This is again done using a “SET” operation on a particular control MIB variable for software download. Once this MIB variable is set on the agent, the software on the agent is now clever enough to know that it has to look at a series of MIB variables on the agent to identify the software location, get it and then starts the download of the software and would also probably install it. This the second class of operations that SNMP supports, the “SET” operation. With this example we realize the power of the “SET” operations though it is just a simple “SET” operation with respect to SNMP. Finally, we would like to get some notifications from the router if something seriously is wrong in the router and this is also supported by SNMP. The first 2 types of operation are initiated from the SNMP manager and the third type is initiated by the SNMP agent itself. The agent has to be configured as to whom he has to send notifications and once this is configured, whenever the agent thinks is right, would send a trap to the SNMP manager and the SNMP manager can decide to do something as simple or complicated as ignoring it or sending a SMS to the operator incharge of the router to indicate the severity of the issues and also escalate it to the operator’s manager and not the SNMP manager in this case :). This is the third classification from SNMP, that it supports “TRAP”. Once you have understood the three operations supported by SNMP, you have understood more or less what SNMP is. Article Source: http://EzineArticles.com/?expert=Asif_Khan_R Related Posts Comments |
Sponsored Links |