Subject: snmpEngineBoots

From: Ann Lo <[email-masked]>
Date: Fri, 02 May 2003 17:08:45 -0700

Hi,

Should snmpEngineBoots be initialized to 0 or 1? rfc3414 (USM) says 0.
rfc3411 says 1. It is not impossible to stick to what two rfc's say but
it is still confusing. Would it be a problem to simply start from 1
instead of 0?

To be really consistent with both rfc's, the implemention could be as
follows:

   * Set snmpEngineBoots to 0 when the SNMP agent is first installed.
   * Do not provide a MIB instance to snmpEngineBoots when it is 0.

This implementation could cover the descriptions in the two rfc's:

rfc3414, Section 2.2
When an SNMP engine is first installed, it sets its local values of
snmpEngineBoots and snmpEngineTime to zero.

rfc3414, Section 2.4
UsmSecurityParameters ::=
       ...
       msgAuthoritativeEngineBoots INTEGER (0..2147483647),
       msgAuthoritativeEngineTime INTEGER (0..2147483647),
       ...

rfc3411 Section 5
snmpEngineBoots  OBJECT-TYPE
       SYNTAX       INTEGER (1..2147483647)

Comments would be appreciated.

Thanks,
Ann

---

From: "C. M. Heard" <[email-masked]>
Date: Mon, 5 May 2003 07:32:48 -0700 (PDT)

> Should snmpEngineBoots be initialized to 0 or 1? rfc3414 (USM)

That's the correct initial value.

> rfc3411 says 1.

More precisely, it says that's the minimum value that can be
returned in respose to a Get-Request-PDU.

>    * Do not provide a MIB instance to snmpEngineBoots when it is 0.

Note that the engine _cannot_ return any value until after it is
booted at least one, so the second step is automatic.

I seem to recall that this discussion has taken place on this list
before.

//cmh

---

From: Ann Lo <[email-masked]>
Date: Mon, 05 May 2003 13:24:23 -0700

Hi,

Thanks for your information. I guess that this definition has originated
from the Unix system where the SNMP protocol can be operational when the
SNMP agent is down?

In many embedded systems, snmpEngineBoots would then start from 1 as these
systems would not respond to any SNMP requests until the SNMP agent is up
and running.

Regards,
Ann

---

From: "Randy Presuhn" <[email-masked]>
Date: Mon, 5 May 2003 14:08:39 -0700

Hi -

> From: "Ann Lo" <[email-masked]>
> To: "C. M. Heard" <[email-masked]>
> Cc: <[email-masked]>
> Sent: Monday, May 05, 2003 1:24 PM
> Subject: Re: snmpEngineBoots
...
> from the Unix system where the SNMP protocol can be operational when the

No.

> systems would not respond to any SNMP requests until the SNMP agent is up

No.  The snmpEngineBoots variable needs to persist, regardless of the
operating system.  Whenever an SNMP engine starts up, the value needs to be
incremented.  Consequently, if you ever want to see it on the wire with a
value of 1, theinitial value (prior to the first time the SNMP engine is ever
started) must be zero.  (This is just what Mike explained.)

Randy

---

From: Ann Lo <[email-masked]>
Date: Mon, 05 May 2003 16:13:25 -0700

Hi Randy,

Interpretation of snmpEngineBoots in this way appears fine. But then, shouldn't
msgAuthoriativeEngineBoots start from 1 instead of 0?

Presently rfc3414 (USM) says
UsmSecurityParameters ::=
   ...
   msgAuthoritativeEngineBoots INTEGER (0..2147483647),
   msgAuthoritativeEngineTime INTEGER (0..2147483647),
   ...

Thanks,
Ann

---

From: "Randy Presuhn" <[email-masked]>
Date: Mon, 5 May 2003 16:55:48 -0700

Hi -

> To: "Randy Presuhn" <[email-masked]>
> Sent: Monday, May 05, 2003 4:13 PM
...
...

Section 3.1 (6) (c) describes the special case when zero appears
in this protocol field.

Randy

---

From: "C. M. Heard" <[email-masked]>
Date: Mon, 5 May 2003 17:28:02 -0700 (PDT)

> from the Unix system where the SNMP protocol can be operational when the

No ...

> systems would not respond to any SNMP requests until the SNMP agent is up

That's the way it always works.  snmpEngineBoots is set to 0 before
the engine boots.  It is incremented to 1 the first time the agent
boots.  Hence the minimum value reported by the managed object is 1.

This is true irrespective of what platform upon which the agent runs.

This seems to cause confusion, and I am sorry that I am explaining
poorly, but there is no contradiction between RFC 3414, which instructs
an implementor to initialise snmpEngineBoots to 0, and the MIB module
in RFC 3411, which specifies that the minimum value ever read from
snmpEngineBoots (via an SNMP GetRequest-PDU) will be 1.

//cmh

---

From: "David T. Perkins" <[email-masked]>
Date: Mon, 05 May 2003 17:29:18 -0700

HI,

If the message definition had said:
  msgAuthoritativeEngineBoots INTEGER (1..2147483647)
instead of:
  msgAuthoritativeEngineBoots INTEGER (0..2147483647)
then an ASN.1 parse error would occur when the value of
zero is specified in the field. Note that the value of
the field is ignored in messages with security level
set to "noAuth/noPriv", and thus, zero makes a fine
value.