On Mon, 2003-03-31 at 02:52, [EMAIL PROTECTED] wrote:
> Is it possible to retrive the actual time and date of cisco routers via snmp?

Only if the router is using NTP to synchronize time, and the router is
running recent code ( late 12.1T and following)

> I have found that there is a "sysDateAndTime" MIB which is an
> extension to the "MIB-2 System Group" by IETF. However I have no
> response returned by the cisco routers. I wonder if cisco has other
> private MIB which might be used to retrive and set the actual system
> time and date.

How about:
[EMAIL PROTECTED] mcdonalddj]$ snmpget -c public decker-3640-router -m 
CISCO-NTP-MIB cntpSysClock.0
CISCO-NTP-MIB::cntpSysClock.0 = Hex-STRING: C2 32 B9 11 F6 DC B7 71 
[EMAIL PROTECTED] mcdonalddj]$ snmpget -c public decker-3640-router -m 
CISCO-NTP-MIB cntpSysClock.0 -On
.1.3.6.1.4.1.9.9.168.1.1.10.0 = Hex-STRING: C2 32 B9 16 FA E0 71 DB 


cntpSysClock is defined as:
cntpSysClock OBJECT-TYPE
    SYNTAX NTPTimeStamp
--    Rsyntax OCTET STRING(SIZE(8))
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
        "The current local time.  Local time is derived from
        the hardware clock of the particular machine and
        increments at intervals depending on the design used."
    ::= { cntpSystem 10 }

and the value is defined as:

NTPTimeStamp ::= OCTET STRING(SIZE(8))
-- TEXTUAL-CONVENTION
--  DspHint
--    4d.4d
--  Status
--    mandatory
--  Descr
--    NTP timestamps are represented as a 64-bit
--    unsigned fixed-point number, in seconds relative to
--    00:00 on 1 January 1900.  The integer part is in the
--    first 32 bits and the fraction part is in the last
--    32 bits.
--  Refer
--    D.L. Mills, 'Network Time Protocol (Version 3)',
--    RFC-1305, March 1992, Section 3.1

Note that you can't set the date using this mib, but if you were running
NTP you wouldn't want to...

> Regards;
> Tolga Ă–zden
> 
> --
> Unsubscribe mailto:[EMAIL PROTECTED]
> Archive     http://www.ee.ethz.ch/~slist/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
-- 
Daniel J McDonald <[EMAIL PROTECTED]>
Austin Energy

--
Unsubscribe mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to