Subject: Octet counts

From: "David T. Perkins" <[email-masked]>
Date: Sun, 17 May 1998 15:53:44 -0700

HI,

I'm trying to figure out the octet (and packet) counts for token ring
and ethernet interfaces.

In the interfaces MIB module, IF-MIB, from RFC 2233, there are objects:
  ifInOctets - "The total number of octets received on the interface,
               including framing characters."
  ifInUcastPkts - "The number of packets, delivered by this sub-layer to
               a higher (sub-)layer, which were not addressed to a
               multicast or broadcast address at this sub-layer."
  ifInMulticastPkts - "The number of packets, delivered by this sub-layer
               to a higher (sub-)layer, which were addressed to a
               multicast address at this sub-layer.  For a MAC layer
               protocol, this includes both Group and Functional
               addresses."
  ifInBroadcastPkts - "The number of packets, delivered by this sub-layer
               to a higher (sub-)layer, which were addressed to a
               broadcast address at this sub-layer."

IF Questions:
1) Does ifInOctets include octets in bad frames?
2) On ethernet, does the ifInOctets include fields: preamble, start
   frame delimiter (SFD), and FCS, in addition to DA, SA, type/length,
   and INFO?
3) On token ring, does ifInOctets include octets in token frames?
4) On token ring, does ifInOctets include fields: SD, AC, FC, FCS,
   ED, and FS, in addition to fields: DA, SA, RI, and INFO?
5) How do you tell if the interface is half or full-duplex for
   both ethernet and token ring interfaces?

In the RMON1 MIB module, RMON-MIB, from RFC 1757, there are objects:
  etherStatsOctets - "The total number of octets of data (including
                  those in bad packets) received on the
                  network (excluding framing bits but including
                  FCS octets)."
  etherStatsPkts - "The total number of packets (including bad packets,
                  broadcast packets, and multicast packets) received."
  etherStatsBroadcastPkts - "The total number of good packets received
                  that were directed to the broadcast address.  Note
                  that this does not include multicast packets." 
  etherStatsMulticastPkts - "The total number of good packets received
                  that were directed to a multicast address.  Note
                  that this number does not include packets directed
                  to the broadcast address."

ETH-RMON Question:
1) Does etherStatsOctets include fields DA, SA, type/length, INFO,
   and FCS, but not fields preamble and SFD?
2) Is the following the valid formula for calculation of
   network utilization in percent?

   Util = 100*(frames*(gapBits+frameBits)+octets*8)/(interval*speed)

   where:
     frames - the number of frames over the time interval
     octets - the number of octets in frames over the time interval
              (includes FCS, but does not include preamble or SFD)
     gapBits - the number of bits in an interpacket gap (96)
     frameBits - the number of bits in preamble and SFD (64)
     interval - the time interval in seconds
     speed - network speed in bits per second
     Util - the network utilization in percent

In the token ring RMON MIB module, TOKEN-RING-RMON-MIB, from RFC 1513,
there are objects:
  tokenRingMLStatsMacOctets - "The total number of octets of data in MAC
                  packets (excluding those that were not good frames)
                  received on the network (excluding framing bits
                  but including FCS octets)."
  tokenRingMLStatsMacPkts - "The total number of MAC packets (excluding
                  packets that were not good frames) received."
  tokenRingPStatsDataOctets - "The total number of octets of data in 
                  good frames received on the network (excluding framing
                  bits but including FCS octets) in non-MAC packets."
  tokenRingPStatsDataPkts - "The total number of non-MAC packets in good
                  frames received."
  tokenRingPStatsDataBroadcastPkts - "The total number of good non-MAC
                  frames received that were directed to an LLC broadcast
                  address (0xFFFFFFFFFFFF or 0xC000FFFFFFFF)."
  tokenRingPStatsDataMulticastPkts - "The total number of good non-MAC
                  frames received that were directed to a local or global
                  multicast or functional address.  Note that this number
                  does not include packets directed to the broadcast
                  address."

TR-RMON Questions:
1) Does tokenRingMLStatsMacOctets include fields DA, SA, RI, INFO,
   and FCS, but not fields SD, AC, FC, ED, and FS?
2) Does tokenRingPStatsDataOctets include fields DA, SA, RI, INFO,
   and FCS, but not fields SD, AC, FC, ED, and FS?
3) Is there a way to get octets in bad frames?
4) How does one compute ring utilization? How close is the following
   formula?

   Util = 100*(frames*(SDbits+ACbits+FCbits+EDbits+FSbits+GapBits)+
          octets*8)/(interval*speed)

   where:
     frames - the number of frames over the time interval (the
              sum of MAC and LLC frames)
     SDbits, ACbits, FCbits, EDbits, FSbits - each is eight bits
     gapBits - the number of bits in an interframe gap (8 bits
               at 4 Mb/s and 40 bits at 16 Mb/s)
     octets - the number of octets in frames over the time interval
              (includes FCS, but does not include SD, AC, FC, ED, FS)
     interval - the time interval in seconds
     speed - network speed in bits per second
     Util - the network utilization in percent

Regards,
/david t. perkins, [email-masked]

---

From: John Flick <[email-masked]>
Date: Wed, 20 May 1998 18:02:59 -0700 (PDT)

> 1) Does ifInOctets include octets in bad frames?

I had always assumed that it does not, but the DESCRIPTION doesn't
say.  If it does include octets in bad frames, then which bad
frames?  On an ethernet, does this open up the debate of whether a
collision fragment (a.k.a. a runt) is a bad frame?  You also have the
question of whether a bad frame that was filtered by the hardware (you 
configured it to not receive bad frames, which would be the normal
config on an end node), counts here.  Not counting octets in bad
frames seems alot easier.

Datapoints from other MIBs:  RMON does count octets in bad frames,
repeater MIB doesn't.

 >    frame delimiter (SFD), and FCS, in addition to DA, SA, type/length,

Most implementations that I have seen count DA, SA, type/length, data, 
pad, and FCS, and not preamble or SFD.  Note that this is the same as
what RMON counts, and it matches the IEEE 802.3 definition of
frameSize (802.3-1996, 4.2.7.1).  When you get to gigabit, you also
need to decide if it includes extension bits.

 >    both ethernet and token ring interfaces?

The current answer for Ethernet is ifMauType.  Using ifSpeed, as one
response suggested, has been used by some vendors (a survey I did a
few months ago showed about half of the responders doubled ifSpeed for 
full-duplex, though most agreed that this is a kludge).  The consensus 
of the hubmib WG was that this should be disallowed.  The hubmib WG is 
currently debating whether ifMauType is adequate, or if we need to add 
an object for duplex mode to either the Ethernet MIB or IF-MIB.

 >    and FCS, but not fields preamble and SFD?

yes

 >      Util - the network utilization in percent

Looks valid, but might need revision for Gigabit Ethernet (if we
choose to deal with half-duplex shared Gigabit), since it has a burst
mode (so there is not always a 96-bit interpacket gap), and
"carrier-extends" frames shorter than 4096 bits with special extension 
bits.  (Personally, I would be happy just blowing off half-duplex
shared Gigabit, since there don't seem to be any implementations.)

John