Hi,
I'm working on a script that needs to feed static routes to Cisco routers using SNMPv3 in a secure way. I have done a lot of research and have found some discussion on this issue, but nothing really conclusive, so here I am... :-)
Before doing the coding I'm trying to get it done using command line SNMP functions on a Linux box (I'm using Net-SNMP v5.2.1.2).
This is what I issue on the Linux box:
james@euler ~ $ snmpset -v3 -n "" -u xxxxxx -l authPriv -a md5 -A xxxxxxxx -x DES -X xxxxxxxx x.x.x.x ipRouteDest a 192.168.108.0 ipRouteMetric1 i 0 ipRouteNextHop a 192.168.20.15 ipRouteType i 4 ipRouteProto i 2 ipRouteMask a 255.255.255.0 Error in packet. Reason: noCreation (That table does not support row creation or that object can not ever be created) Failed object: RFC1213-MIB::ipRouteDest
If I turn on "snmp packets" debugging on the router (Cisco 2651XM running IOS Version 12.3(11)T7) this is what I see:
Router2-2651XM#
*May 31 00:46:20.060 UTC: SNMP: Packet received via UDP from z.z.z.z on FastEthernet0/0 *May 31 00:46:20.060 UTC: SNMP: Report, reqid 186108404, errstat 0, erridx 0 internet.6.3.15.1.1.4.0 = 119 *May 31 00:46:20.076 UTC: SNMP: Packet sent via UDP to z.z.z.z *May 31 00:46:20.268 UTC: SNMP: Packet received via UDP from z.z.z.z on FastEthernet0/0 *May 31 00:46:20.280 UTC: SNMP: Set request, reqid 186108405, errstat 0, erridx 0 ipRouteEntry.1 = 192.168.108.0 ipRouteEntry.3 = 0 ipRouteEntry.7 = 192.168.20.15 ipRouteEntry.8 = 4 ipRouteEntry.9 = 2 ipRouteEntry.11 = 255.255.255.0 *May 31 00:46:20.356 UTC: SNMP: Response, reqid 186108405, errstat 11, erridx 1 ipRouteEntry.1 = 192.168.108.0 ipRouteEntry.3 = 0 ipRouteEntry.7 = 192.168.20.15 ipRouteEntry.8 = 4 ipRouteEntry.9 = 2 ipRouteEntry.11 = 255.255.255.0 *May 31 00:46:20.440 UTC: SNMP: Packet sent via UDP to z.z.z.z Router2-2651XM#I believe that I need to "word" my command in a different way... maybe using specific instances or indexes for the ipRoutexxx OIDs? I'm lacking some conceptual knowledge about the use of tables here, since I was able to set scalar values using the snmpset command (for example, the sysContact string).
Anybody done this before? I really need to get this tool working, so any help will be HIGHLY APPRECIATED!!!!
Thanks,
James