c has asked for the wisdom of the Perl Monks concerning the following question:
snmpset <router> <RW Community String> .1.3.6.1.4.1.9.2.1.55.<tftp +server ip> string <filename>
However, the net::snmp syntax is throwing me a bit. I am not quite certain where to stuff all of the apparent info that snmpset seems to require.
$where = "10.6.21.100 string $tftpfile"; @param = qw($oid SET_REQUEST $where); ($session, $error) = Net::SNMP->session( -hostname => $router -community => $community ); my $response = $session->set_request(@param);
My questions is concerning the @param list. The net::snmp doc shows:
$response = $session->set_request(@oid_type_value);
the oid, i have, but the ASN.1 value for the type field, I am not too clear on, nor the value that I will be sending. I want to say that the "value" field corresponds to the:
<tftp server ip> string <filename>
portion of the snmpset command, however I am not sure how to stuff all of that into a single list value. Plus, near the end of the net::snmp doc, it lists the acceptable "types". I see SET_REQUEST among the EXPORTABLE list, but I am not sure if this is what I want to use or whether or not its ready to use without additional configuration. Your help is appreciated.
humbly -c
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: copy run tftp on cisco router using net::snmp
by traveler (Parson) on Aug 09, 2001 at 19:00 UTC | |
|
Re: copy run tftp on cisco router using net::snmp
by perlmangle (Initiate) on Aug 09, 2001 at 15:38 UTC | |
by c (Hermit) on Aug 09, 2001 at 16:47 UTC |