atom feed9 messages in net.sourceforge.lists.net-snmp-codersRe: Setting IP address through SNMP
FromSent OnAttachments
basi...@wipro.comNov 24, 2011 4:09 am 
Dave ShieldNov 24, 2011 4:55 am 
basi...@wipro.comNov 24, 2011 6:15 am 
Dave ShieldNov 24, 2011 6:28 am 
Dave ShieldNov 24, 2011 6:34 am 
basi...@wipro.comNov 24, 2011 9:00 pm 
Magnus FromreideNov 24, 2011 10:28 pm 
basi...@wipro.comNov 24, 2011 10:54 pm 
basi...@wipro.comNov 25, 2011 12:55 am 
Subject:Re: Setting IP address through SNMP
From:Dave Shield (D.T.@liverpool.ac.uk)
Date:Nov 24, 2011 4:55:55 am
List:net.sourceforge.lists.net-snmp-coders

On 24 November 2011 12:10, <basi@wipro.com> wrote:

I have to configure the IP address of eth1 interface of a network device.

I can get the IP address of the eth1 interface by # snmpget -v 2c -c public 10.20.20.20 ipAdEntAddr.10.10.10.10

The permission for that OID is read-only. So I can’t issue a set command.

The ipAddrTable is specific to IPv4, and has been deprecated in favour of the ipAddressTable, which can handle both IPv4 and IPv6, and *does* support modification via SNMP.

The equivalent request would probably be something like

# snmpget .... ipAddressIfIndex.ipv4.4.10.10.10.10

(note that you need to include the length of the IP address - hence the extra '4')

If I have to change the ip address to, say 10.10.10.30, what I have to do?

Try

# snmpset .... ipAddressIfIndex.ipv4.4.10.10.10.11 = 1 # ifIndex as above ipAddressStatus.ipv4.4.10.10.10.11 = createAndGo

(to add the new address)

# snmpset .... ipAddressStatus.ipv4.4.10.10.10.10 = destroy

(to remove the new address)

Dave

------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d