What's new

SNMP OID iso.3.6.1.4.1.2021.100.4.0 , current date and time - issue

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

--JayJay--

New Around Here
My RT-AC66U is running Merlin version 380.64.

From this post http://www.snbforums.com/threads/snmp-monitoring.23121/
I understand generic Linux SNMP is enabled.

From the OID's listed here https://www.dd-wrt.com/wiki/index.php/SNMP#Known_OID.C2.B4s_via_SNMP
there's one command that should return the current date and time:
snmpget -v2c -c public 192.168.1.1 1.3.6.1.4.1.2021.100.4.0
on which I receive this response...
iso.3.6.1.4.1.2021.100.4.0 = No Such Object available on this agent at this OID

Date / time for the router is set through NTP.
The terminal command "date "shows correct date and time .

What makes the snmpget command on the router return the message
No Such Object available on this agent at this OID?
 
What MIB module is supposed to provide this? DD-WRT and me might not necessarily be enabling the same MIBs.
 
I am just giving it a shot as searching the Internet did not provide any clue to finding the proper MIB / OID for current date and time
 
I grepped "date" , "time" , "2017" using snmpwalk in both SNMP version 1 and 2c without result.
Maybe current date and time is not available through SNMP ...
 
Last edited:
By doing more searching I found an OID returning the current date and time in hex
The command
snmpget -v2c -c <community> <host> 1.3.6.1.2.1.25.1.2.0
returns
07 E1 01 15 15 02 1E 00 2B 01 00

which is...
Hex > decimal
07 E1 > 2017 (year)
01 > 1 (month of year)
15 > 21 (day of month)
15 > 21 (hr)
02 > 02 (min)
1E > 30 (sec)
00 2B 01 00 > etc. (deci secs and UTC offset)

explained here...

https://www.webnms.com/snmp/help/snmpapi/snmpv3/using_mibs_in_applns/tcs_dateandtime.html
 
Last edited:
What MIB module is supposed to provide this? DD-WRT and me might not necessarily be enabling the same MIBs.

The MIB is HOST-RESOURCES-MIB

snmpget -v2c -c <community> <host> HOST-RESOURCES-MIB::hrSystemDate.0
HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2017-1-23,23:28:53.0,+1:0
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top