Thursday, January 27, 2011

Possible to configure Cisco switch (IOS) via SNMP?

Is it possible to configure a Cisco switch running IOS via SNMP? I know there is a method for initiating a TFTP copy via SNMP (doc), but is there something like port level config directly from SNMP writes?

Alternatively, is there a way to initiate transferring a configuration snippet to apply, rather than replacing the entire configuration?

Let me know if you'd like anything clarified. I'm trying to avoid using Expect or anything that is not similar to accessing an API.

  • I honestly don't know of any reason you can't configure IOS via SNMP... however I would suggest NOT doing it. SNMP is very insecure. If you're not worried about security, you can simply dump your config changes into a text file & blindly replay them into a telnet session... which I would also recommend not doing.

    L.R. : It is true that SNMP v1 and v2c do not provide any serious security (anyone can read plain text packet content), but SNMPv3 is quite secure - it provides content encryption and authentication.
    brent : Exactly L.R. To TheCompWiz, I specifically wanted to avoid using something like Expect (which allows telnet scripting).
    From TheCompWiz
  • To answer my own question, it doesn't look like Cisco provides high granularity configuration via SNMP (e.g., port configuration), but it does provide a method for initiating a FTP/TFTP/SCP config copy to the switch. This copy can be performed to the running configuration which allows merging. This means a configuration snippet could be written to a text file, then TFTP'd to the switch which will merge with the running config, rather than replacing it. If copying to the start configuration, a merge operation is not done, so it replaces the entire config. An important distinction ;)

    Details here: http://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a0080094aa6.shtml

    From brent

0 comments:

Post a Comment