Hi,

I am finding difficulty in setting the ip address from python script using
netsnmp module.

Code is as below:
#!/usr/bin/env python

import netsnmp
oid = netsnmp.Varbind('.1.3.6.1.4.1.332.11.7.25.11.1.24.1','10.0.0
.0','IPADDRESS')
res = netsnmp.snmpget (oid, Version = 2, DestHost = 'cs-101',
Community='digi')
print res

o/p:
(None,)

But in the target machine, it is being set as 255.255.255.25.

>snmpget -v 2c -c digi cs-101 .1.3.6.1.4.1.332.11.7.25.16.1.13.49
SNMPv2-SMI::enterprises.332.11.7.25.16.1.13.49 = IpAddress: 255.255.255.255

Could you please help in explaining how to set the ip address from python
using netsnmp?
It is working fine for setting integers though.


Thanks & Regards,
Karteek
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to