What are the basic commands of the SNMP protocol?
The simplicity of information exchange in the SNMP protocol has made this protocol widely used. Here are the basic SNMP commands:
Get: The Get command is a request for information sent by the Manager to the Managed Device to receive one or more values from it.
Get Next: This command is similar to the Get command, the main difference between the two commands is that Get Next calls the next OID value in the MIB tree.
Get Bulk: GetBulk is used to receive large amounts of data from large MIB tables.
Set: With this command, a Manager can change the values of some Managed Device settings.
TRAPS: Unlike the above commands sent by the NMS to the target device, the traps are sent by the devices to the NMS at the time of the specified events.
INFORM: This command, like TRAP, is sent to the NMS by the Agent, in addition to which the Managers use this command to confirm the receipt of information.
RESPONSE: Used to return values or signals directed by the Manager.
What is the use of SNMP TRAP?
With SNMP TRAP, devices can send a message to the Manager when an important event occurs, notifying them of the event. In a TRAP message, the sysUpTime value is sent with the OID indicating the type of event as well as the corresponding values if any.
The destination of the TRAP send is specified according to the settings made and the format of these messages has been changed to SNMPv2 and renamed to SNMPv2-Trap.
Familiarity with SNMP protocol information exchange method
As mentioned, the SNMP protocol is a subset of the TCP / IP protocol, and SNMP messages and commands are transmitted over the Network Datagram Protocol (UDP) packets.
By default, the SNMP port number is 161, and the TRAP / INFORM commands use port 162.
Familiarity with different versions of SNMP protocol
Since the introduction of SNMP, this protocol has undergone extensive changes and has been continuously upgraded.
However, SNMPv1 and SNMPv2 versions still have the most implementations.
Support for the third version, or SNMPv3, has been in earnest for some time, but despite much higher security, it has not yet gained much traction.
SNMPv1
This is the first version of SNMP defined in RFCs 1155 and 1157.
SNMPv2
This is a revised version of SNMPv1 that has undergone many optimizations, including packet type, swap method, and even MIB structure.
SNMPv3
This is the most secure and latest version of SNMP. Apart from the fact that performance has been upgraded in every version of SNMP, there has always been a great emphasis on the need to pay attention to the security of this protocol, and therefore in this version, the method of authentication and data encryption has been implemented.
What is the Community String parameter?
Versions 1 and 2 of the SNMP protocol use the Community String to check permissions for access to SNMP values. In fact, this Community String acts like a username and password here. Monitoring software, such as Bina software, must send the Community String value to the target device in each SNMP command, and the target device will only respond if the value sent is correct.
Many devices that support SNMP set the public value for their Community String by default, and it is the network administrator's job to change this value on all devices.
Note that the SNMPv3 version no longer has a Community String, and in this version authentication is done by username and password.
Which version of SNMP should we use?
The answer to this question depends on your network environment, here are some general principles:
If your network is accessible over the Internet, you may need to consider SNMPv3, as it is much better in terms of security, but you should also consider that encryption and security enhancements on this version will increase the workload of the devices to some extent. As a result, performance slows down.
If your network is well protected by firewalls, using SNMPv1 and SNMPv2 versions may be sufficient.
From a monitoring point of view, for example, for monitoring devices with Bina software, we recommend using the SNMPv2 protocol, which has a lower scan time and supports 64-bit counters.
Thank you.