4

I have a cisco switch that supports CLI, SNMP, and NETCONF for management issues. I should develop an application for managing the switch which should include monitoring and also configuring operations.

I know NETCONF is the best choice among these options for programming issues, but my supervisor emphasizes that the solution should be more general because all switches haven't NETCONF capability.

So I have two other options: CLI and SNMP. Personally, I think SNMP should be a better choice but I have a question.

Most internet pages insist that SNMP is good for monitoring purposes, not for configuration. so I want to know what are consequences of using SNMP for configuration? in other words, what troubles I will face with them?. in other words, what limitations it brings for my manager application?

I know SNMP hasn't transaction mechanism. So I will not send set requests in batches.

1
  • 1
    The "general" requirement seems strange. Indeed, not all switches understand NETCONF; but switches from the same family usually either all do, or all don't understand NETCONF. Developing switch management application that can work across product families is quite a large task, you would have to solve much more difficult problems that available management protocols.
    – volferine
    Mar 2, 2022 at 15:33

1 Answer 1

5

Questions that generate mostly opinion-based answers are off limits here, so we can’t really talk about why someone should or shouldn’t do something like this.

As far as purely technical points go, if you choose to use SNMP, you will need to do some base system configurations to make SNMP work (such as defining community strings (in the cases of SNMPv1/2c), usernames/passwords and encryption/hashing (in the case of SNMPv3), which host(s) to allow to talk to them, etc.), then set up the host you intend to configure the switches from, install the utilit(y/ies) to push the “write” from. There is then the issue of not knowing whether it actually succeeded since there isn’t a response sent back, so you would need to query SNMP after every “write” in order to test that the command was sent and accepted correctly.

With a straight CLI setup, you mostly just need to assign the switches IP addresses and define the login info. Sending commands will either work or won’t, and if it doesn’t work it tells you it didn’t work and why (in most cases).

5
  • dear Jesse does finding proper oid in snmp is well documented and easy? and could i do all operations in snmp?
    – hamed
    Mar 1, 2022 at 20:35
  • 1
    @hamed Please do not crosspost. Your question is off-topic at SO which is about developing software.
    – Zac67
    Mar 1, 2022 at 20:39
  • 1
    @hamed I can’t answer that without knowing the brand and model of your switches, but generally yes. Most manufacturers have their OIDs and MIBs listed out on their support sites. Some also have them in downloadable formats to allow you to import into a monitoring system.
    – Jesse P.
    Mar 1, 2022 at 20:39
  • 2
    The biggest problems with SNMP is that it is anything but S and arguably not very M either. Mar 2, 2022 at 6:14
  • 1
    @JörgWMittag The N isn’t even always the case. At least it’s definitely a P. Right? Mar 2, 2022 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.