Need help with snmpset and CISCO-VTP-MIB

Need help with snmpset and CISCO-VTP-MIB

am 07.09.2005 18:53:45 von rchadda

I looked up
http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tec h_note09186a00801c6035.shtml

and am able to do snmpgets but not snmpset. Please help.

rchadda@office1:~/mibs$ snmpset -v 1 -c ihasvfm 172.16.0.2
vtpVlanEditOperation.1 i 2
Error in packet.
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: CISCO-VTP-MIB::vtpVlanEditOperation.1

rchadda@office1:~/mibs$ snmpset -v 1 -c pppp 172.16.1.34
vtpVlanEditBufferOwner.1 OCTET STRING "Gerald"
vtpVlanEditBufferOwner.1: Bad object type: O

Any idea ?? If possible, kindly also give Perl syntax.

-Rajat

Re: Need help with snmpset and CISCO-VTP-MIB

am 20.09.2005 22:05:21 von rchadda

OK ... finally got the CLI working

rchadda@office1:~/mibs$ snmpset -v 1 -c public x.x.x.x
vtpVlanEditDot10Said.1.22 x 000186B6

But can't get the Perl Syntax right :((

$varbind = new
SNMP::Varbind(['vtpVlanEditDot10Said',1.22,'0x000186B6','x'] );
$session->set($varbind);
if ($session->{'ErrorNum'}) {
print "DBG: SNMP error: " . $session->{'ErrorStr'} . "\n";
}

says:
DBG: SNMP error: (badValue) The value given has the wrong type or
length.


rchadda@gmail.com wrote:
> I looked up
> http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tec h_note09186a00801c6035.shtml
>
> and am able to do snmpgets but not snmpset. Please help.
>
> rchadda@office1:~/mibs$ snmpset -v 1 -c ihasvfm 172.16.0.2
> vtpVlanEditOperation.1 i 2
> Error in packet.
> Reason: (noSuchName) There is no such variable name in this MIB.
> Failed object: CISCO-VTP-MIB::vtpVlanEditOperation.1
>
> rchadda@office1:~/mibs$ snmpset -v 1 -c pppp 172.16.1.34
> vtpVlanEditBufferOwner.1 OCTET STRING "Gerald"
> vtpVlanEditBufferOwner.1: Bad object type: O
>
> Any idea ?? If possible, kindly also give Perl syntax.
>
> -Rajat