MIB OID 对象具有数据类型“位”:
object_OID
Composed Type: Bits
Base Type: BITS
Access: read-write
Kind: Scalar
SMI Type: OBJECT-TYPE
Value List:
doc (0)
emta (1)
cpe (2)
根据 MIB 描述,默认为 DEFVAL { '00'h }。我想要设置值 2 (cpe)。我试图用命令设置值
snmpset -v2c -c public 192.168.100.1 [object_OID] b 2
但得到了
Error in packet.
Reason: wrongValue (The set value is illegal or unsupported in some way)
也试过
snmpset -v2c -c public 192.168.100.1 [object_OID] i 2
再次出错
Error in packet.
Reason: wrongType (The set datatype does not match the data type the agent expects)
针对此对象的 Snmpget 返回Hex-STRING: 00
为 BITS 数据类型设置值 2 的正确格式是什么?