3 Calculating Interface Utilization

 

 

Introduction

 

This document describes how to calculate bandwidth utilization using Simple Network Management Protocol (SNMP).

 

Solution

 

Interface utilization is the primary measure used for network utilization. The following formulas should be used, based on whether the connection to be measured is half-duplex or full-duplex.

Shared LAN connections tend to be half-duplex, mainly because contention detection expects a device to listen before transmitting.

WAN connections typically are full-duplex, because the connection is point-to-point i.e., both devices can transmit and receive at the same time since there is only one other device sharing the connection.
 

Because MIB-II variables are stored as counters, it is necessary to take two poll cycles and figure the difference between the two, hence, the delta used in the equation.
 

The following explains the variables used in the formulas:

  [^ refers to Delta]

 

For half-duplex media, use the following formula for interface utilization:
 

(^ifInOctets+^ifOutOctets)x8x100
---------------------------------------------------
(number of seconds in ^)x IfSpeed
 

[^ refers to Delta]

 

For full-duplex media, calculating the utilization is trickier. For example, with a full T-1 serial connection, the line speed is 1.544

Mbps. What this means is that a T-1 interface can both receive and transmit 1.544 Mbps for a combined possible bandwidth of 3.088 Mbps!
 

When calculating interface bandwidth for full-duplex connections, you could use the following formula, in which you take the larger of the in and out values and generate a utilization percentage:
 

max(^ifInOctets+^ifOutOctets)x8x100
---------------------------------------------------
(number of seconds in ^)x IfSpeed
 

[^ refers to Delta]

 

However, this method hides the utilization of the direction that has the lesser value and provides less accurate results. A more accurate method is to measure the input utilization and output utilization separately, using the following formulae:
 

 

Input utilization =       ^ifInOctetsx8x100
                          -----------------------------------
                           (number of seconds in ^)x IfSpeed

Output utilization =   ^ifOutOctetsx8x100
                        -----------------------------------
                          (number of seconds in ^)x IfSpeed

 

[^ refers to Delta]

 

These formulas are somewhat simplified because they do not take into consideration any overhead associated with the particular protocol. As an example, refer to RFC 1757 Ethernet-utilization formulas that take into consideration packet overhead.

All of the MIB attributes listed above are found in RFC1213 MIB.
 

 

Details of the MIB variables used in these formulas are as follows:
 

.1.3.6.1.2.1.2.2.1.10

ifInOctets OBJECT-TYPE

-- FROM RFC1213-MIB, IF-MIB

SYNTAX          Counter

MAX-ACCESS      read-only

STATUS          Mandatory

DESCRIPTION    "The total number of octets received on the interface, including framing characters."

::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) interfaces(2) ifTable(2) ifEntry(1) 10 }

.1.3.6.1.2.1.2.2.1.16
 

.1.3.6.1.2.1.2.2.1.16
ifOutOctets OBJECT-TYPE

-- FROM RFC1213-MIB, IF-MIB

SYNTAX          Counter

MAX-ACCESS      read-only

STATUS          Mandatory

DESCRIPTION    "The total number of octets transmitted out of the interface, including framing characters."

::= { ISO(1) org(3) DOD(6) Internet(1) mgmt(2) mib-2(1) interfaces(2) ifTable(2) ifEntry(1) 16 }

 

 

.1.3.6.1.2.1.2.2.1.5

ifSpeed OBJECT-TYPE

-- FROM RFC1213-MIB, IF-MIB

SYNTAX          Gauge

MAX-ACCESS      read-only

STATUS          Mandatory

DESCRIPTION    "An estimate of the interface's current bandwidth in bits per second.  For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth."

::= { ISO(1) org(3) DOD(6) Internet(1) mgmt(2) mib-2(1) interfaces(2) ifTable(2) ifEntry(1) 5 }



Copyright © 1996-2004, AdventNet Inc. All Rights Reserved.