I was trying to get ifOperStatus
with snmpget
, but I found here that he does it like this
snmpwalk -Os -c public -v 1 192.168.1.1 1.3.6.1.2.1.2.2.1.8
So I tried that but I get no result
But the SNMP agent is working.
Can anyone tell me how can I access ifOperStatus?
Assuming your snmpwalk is the NET-SNMP version, then
snmpwalk -Os -c public -v 1 192.168.1.1 .1.3.6.1.2.1.2.2.1.8
should work (notice the extra dot in front of the OID). That makes it an absolute OID, rather than relative.