12-16-2010 09:03 AM
Hello,
I need to change default gateway of 140 2960 switches. I'm wondering if anyone knows if it's possible to do that usign SNMP.
I'm testing net-snmp, but i'm receiving an error when setting the OID I think tha is the default-gateway.
#snmpwalk -v 3 -u USER -a SHA -l authNoPriv -A Password 1.1.1.100 | grep -i 1.1.1.1 (1.1.1.1 is the current default-gateway)
RFC1213-MIB::atIfIndex.10.1.1.1.1.1 = INTEGER: 10
RFC1213-MIB::atPhysAddress.10.1.1.1.1.1 = Hex-STRING: xx xx xx xx xx xx
RFC1213-MIB::atNetAddress.10.1.1.1.1.1 = Network Address: xx:xx:xx:xx
IP-MIB::ipNetToMediaIfIndex.10.1.1.1.1 = INTEGER: 10
IP-MIB::ipNetToMediaPhysAddress.10.1.1.1.1 = STRING: x:x:xx:x:x:xx
IP-MIB::ipNetToMediaNetAddress.10.1.1.1.1 = IpAddress: 1.1.1.1
IP-MIB::ipNetToMediaType.10.1.1.1.1 = INTEGER: dynamic(3)
SNMPv2-SMI::mib-2.16.19.12.0 = IpAddress: 1.1.1.1
#snmpset -v 3 -u USER -a SHA -l authNoPriv -A Password 1.1.1.100 SNMPv2-SMI::mib-2.16.19.12.0 a 1.1.1.2
Error in packet.
Reason: commitFailed
Failed object: SNMPv2-SMI::mib-2.16.19.12.0
12-16-2010 09:07 AM
Try the network management forum.
12-16-2010 07:02 PM
The same topic came up before: https://supportforums.cisco.com/thread/170135
That OID is "read-create" so it's not changable via snmpset. However, you could change the default-gateway by sending a full config to the device via snmpset.
12-17-2010 07:52 AM
instead of using SNMPv2-SMI::mib-2.16.19.12.0 use the actual OID.
i believe you can set it like this ipRouteNextHop.0.0.0.0 a X.X.X.X
12-17-2010 07:56 AM
I have not tested what i suggested. Since an experienced member is saying it is not possible directly, i would suggest you test my suggestion in a lab before you set it on a prdn box.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide