Fwd: Need help in setting the ip address from python using netsnmp module!

Karteek Challa <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAKoGP1SeacF4_F6hVBT0oL+7CKnhR3uxMemHUXpvoP1PG4q10Q@mail.gmail.com>
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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.