web-dev-qa-db-ja.com

(net)SNMPはGETできますがSETはできません

SnmpdとsnmputilsがインストールされたTP-LINKWDR3600でOpenWRT(3つの最新バージョンすべてを試しました)を実行しています。 (MIBが欠落しているように見えますが)取得できますが、OIDを設定できません。

SNMPGET

root@OpenWrt:/# snmpget -v 1 -c public 10.0.0.2 iso.3.6.1.2.1.1.5.0
MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (TUNNEL-MIB): At line 0 in (none)
Cannot find module (IPV6-FLOW-LABEL-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-PASS-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (Host-RESOURCES-MIB): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
iso.3.6.1.2.1.1.5.0 = STRING: "HeartOfGold"

SNMPSET

root@OpenWrt:/# snmpset -v 1 -c private 10.0.0.2 iso.3.6.1.2.1.1.5.0 s test
MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (TUNNEL-MIB): At line 0 in (none)
Cannot find module (IPV6-FLOW-LABEL-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-PASS-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (Host-RESOURCES-MIB): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Error in packet.
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: iso.3.6.1.2.1.1.5.0

構成

root@OpenWrt:/# cat /etc/snmp/snmpd.conf
agentaddress UDP:161
sysLocation office
sysContact [email protected]
sysName HeartOfGold
com2sec ro default public
com2sec rw localhost private
group public v1 ro
group public v2c ro
group public usm ro
group private v1 rw
group private v2c rw
group private usm rw
view all included .1
access public "" any noauth exact all none none
access private "" any noauth exact all all all
exec  filedescriptors /bin/cat /proc/sys/fs/file-nr

ヒントはありますか?ありがとうございました

1
Patroklos A

構成ファイルに設定されたOIDは読み取り専用になるため、sysNameが構成に設定されていない場合にのみiso.3.6.1.2.1.1.5.0が書き込み可能になります。意味のあるMIBを作成し、それらに書き込んで効果を生み出すには、MIBをロードするか、エージェントを自分で拡張する必要があります。

0
Patroklos A