Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

snmpset the ip default-gateway

Hi everybody,

I've been trying to set the gateway ip-address of a Catalyst 2950 via SNMP:

snmpset -c geheim -v 2c myhost .1.3.6.1.2.1.16.19.12.0 a 192.168.1.254

Error in packet.

Reason: commitFailed

Failed object: 16.19.12.0

Debugging on the 2950:

#debug snmp packets

SNMP packet debugging is on

Jan 10 13:42:17: SNMP: Packet received via UDP from 192.168.0.1 on Vlan1

Jan 10 13:42:17: SNMP: Set request, reqid 1804646304, errstat 0, erridx 0

rmon.19.12.0 = 192.168.1.254

Jan 10 13:42:17:

Incoming SNMP packet

Jan 10 13:42:17: v1 packet

Jan 10 13:42:17: community string: geheim

Jan 10 13:42:17: SNMP: Response, reqid 1804646304, errstat 14, erridx 1

rmon.19.12.0 = 192.168.1.254

Jan 10 13:42:17: SNMP: Packet sent via UDP to 192.168.0.1

The variable's (netDefaultGateway.0) permission is "read-create".

Is it not allowed to set this variable or am I doing something wrong?

Thanks in advance

Rolf

4 REPLIES
Blue

Re: snmpset the ip default-gateway

I don't think this is the way to set the default gateway on a Cisco device, since this OID you're trying to set is part of the RMON2-MIB. In fact, I don't know if it's even possible to set the default gateway via SNMP. Has this method worked for you before?

New Member

Re: snmpset the ip default-gateway

No, I'm trying it for the first time like that.

I can't access the switch and changing the GW would be a solution. By using SNMP I can configure changes without needing the way back from the switch to my location, that's the reason...

The description of this variable says

"The IP Address of the default gateway. If this value is

undefined or unknown, it shall have the value 0.0.0.0."

which sounds good for me but I'm not sure if I can change it via SNMP.

Cisco Employee

Re: snmpset the ip default-gateway

It looks like there is no way to set this via snmp.

From what I see all the write capabilities on objects allow route entries (such as default route) to deleted, but not modified.

You can only modify the routing table using the CLI or downloading new configuration files to the device. The second option is possible via this doc:

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

Re: snmpset the ip default-gateway

Perhaps it can be set via SNMP using the CONFIG MIB - I think you're right about the MIB-II set...

Paul

2440
Views
5
Helpful
4
Replies