SNMP used to monitor Network Element performance and also used to remotely modify the configuration of the Network Elements.
This was initially developed for monitoring the Network routers and switches, eventually it has been used to monitor wide variety of hardware devices like windows and linux machines, printers and Inverters etc..
There are two important terminology been used in SNMP world, they are
OID (Object Identifier)
Everything on the Device which can be monitored will have an Identifier which is called OID, these are represented in the form of numbers separated by period.
OID: 1.2.40...56
we can think of it like an IP address for a machine, unlike IP, OID is an identification of the things we can monitor for a given device.
when SNMP client wants to monitor total number of packets transferred through a given router, client will send the OID for "TotalTraffic" to the router and get the number of packets routed in response.
MIB (Management Information Base)
MIB is a word representation of an OID/OID's. we can easily remember MIB since it is represented in words rather than sequence of number like OID.
we can always send OID's instead of MIB, but MIB makes the life easy to remember the basic SNMP commands and do not have to remember OID for each of the device since most of the basic OID's comes in wrapped with a MIB
For example if we want to know the up time of a switch, router or linux machine, we just have to send MIB
sysuptime.0
instead of remembering 3 different OID to get the response from 3 different NE's it is good enough to remember just one MIB. The best way to know different supported OID and MIB is referring the device user manual.
Network Monitoring applications send
SNMP Polling request to port 161 to connect to the device and request value for a OID or MIB.
in response NE will Notify Network Monitoring application with the values to port 162. these messages also called traps, Notification or informs
There are 3 versions of SNMP v1, v2c and v3. major difference between v1,v2c and v3 are
- v3 is more secured compared to other two.
- in v1 and v2c we do not have to send username, we just have to pass in "Community String" to connect to the NE.
- but in v3 it is mandatory send username and password. again NE should be supporting v3. majority of the old NE are still on v1 or v2c.
- v1 and v2c does not entry the data while v3 support encryption