Possible to configure Cisco switch (IOS) via SNMP?

14,931

Solution 1

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

Solution 2

Yes it is possible. See this tech note about configuring VLANs for an example.

You can see which MIBs are supported on your switch by running the command show snmp mib from an enabled terminal.

Share:
14,931
brent
Author by

brent

system administrator

Updated on September 17, 2022

Comments

  • brent
    brent over 1 year

    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.

  • bart van deenen
    bart van deenen over 13 years
    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
    brent over 13 years
    Exactly L.R. To TheCompWiz, I specifically wanted to avoid using something like Expect (which allows telnet scripting).
  • Michael Hampton
    Michael Hampton over 9 years
    You appear to have misunderstood the question. The user wants to know how to change the configuration of the router via SNMP, not how to obtain it.
  • Felix Frank
    Felix Frank over 9 years
    Yes, this answer was created through a respectable effort, but seems to miss the question almost completely.
  • Cody Hartley
    Cody Hartley over 9 years
    The correct response was already posted that any configuration element in the running config could be sent to the device and would merge any configurations with the running configuration. My post was just adding details for those looking to use snmpv3 and scp. I did not change the source and dest file type, but anyone implementing should get that setting the source file type to network file and dest file type to running config would be needed for a config push.