RFC 3289

Management Information Base for the Differentiated Services Architecture

๐Ÿ“… published June 2002, from ietf

Management Information Base for the Differentiated Services Architecture โœจ

Okay bestie, let's talk about this RFC ๐ŸŽ€ It's RFC 3289, published in May 2002. The authors are F. Baker from Cisco System, K. Chan from Nortel Networks, and A. Smith from Harbour Networks. It's a Standards Track document from the Network Working Group, so it's a real protocol spec and not just a vibe ๐Ÿ’… It doesn't list anything it obsoletes or updates, so it's standing on its own. Iconic โœจ


Status of this Memo ๐Ÿฆ‹

Okay, so this is an Internet standards track protocol document for the Internet community. It's inviting discussion and suggestions for improvements, which is very generous of it ๐Ÿซถ If you want to know where this protocol actually stands, check the current edition of "Internet Official Protocol Standards" (STD 1). That's where the official standardization state and status are listed. Distribution of this memo is unlimited, so share it with everyone you know ๐Ÿ’œ

Copyright (C) The Internet Society (2002). All Rights Reserved.

Abstract ๐Ÿงš

This memo describes an SMIv2 (Structure of Management Information version 2) MIB for a device implementing the Differentiated Services Architecture. It may be used both for monitoring and configuration of a router or switch capable of Differentiated Services functionality. So basically it's a management blueprint for DiffServ-capable gear, and you can use it to watch the device and to set it up ๐Ÿ”ฅ

Table of Contents ๐Ÿ“

1 The SNMP Management Framework .................................   3
2 Relationship to other working group documents .................   4
2.1  Relationship to the Informal Management Model for
     Differentiated Services Router .............................   4
2.2 Relationship to other MIBs and Policy Management ............   5
3 MIB Overview ..................................................   6
3.1 Processing Path .............................................   7
3.1.1 diffServDataPathTable - The Data Path Table ...............   7
3.2 Classifier ..................................................   7
3.2.1 diffServClfrElementTable - The Classifier Element Table ...   8
3.2.2 diffServMultiFieldClfrTable - The Multi-field Classifier
     Table ......................................................   9
3.3 Metering Traffic ............................................  10
3.3.1 diffServMeterTable - The Meter Table ......................  11
3.3.2 diffServTBParamTable - The Token Bucket Parameters Table...  11
3.4 Actions applied to packets ..................................  12
3.4.1 diffServActionTable - The Action Table ....................  12
3.4.2 diffServCountActTable - The Count Action Table ............  12
3.4.3 diffServDscpMarkActTable - The Mark Action Table ..........  13
3.4.4 diffServAlgDropTable - The Algorithmic Drop Table .........  13
3.4.5 diffServRandomDropTable - The Random Drop Parameters Table   14
3.5 Queuing and Scheduling of Packets ...........................  16
3.5.1 diffServQTable - The Class or Queue Table .................  16
3.5.2 diffServSchedulerTable - The Scheduler Table ..............  16
3.5.3 diffServMinRateTable - The Minimum Rate Table .............  16
3.5.4 diffServMaxRateTable - The Maximum Rate Table .............  17
3.5.5 Using queues and schedulers together ......................  17
3.6 Example configuration for AF and EF .........................  20
3.6.1 AF and EF Ingress Interface Configuration .................  20
3.6.1.1 Classification In The Example ...........................  22
3.6.1.2 AF Implementation On an Ingress Edge Interface ..........  22
3.6.1.2.1 AF Metering On an Ingress Edge Interface ..............  22
3.6.1.2.2 AF Actions On an Ingress Edge Interface ...............  23
3.6.1.3 EF Implementation On an Ingress Edge Interface ..........  23
3.6.1.3.1 EF Metering On an Ingress Edge Interface ..............  23
3.6.1.3.2 EF Actions On an Ingress Edge Interface ...............  23
3.7 AF and EF Egress Edge Interface Configuration ...............  24
3.7.1 Classification On an Egress Edge Interface ................  24
3.7.2 AF Implementation On an Egress Edge Interface .............  26
3.7.2.1 AF Metering On an Egress Edge Interface .................  26
3.7.2.2 AF Actions On an Egress Edge Interface ..................  29
3.7.2.3 AF Rate-based Queuing On an Egress Edge Interface .......  30
3.7.3 EF Implementation On an Egress Edge Interface .............  30
3.7.3.1 EF Metering On an Egress Edge Interface .................  30
3.7.3.2 EF Actions On an Egress Edge Interface ..................  30
3.7.3.3 EF Priority Queuing On an Egress Edge Interface .........  32
4 Conventions used in this MIB ..................................  33
4.1 The use of RowPointer to indicate data path linkage .........  33
4.2 The use of RowPointer to indicate parameters ................  34
4.3 Conceptual row creation and deletion ........................  34
5 Extending this MIB ............................................  35
6 MIB Definition ................................................  35
7 Acknowledgments ............................................... 110
8 Security Considerations ....................................... 110
9 Intellectual Property Rights .................................. 111
10 References ................................................... 112
11 Authors' Addresses ........................................... 115
12 Full Copyright Statement ..................................... 116

1. The SNMP Management Framework ๐ŸŽ€

Okay so the SNMP Management Framework has five major components, and I'm going to walk you through them ๐Ÿ’–

  • An overall architecture, described in [RFC 2571].
  • Mechanisms for describing and naming objects and events for the purpose of management. The first version of this Structure of Management Information (SMI) is called SMIv1, and it's described in [RFC 1155], [RFC 1212] and [RFC 1215]. The second version, called SMIv2, is described in [RFC 2578], RFC 2579 [RFC 2579] and [RFC 2580].
  • Message protocols for transferring management information. The first version of the SNMP message protocol is called SNMPv1 and is described in [RFC 1157]. A second version, SNMPv2c, is described in [RFC 1901] and [RFC 1906], and it's not an Internet standards track protocol ๐Ÿ™ˆ The third version of the message protocol is called SNMPv3 and is described in [RFC 1906], [RFC 2572] and [RFC 2574].
  • Protocol operations for accessing management information. The first set of protocol operations and associated PDU formats is described in [RFC 1157]. A second set of protocol operations and associated PDU formats is described in [RFC 1905].
  • A set of fundamental applications described in [RFC 2573], plus the view-based access control mechanism described in [RFC 2575].

If you want a more detailed intro to the current SNMP Management Framework, go check out [RFC 2570] โœจ

Managed objects are accessed through a virtual information store called the Management Information Base, or MIB. Objects in the MIB are defined using the mechanisms in the SMI, so it's all one connected ecosystem ๐Ÿงš

This memo specifies a MIB module that is compliant to the SMIv2. A MIB conforming to the SMIv1 can be produced through the appropriate translations. The resulting translated MIB must be semantically equivalent, except where objects or events are omitted because there is no translation is possible (use of Counter64). Some machine-readable information in SMIv2 will be converted into textual descriptions in SMIv1 during the translation process. However, this loss of machine readable information is not considered to change the semantics of the MIB. So the translated version still has to mean the same thing, which is very important ๐Ÿ”ฅ

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119]. These are the capitalized keywords that carry real requirement weight, so keep them in mind as you read โœจ

2. Relationship to other working group documents ๐ŸŒˆ

Okay, so the Differentiated Services Working Group and related working groups produced other documents too. The big ones are the Informal Management Model and the policy configuration paradigm of SNMPCONF. This section explains how the MIB relates to those documents ๐Ÿ’…

2.1. Relationship to the Informal Management Model for Differentiated Services Router ๐Ÿฆ‹

This MIB is similar in design to [MODEL], although it can be used to build functional data paths that the model would not well describe. The model conceptually describes ingress and egress interfaces of an n-port router, which may find some interfaces at a network edge and others facing into the network core. It describes the configuration and management of a Differentiated Services interface in terms of one or more Traffic Conditioning Blocks (TCB), each containing, arranged in the specified order, by definition, zero or more classifiers, meters, actions, algorithmic droppers, queues and schedulers. Traffic may be classified, and classified traffic may be metered. Each stream of traffic identified by a combination of classifiers and meters may have some set of actions performed on it; it may have dropping algorithms applied and it may ultimately be stored into a queue before being scheduled out to its next destination, either onto a link or to another TCB. At times, the treatment for a given packet must have any of those elements repeated. [MODEL] models this by cascading multiple TCBs, while this MIB describes the policy by directly linking the functional data path elements.

The MIB represents this cascade by following the "Next" attributes of the various elements. They indicate what the next step in Differentiated Services processing will be, whether it be a classifier, meter, action, algorithmic dropper, queue, scheduler or a decision to now forward a packet. So each element basically points at its successor, like a little chain of friends ๐Ÿซถ

The higher level concept of a TCB is not required in the parameterization or in the linking together of the individual elements, hence it is not used in the MIB itself and is only mentioned in the text for relating the MIB with the [MODEL]. Rather, the MIB models the individual elements that make up the TCBs. So the TCB is the big picture, but the MIB zooms in on the pieces ๐Ÿ”

This MIB uses the notion of a Data Path to indicate the Differentiated Services processing a packet may experience. The Data Path a packet will initially follow is an attribute of the interface in question. The Data Path Table provides a starting point for each direction (ingress or egress) on each interface. A Data Path Table Entry indicates the first of possible multiple elements that will apply Differentiated Services treatment to the packet. Think of the Data Path Table as the front door for every packet, one door per direction per interface ๐Ÿšชโœจ

2.2. Relationship to other MIBs and Policy Management

okay so this MIB gives you direct reporting and manipulation of detailed functional elements ๐ŸŽ€ Each one is made of a structural element plus one or more parameter-bearing elements. ngl that can feel a bit clunky, but it means you get to reuse parameters, which is so smart โœจ For example, a service provider might offer three kinds of contracts and set up three parameter elements. Then every data path on the system can point back at those same sets of parameters ๐Ÿ’… The diffServDataPathTable couples each direction on each interface with the specified data path linkage. And the idea of "interface" is defined by InterfaceIndex/ifIndex from the IETF Interfaces MIB [IF-MIB]. ๐Ÿฆ‹

Other MIBs and data structure definitions for policy management mechanisms, other than SNMP/SMIv2, are likely to show up in the future to abstract the model in other ways ๐ŸŒธ One example is the Differentiated Services Policy Information Base, [DSPIB].

Abstractions toward less detailed definitions of Differentiated Services functionality are likely too, e.g. some form of "Per-Hop Behavior"-based definition involving a template of detailed object values that gets applied to specific instances of objects in this MIB semi-automatically. ๐Ÿงš

Another possible direction of abstraction is one using a concept of "roles" (often, but not always, applied to interfaces) ๐Ÿ‘‘ In this case, it may be possible to re-use the object definitions in this MIB, especially the parameterization tables. The Data Path table helps with reuse of the data path linkage tables by centralizing the interface-specific information, which makes it easier to mechanically replace ifIndex with some sort of "roleIndex". This work is ongoing. ๐Ÿซถ

The reuse of parameter blocks on a variety of functional data paths is intended to simplify network management โœจ In many cases, one could also re-use the structural elements as well, but this has the unfortunate side-effect of re-using the counters, so monitoring information is lost ๐Ÿ˜ญ For this reason, the re-use of structural elements is not generally recommended. ๐Ÿ’€

3. MIB Overview ๐ŸŒˆ

The Differentiated Services Architecture does not specify how an implementation should be assembled ๐Ÿงš The [MODEL] describes a general approach to implementation design, or to user interface design. Its components could, however, be assembled in a different way. For example, traffic conforming to a meter might be run through a second meter, or reclassified.

This MIB models the same functional data path elements, allowing the network manager to assemble them in any fashion that meets the relevant policy ๐Ÿ’– These data path elements include Classifiers, Meters, Actions of various sorts, Queues, and Schedulers.

In many of these tables, a distinction is drawn between the structure of the policy (do this, then do that) and the parameters applied to specific policy elements. This is to facilitate configuration, if the MIB is used for that. The concept is that a set of parameters, such as the values that describe a specific token bucket, might be configured once and applied to many interfaces ๐ŸŽ€

The RowPointer Textual Convention is therefore used in two ways in this MIB ๐Ÿ”ฅ It is defined for the purpose of connecting an object to an entry dynamically. The RowPointer object identifies the first object in the target Entry, and in so doing points to the entire entry. In this MIB, it is used as a connector between successive functional data path elements, and as the link between the policy structure and the parameters that are used. When used as a connector, it says what happens "next"; what happens to classified traffic, to traffic conforming or not conforming to a meter, and so on. When used to indicate the parameters applied in a policy, it says "specifically" what is meant; the structure points to the parameters of its policy.

The use of RowPointers as connectors allows for the simple extension of the MIB ๐Ÿฆ‹ The RowPointers, whether "next" or "specific", may point to Entries defined in other MIB modules. For example, the only type of meter defined in this MIB is a token bucket meter. If another type of meter is required, another MIB could be defined describing that type of meter, and diffServMeterSpecific could point to it. Similarly, if a new action is required, the "next" pointer of the previous functional datapath element could point to an Entry defined in another MIB, public or proprietary.

3.1. Processing Path

An interface has an ingress and an egress direction, and will generally have a different policy in each direction ๐ŸŒธ As traffic enters an edge interface, it may be classified, metered, counted, and marked. Traffic leaving the same interface might be remarked according to the contract with the next network, queued to manage the bandwidth, and so on. As [MODEL] points out, the functional datapath elements used on ingress and egress are of the same type, but may be structured in very different ways to implement the relevant policies ๐Ÿ’…

3.1.1. diffServDataPathTable - The Data Path Table

Therefore, when traffic arrives at an ingress or egress interface, the first step in applying the policy is determining what policy applies ๐Ÿ‘€ This MIB does that by providing a table of pointers to the first functional data path element, indexed by interface and direction on that interface. The content of the diffServDataPathEntry is a single RowPointer, which points to that functional data path element.

When diffServDataPathStart in a direction on an interface is undefined or is set to zeroDotZero, the implication is that there is no specific policy to apply ๐Ÿ™ˆ

3.2. Classifier

Classifiers are used to differentiate among types of traffic ๐Ÿงš In the Differentiated Services architecture, one usually discusses a behavior aggregate identified by the application of one or more Differentiated Services Code Points (DSCPs). However, especially at network edges (which include hosts and first hop routers serving hosts), traffic may arrive unmarked or the marks may not be trusted. In these cases, one applies a Multi-Field Classifier, which may select an aggregate as coarse as "all traffic", as fine as a specific microflow identified by IP Addresses, IP Protocol, and TCP or UDP ports, or a variety of slices in between.

Classifiers can be simple or complex. In a core interface, one would expect to find simple behavior aggregate classification to be used. However, in an edge interface, one might first ask what application is being used, meter the arriving traffic, and then apply various policies to the non-conforming traffic depending on the Autonomous System number advertising the destination address ๐Ÿซฃ To accomplish such a thing, traffic must be classified, metered, and then reclassified. To this end, the MIB defines separate classifiers, which may be applied at any point in processing, and may have different content as needed ๐Ÿ’–

The MIB also allows for ambiguous classification in a structured fashion. In the end, traffic classification must be unambiguous; one must know for certain what policy to apply to any given packet. However, writing an unambiguous specification is often tedious, while writing a specification in steps that permits and excludes various kinds of traffic may be simpler and more intuitive ๐Ÿง  In such a case, the classification "steps" are enumerated; all classification elements of one precedence are applied as if in parallel, and then all classification elements of the next precedence โœจ

This MIB defines a single classifier parameter entry, the Multi-field Classifier. A degenerate case of this multi-field classifier is a Behavior Aggregate classifier. Other classifiers may be defined in other MIB modules, to select traffic from a given layer two neighbor or a given interface, traffic whose addresses belong to a given BGP Community or Autonomous System, and so on ๐ŸŒˆ

3.2.1. diffServClfrElementTable - The Classifier Element Table

A classifier consists of classifier elements. A classifier element identifies a specific set of traffic that forms part of a behavior aggregate; other classifier elements within the same classifier may identify other traffic that also falls into the behavior aggregate. For example, in identifying AF traffic for the aggregate AF1, one might implement separate classifier elements for AF11, AF12, and AF13 within the same classifier and pointing to the same subsequent meter ๐Ÿ“

Generally, one would expect the Data Path Entry to point to a classifier (which is to say, a set of one or more classifier elements), although it may point to something else when appropriate. Reclassification in a functional data path is achieved by pointing to another Classifier Entry when appropriate ๐Ÿฆ‹

A classifier element is a structural element, indexed by classifier ID and element ID. It has a precedence value, allowing for structured ambiguity as described above, a "specific" pointer that identifies what rule is to be applied, and a "next" pointer directing traffic matching the classifier to the next functional data path element. If the "next" pointer is zeroDotZero, the indication is that there is no further differentiated services processing for this behavior aggregate. However, if the "specific" pointer is zeroDotZero, the device is misconfigured. In such a case, the classifier element should be operationally treated as if it were not present ๐Ÿ˜ฌ

When the MIB is used for configuration, diffServClfrNextFree and diffServClfrElementNextFree always contain legal values for diffServClfrId and diffServClfrElementId that are not currently used in the system's configuration. The values are validated when creating diffServClfrId and diffServClfrElementId, and in the event of a failure (which would happen if two managers simultaneously attempted to create an entry) must be re-read ๐Ÿ‘‘

3.2.2. diffServMultiFieldClfrTable - The Multi-field Classifier Table โœจ

okay so this MIB only defines ONE parameter type for classification: the Multi-field Classifier ๐ŸŽ€ As a parameter, you specify a filter once, then apply it to a bunch of interfaces using diffServClfrElementSpecific. Iconic reuse, honestly ๐Ÿ’… This filter matches:

  • IP source address prefix, including host, CIDR Prefix, and "any source address"
  • IP destination address prefix, including host, CIDR Prefix, and "any destination address"
  • IPv6 Flow ID
  • IP protocol or "any"
  • TCP/UDP/SCTP source port range, including "any"
  • TCP/UDP/SCTP destination port range, including "any"
  • Differentiated Services Code Point

Since port ranges, IP prefixes, and "any" are all defined in each case, you can build a LOT of different filters ๐Ÿฆ‹ The Differentiated Services Behavior Aggregate filter is just a special case of this one, where only the DSCP gets specified. Main character energy for a single field ๐Ÿ‘‘

Other MIB modules can define similar filters the same way ๐ŸŒˆ For example, an Ethernet filter might set source and destination MAC addresses to "any", and then use Ethernet Packet Type, IEEE 802.2 SAPs, and IEEE 802.1 priorities. A policy routing filter could look like the diffServMultiFieldClfrTable but hold the BGP Communities of the source and destination prefix instead of the prefix itself, meaning "any prefix in this community" ๐Ÿงš For that kind of filter, you build a table similar to diffServMultiFieldClfrTable, and point diffServClfrElementSpecific at it. Lowkey genius.

When the MIB is used for configuration, diffServMultiFieldClfrNextFree ALWAYS hands you a legal value for diffServMultiFieldClfrId that isn't already in use in the system's configuration ๐Ÿ’–


3.3. Metering Traffic ๐ŸŒธ

okay this part is so good ๐Ÿ˜ญ As discussed in [MODEL], a meter and a shaper are functions that operate on opposite ends of a link. A shaper schedules traffic for transmission at specific times so it approximates a particular line speed or a combination of line speeds. In its simplest form, if the traffic stream has constant-sized packets, it might send one packet per unit of time to build the equivalent of a CBR circuit. BUT, various factors get in the way and make the approximation inexact ๐Ÿ’€ Multiple classes of traffic might schedule at the same moment, the variable length of IP traffic can add variation, and factors in the link or physical layer can change traffic timing. A meter integrates the arrival rate of traffic and figures out whether the shaper at the far end was applied correctly, or whether the application's behavior is naturally close enough to be acceptable under a given policy ๐Ÿซถ

A common type of meter is a Token Bucket meter, like [srTCM] or [trTCM] ๐Ÿ“ This type of meter assumes a shaper is being used at a previous node. Applications that send at a constant rate can conform if the token bucket is set up properly. It specifies the acceptable arrival rate and quantifies the acceptable variability, often by giving a burst size or an interval. Since rate = quantity/time, specifying any two of those parameters implies the third, and a large interval makes for a forgiving system ๐ŸŒˆ Multiple rates can be specified, as in AF, so a subset of the traffic (up to one rate) gets accepted with one set of guarantees, and traffic over that but under another rate gets a different set of guarantees. Other types of meters exist too โœจ

One use of a meter is when a service provider sells at most a certain bit rate to a customer and wants to drop the excess ๐Ÿ™ˆ In that case, the fractal nature of normal Internet traffic has to be reflected in large burst intervals, because TCP frequently sends packet pairs or larger bursts, and it responds poorly when more than one packet in a round trip interval gets dropped. Apps like FTP contain the effect by just staying below the target bit rate. This type of configuration really hurts transaction applications like HTTP, though ๐Ÿ˜ฌ Another use of a meter is in the AF specification, where excess traffic is marked with a related DSCP and gets slightly more active queue depth management. The application isn't sharply limited to a contracted rate in that case, but it can be easily contained if its traffic becomes a burden ๐Ÿฆ‹

3.3.1. diffServMeterTable - The Meter Table ๐Ÿ’…

The Meter Table is a structural table that specifies a specific functional data path element. Its entry is basically three RowPointers: a "succeed" pointer for traffic conforming to the meter, a "fail" pointer for traffic not conforming to the meter, and a "specific" pointer that identifies the parameters in question. This structure is a bow to SNMP's limitations ๐Ÿฅบ It would be better to have a structure with N rates and N+1 "next" pointers, with a single algorithm specified. In this case, multiple meter entries connected by the "fail" link are understood to contain the parameters for a specified algorithm, and traffic conforming to a given rate follows their "succeed" paths. Within this MIB, ONLY Token Bucket parameters are specified. Other varieties of meters can be designed in other MIB modules ๐Ÿงš

When the MIB is used for configuration, diffServMeterNextFree ALWAYS contains a legal value for diffServMeterId that isn't currently used in the system's configuration ๐Ÿ’–

3.3.2. diffServTBParamTable - The Token Bucket Parameters Table ๐ŸŽ€

The Token Bucket Parameters Table is a set of parameters that define a Token Bucket Meter. As a parameter, a token bucket can be specified once and applied to many interfaces, using diffServMeterSpecific. Specifically, several modes of [srTCM] and [trTCM] are addressed. Other varieties of meters may be specified in other MIB modules ๐ŸŒธ

In general, if a Token Bucket has N rates, it has N+1 potential outcomes. The traffic stream is slower than, and therefore conforms to, ALL of the rates. OR it fails the first few but is slower than, and conforms to, the higher rates. OR it fails all of them ๐Ÿซ  So multi-rate meters should specify those rates in monotonically increasing order, moving from the more committed rates to the more excess rates through diffServMeterFailNext, and finally falling through diffServMeterFailNext to the set of actions that apply to traffic conforming to none of the specified rates. diffServTBParamType in the first entry tells you which algorithm is being used. At each rate, diffServTBParamRate is derivable from diffServTBParamBurstSize and diffServTBParamInterval. A superior implementation lets you configure ANY two of diffServTBParamRate, diffServTBParamBurstSize, and diffServTBParamInterval, and it responds with the appropriate error code if all three are specified but they aren't mathematically related ๐Ÿงฎ (not the vibe, but the math is mathing)

When the MIB is used for configuration, diffServTBParamNextFree always contains a legal value for diffServTBParamId that isn't currently used in the system's configuration ๐Ÿ‘‘


3.4. Actions applied to packets ๐Ÿ”ฅ

"Actions" are the things a differentiated services interface PHB can do to a packet in transit. At a minimum, a policy might calculate statistics on traffic in various configured classes, mark it with a DSCP, drop it, or enqueue it before passing it on for other processing ๐Ÿฆ‹

Actions are made up of a structural element, the diffServActionTable, plus various component action entries that can be applied. In the case of the Algorithmic Dropper, an additional parameter table can be specified to control Active Queue Management, as defined in [RED93] and other AQM specifications ๐ŸŒˆ

3.4.1. diffServActionTable - The Action Table ๐Ÿงš

The action table identifies sequences of actions to be applied to a packet. Successive actions get chained through diffServActionNext, and the chain ultimately ends at zeroDotZero (meaning the policy is complete), a pointer to a queue, or a pointer to some other functional data path element ๐Ÿ’…

When the MIB is used for configuration, diffServActionNextFree ALWAYS contains a legal value for diffServActionId that isn't currently used in the system's configuration โœจ

3.4.2. diffServCountActTable - The Count Action Table ๐Ÿ“Š

The count action accumulates statistics about traffic passing through a given path through the policy. It's meant to be useful for usage-based billing, statistical studies, or analyzing how a policy behaves in a given network ๐Ÿ’– The objects in the Count Action are various counters and a discontinuity time. The counters show the number of packets and bytes encountered on the path since the discontinuity time. They share the same discontinuity time, which is the discontinuity time of the interface or agent ๐Ÿ™ˆ

The designers of this MIB expect every path through a policy to have a corresponding counter. In early versions, you literally could not configure an action without implementing a counter ๐Ÿ˜ญ The current design makes counters in effect the network manager's option, though, because actions were made consistent in structure and extensibility. So the assurance of proper debugging and accounting is left with the policy designer ๐Ÿซถ

When the MIB is used for configuration, diffServCountActNextFree always contains a legal value for diffServCountActId that isn't currently used in the system's configuration ๐ŸŽ€

3.4.3. diffServDscpMarkActTable - The Mark Action Table ๐ŸŒˆ

The Mark Action table is an unusual table, both in SNMP AND in this MIB ๐Ÿคฏ You can view it less as an array of single-object entries and more as an array of OBJECT-IDENTIFIER conventions, because the OID for a diffServDscpMarkActDscp instance carries all of the necessary information: packets are to be marked with the requisite DSCP.

So, contrary to common practice, the index for the table is read-only, and it is both the Entry's index AND its only value ๐Ÿ’œ

3.4.4. diffServAlgDropTable - The Algorithmic Drop Table ๐Ÿ’€

The Algorithmic Drop Table identifies a dropping algorithm, drops packets, and counts the drops. Classified as an action, it's effectively a method that applies a packet to a queue, and it may modify either one ๐Ÿฆ‹ When the algorithm is "always drop", this is simple. When the algorithm calls for head-drop, tail-drop, or a variety of Active Queue Management, the queue gets inspected. In the case of Active Queue Management, additional parameters are REQUIRED ๐Ÿšจ

What may not be clear from the name is that an Algorithmic Drop action often does NOT drop traffic ๐Ÿ˜ญ Algorithms other than "always drop" normally drop a few percent of packets at most. The action inspects the diffServQEntry that diffServAlgDropQMeasure points to in order to decide whether the packet should be dropped ๐Ÿ“

When the MIB is used for configuration, diffServAlgDropNextFree always contains a legal value for diffServAlgDropId that isn't currently used in the system's configuration ๐Ÿ’…

3.4.5. diffServRandomDropTable - The Random Drop Parameters Table โœจ

okay so the Random Drop Table is basically the Algorithmic Drop Table's glow-up ๐Ÿ’– It's meant for queues whose depth is actively managed, which is giving Active Queue Management energy. AQM algorithms are typified by [RED93], but the parameters they use vary from one to the next. So for this MIB, the proper values to represent are:

  • Target case mean queue depth, expressed in bytes or packets
  • Worst case mean queue depth, expressed in bytes or packets
  • Maximum drop rate expressed as drops per thousand
  • Coefficient of an exponentially weighted moving average, expressed as the numerator of a fraction whose denominator is 65536.
  • Sampling rate

Here's how this MIB represents the element in Figure 1 ๐Ÿงš

          AlgDrop                                   Queue
          +-----------------+                       +-------+
      --->| Next   ---------+--+------------------->| Next -+--> ...
          | QMeasure -------+--+                    | ...   |
          | QThreshold      |     RandomDrop        +-------+
          | Type=randomDrop |     +----------------+
          | Specific -------+---->| MinThreshBytes |
          +-----------------+     | MaxThreshBytes |
                                  | ProbMax        |
                                  | Weight         |
                                  | SamplingRate   |
                                  +----------------+

Figure 1: Example Use of the RandomDropTable for Random Droppers

Random droppers often describe their drop probability as a plot of drop probability (P) against averaged queue length (Q) ๐Ÿ“ˆ The point (Qmin,Pmin) marks the start of that characteristic plot. Normally Pmin=0, which means that when the average queue length is below Qmin, there will be no drops. The point (Qmax,Pmax) is a "knee" on the plot, and after it the drop probability gets more progressive (greater slope). The point (Qclip,1) is the queue length where all packets will be dropped. This is different from Tail Drop, because this uses an averaged queue length. It is possible, though, for Qclip to equal Qmax.

In the MIB module, diffServRandomDropMinThreshBytes and diffServRandomDropMinThreshPkts represent Qmin. diffServRandomDropMaxThreshBytes and diffServRandomDropMaxThreshPkts represent Qmax. diffServAlgDropQThreshold represents Qclip, and diffServRandomDropInvProbMax represents Pmax (inverse). This MIB does not represent Pmin, which is assumed to be zero unless it's represented some other way. Also, since message memory is finite, queues generally have some upper bound above which they can't store any more traffic ๐Ÿ™ˆ Normally this number is equal to Qclip, which is specified by diffServAlgDropQThreshold.

Each random dropper specification is associated with a queue. This lets multiple drop processes (of the same or different types) be attached to the same queue, which different PHB implementations may need. It also allows for sequences of multiple droppers if that's necessary ๐Ÿ”ฅ

The calculation of a smoothed queue length can have a big impact on how the dropper behaves! Parameters may include the sampling interval or rate, and the weight of each sample. The performance may be super sensitive to these values, and a wide range of possible values may be needed because link speeds vary a lot ๐Ÿ’€ Most algorithms include a sample weight, which is represented here by diffServRandomDropWeight. Being able to read diffServRandomDropSamplingRate is important, because the information it provides is essential to configuring diffServRandomDropWeight. Making Sampling Rate configurable is helpful too. As line speed increases, you need queue sampling to be less frequent than packet arrival. Note, though, that there is ongoing research on this topic, see e.g. [ACTQMGMT] and [AQMROUTER] ๐Ÿฆ‹

Additional parameters may be added in an enterprise MIB module, e.g. by using AUGMENTS on this table, to handle aspects of random drop algorithms that aren't standardized here ๐ŸŒธ

When the MIB is used for configuration, diffServRandomDropNextFree always contains a legal value for diffServRandomDropId that isn't currently used in the system's configuration.


3.5. Queuing and Scheduling of Packets ๐ŸŒˆ

These include Queues and Schedulers, which are inter-related in how they use queuing techniques. Because of that, you can build multi-level schedulers. For example, you can treat a set of queues as having priority among them, and then at a specific priority find a secondary WFQ scheduler with some number of queues inside it ๐Ÿ‘‘

3.5.1. diffServQTable - The Class or Queue Table ๐Ÿ’…

The Queue Table models simple FIFO queues. The Scheduler Table lets you build both simple and somewhat more complex queuing hierarchies out of those queues ๐ŸŽ€

Queue Table entries are pointed at by the "next" attributes of the upstream elements, such as diffServMeterSucceedNext or diffServActionNext. Multiple upstream elements can send their traffic to the same Queue Table entry, and that's totally a thing. For example, the Assured Forwarding PHB suggests that all traffic marked AF11, AF12 or AF13 be placed in the same queue, after metering, without reordering. To make that happen, the upstream diffServAlgDropNext pointers each point to the same diffServQEntry โœจ

A common requirement of a queue is that its traffic gets a certain minimum or maximum rate, or that it gets a certain priority. Functionally, picking one of those is a job for a scheduler. The parameter is associated with the queue, though, and it's set using the Minimum or Maximum Rate Parameters Table ๐Ÿ’–

When the MIB is used for configuration, diffServQNextFree always contains a legal value for diffServQId that isn't currently used in the system's configuration.

3.5.2. diffServSchedulerTable - The Scheduler Table ๐Ÿงš

The scheduler, and therefore the Scheduler Table, accepts inputs from either queues or a preceding scheduler. The Scheduler Table lets you build both simple and somewhat more complex queuing hierarchies out of those queues ๐Ÿ’œ

When the MIB is used for configuration, diffServSchedulerNextFree always contains a legal value for diffServSchedulerId that isn't currently used in the system's configuration.

3.5.3. diffServMinRateTable - The Minimum Rate Table ๐Ÿ“

When the output rate of a queue or scheduler must be given a minimum rate or a priority, that's done using the diffServMinRateTable ๐ŸŒท

Rates may be expressed as absolute rates, or as a fraction of ifSpeed, and they imply the use of a rate-based scheduler such as WFQ or WRR. Using a priority implies the use of a Priority Scheduler. Only one of the Absolute or Relative rates needs to be set. The other one takes the relevant value as a result. Excess capacity is distributed proportionally among the inputs to a scheduler using the assured rate. More complex functionality may be described by augmenting this MIB ๐Ÿซถ

When a priority scheduler is used, its effect is to give the queue the entire capacity of the subject interface, minus the capacity used by higher priorities, if there is traffic present to use it. This is true regardless of the rate specifications applied to that queue or to other queues on the interface. Policing excess traffic will mitigate this behavior ๐Ÿ˜ญ

When the MIB is used for configuration, diffServMinRateNextFree always contains a legal value for diffServMinRateId that isn't currently used in the system's configuration.

3.5.4. diffServMaxRateTable - The Maximum Rate Table ๐ŸŒˆ

When the output rate of a queue or scheduler must be limited to at most a specified maximum rate, that's done using the diffServMaxRateTable. Rates may be expressed as absolute rates, or as a fraction of ifSpeed. Only one of the Absolute or Relative rate needs to be set. The other one takes the relevant value as a result ๐Ÿ’…

Defining a multirate shaper requires multiple diffServMaxRateEntries. In that case, an algorithm such as [SHAPER] is used. In that algorithm, more than one rate is specified, and at any given time, traffic is shaped to the lowest specified rate that exceeds the arrival rate of traffic โญ

When the MIB is used for configuration, diffServMaxRateNextFree always contains a legal value for diffServMaxRateId that isn't currently used in the system's configuration.

3.5.5. Using queues and schedulers together โœจ

Okay so for a Strict Priority scheduler, every input gets a priority compared to all the other inputs feeding that same scheduler, and the other parameters just stay at their defaults ๐Ÿ’…. Higher-priority traffic that isn't being held back for shaping gets served before a lower-priority input. Figure 2 is giving full priority queue energy ๐ŸŽ€

                                  +-----+
            +-------+             | P S |
            | Queue +------------>+ r c |
            +-------+-+--------+  | i h |
                      |Priority|  | o e |
                      +--------+  | r d +----------->
            +-------+             | i u |
            | Queue +------------>+ t l |
            +-------+-+--------+  | y e |
                      |Priority|  |   r |
                      +--------+  +-----+

Figure 2: Priority Scheduler with two queues

For weighted schedulers like WFQ or WRR, the "weight" of each input is modeled with a Minimum Service Rate leaky-bucket profile ๐Ÿซถ. That gives an input a guaranteed minimum bandwidth, if it needs one. The rate lives in diffServMinRateAbsolute, and the classic weight is the ratio of that rate to the interface speed, or maybe the ratio of that rate to the total of the configured class rates. There's also diffServMinRateRelative, which is a fraction of the interface's current line rate. That's super handy when line rates bounce around, or when a higher-level policy is written in fractions of network resources. The two rates are inter-related, so a change in one may be reflected in the other. See figure 3 โœจ

                                  +-----+
            +-------+             | W S |
            | Queue +------------>+ R c |
            +-------+-+--------+  | R h |
                      |  Rate  |  |   e |
                      +--------+  | o d +----------->
            +-------+             | r u |
            | Queue +------------>+   l |
            +-------+-+--------+  | W e |
                      |  Rate  |  | F r |
                      +--------+  | Q   |
                                  +-----+

Figure 3: WRR or WFQ rate-based scheduler with two inputs

Loosely speaking, WRR is all about meeting bandwidth sharing and doesn't care about relative delay between the queues ๐Ÿ™ˆ. WFQ is the one that controls both the service order and how much traffic gets serviced, so it gives you bandwidth sharing and relative delay ordering amongst the queues ๐Ÿ‘‘

A queue or scheduled set of queues (which is an input to a scheduler) may also be capable of acting as a non-work-conserving [MODEL] traffic shaper ๐Ÿฆ‹. You do this by defining a Maximum Service Rate leaky-bucket profile, which limits the scheduler bandwidth available to that input. The rate is represented in diffServMaxRateAbsolute, and the classic weight is the ratio of that rate to the interface speed, or maybe the ratio of that rate to the total of the configured class rates. The rate can also be a relative value, as a fraction of the interface's current line rate, in diffServMaxRateRelative. This MIB presumes that shaping is something a scheduler does to its inputs, which it models either as a queue with a maximum rate or as a scheduler whose output has a maximum rate.

                                  +-----+
            +-------+             | W S |
            | Queue +------------>+ R c |
            +-------+-+--------+  | R h |
                      |  Rate  |  |   e |
                      +--------+  | o d +----------->
            +-------+             | r u |
            | Queue +------------>+   l |
            +-------+-+--------+  | W e |
                      |  Rate  |  | F r |
                      +--------+  | Q   |
                                  +-----+

The same trick works on a queue, if a given class needs to be shaped to a maximum rate without shaping the other classes, as in Figure 5 ๐ŸŒธ

Other types of priority and weighted scheduling methods can be defined using existing parameters in diffServMinRateEntry. NOTE: diffServSchedulerMethod uses OBJECT IDENTIFIER syntax, with the different types of scheduling methods defined as OBJECT-IDENTITY. ๐Ÿค“

                                  +---+
            +-------+             | S |
            | Queue +------------>+ c |
            +-------+-+--------+  | h |
                      |        |  | e +----------->
                      +--------+  | d +-+-------+
                                  | u | |Shaping|
            +-------+             | l | | Rate  |
            | Queue +------------>+ e | +-------+
            +-------+-+--------+  | r |
                      |        |  +---+
                      +--------+

Figure 4: Shaping scheduled traffic to a known rate

                                  +---+
            +-------+             | S |
            | Queue +------------>+ c |
            +-------+-+--------+  | h |
                      |Min Rate|  | e +----------->
                      +--------+  | d |
                                  | u |
            +-------+             | l |
            | Queue +------------>+ e |
            +-------+-+--------+  | r |
                      |Min Rate|  |   |
                      +--------+  |   |
                      |Max Rate|  |   |
                      +--------+  +---+

Figure 5: Shaping one input to a work-conserving scheduler

Future scheduling methods may be defined in other MIBs. That takes an OBJECT-IDENTITY definition, a description of how the existing objects are reused (if they are), and any new objects they require ๐Ÿ“š

To implement an EF and two AF classes, you have to combine priority and WRR/WFQ scheduling, which means cascading two schedulers ๐Ÿ”ฅ. If you also want to shape the output of the system to a rate lower than the interface rate, you have to place an upper bound rate on the output of the priority scheduler. See figure 6 ๐Ÿ’œ


3.6. Example configuration for AF and EF ๐Ÿงš

For the sake of argument, let's build an example with one EF class and four AF classes using the constructs in this MIB ๐Ÿ’–

3.6.1. AF and EF Ingress Interface Configuration ๐ŸŒˆ

The ingress edge interface identifies traffic into classes, meters it, and makes sure any excess is dealt with appropriately according to the PHB. For AF, that means marking the excess. For EF, it means dropping the excess or shaping it to a maximum rate ๐Ÿ’…

                                                  +-----+
      +-------+                                   | P S |
      | Queue +---------------------------------->+ r c |
      +-------+----------------------+--------+   | i h |
                                     |Priority|   | o e +----------->
                                     +--------+   | r d +-+-------+
                            +------+              | i u | |Shaping|
      +-------+             | W S  +------------->+ t l | | Rate  |
      | Queue +------------>+ R c  +-+--------+   | y e | +-------+
      +-------+-+--------+  | R h  | |Priority|   |   r |
                |Min Rate|  |   e  | +--------+   +-----+
                +--------+  | o d  |
      +-------+             | r u  |
      | Queue +------------>+   l  |
      +-------+-+--------+  | W e  |
                |Min Rate|  | F r  |
                +--------+  | Q    |
                            +------+

Figure 6: Combined EF and AF services using cascaded schedulers.

        +-----------------------+
        | diffServDataPathStart |
        +-----------+-----------+
                    |
         +----------+
         |
      +--+--+     +-----+     +-----+     +-----+     +-----+
      | AF1 +-----+ AF2 +-----+ AF3 +-----+ AF4 +-----+ EF  |
      +--+--+     +--+--+     +--+--+     +--+--+     +--+--+
         |           |           |           |           |
      +--+--+     +--+--+     +--+--+     +--+--+     +--+--+
      |trTCM|     |trTCM|     |trTCM|     |trTCM|     |srTCM|
      |Meter|     |Meter|     |Meter|     |Meter|     |Meter|
      +-+++-+     +-+++-+     +-+++-+     +-+++-+     +-+-+-+
        |||         |||         |||         |||         | |
      +-+||---+   +-+||---+   +-+||---+   +-+||---+   +-+-|---+
      |+-+|----+  |+-+|----+  |+-+|----+  |+-+|----+  |+--+----+
      ||+-+-----+ ||+-+-----+ ||+-+-----+ ||+-+-----+ ||Actions|
      +||Actions| +||Actions| +||Actions| +||Actions| +|       |
       +|       |  +|       |  +|       |  +|       |  +-+-----+
        +-+-----+   +-+-----+   +-+-----+   +-+-----+    |
        |||         |||         |||         |||          |
        VVV         VVV         VVV         VVV          V

              Accepted traffic is sent to IP forwarding

Figure 7: combined EF and AF implementation, ingress side

3.6.1.1. Classification In The Example ๐Ÿ”

A packet landing on an ingress interface grabs its policy from the diffServDataPathTable ๐Ÿ’Œ. That points to a classifier, which picks out traffic based on some specification for each traffic class.

An example of a classifier for an AFm class would be a set of three classifier elements, each pointing to a Multi-field classification parameter block that identifies one of the AFmn DSCPs. Alternatively, the filters might contain selectors for HTTP traffic or some other application ๐ŸŒ

An example of a classifier for EF traffic might be a classifier element pointing to a filter that specifies the EF code point, a collection of classifiers with parameter blocks that specify individual telephone calls, or a variety of other approaches ๐Ÿ“ž

Typically, of course, a classifier identifies a whole bunch of traffic and breaks it up into separate classes ๐Ÿงฉ. It might very well contain fourteen classifier elements: one for each of the twelve AFmn DSCP values, one for EF, and one for "everything else". These would presumably direct traffic down six functional data paths, one for each AF or EF class and one for all other traffic ๐Ÿฆ‹

3.6.1.2. AF Implementation On an Ingress Edge Interface ๐ŸŽ€

Each AFm class applies a Two Rate Three Color Meter, which divides traffic into three groups. These groups of traffic conform to both specified rates, only the higher one, or none of them. The intent, on the ingress interface at the edge of the network, is to measure traffic and mark it appropriately โœจ

3.6.1.2.1. AF Metering On an Ingress Edge Interface ๐Ÿ“

Each AFm class applies a Two Rate Three Color Meter, dividing traffic into three groups. If two rates R and S, where R < S, are specified and traffic arrives at rate T, then traffic comprising up to R bits per second is considered to conform to the "confirmed" rate, R. If R < T, traffic comprising up to S-R bits per second is considered to conform to the "excess" rate, S. Any further excess is non-conformant ๐Ÿ™…โ€โ™€๏ธ

Two meter entries are used to configure this, one for the conforming rate and one for the excess rate. The rate parameters are stored in associated Token Bucket Parameter Entries. The "FailNext" pointer of the lower rate Meter Entry points to the other Meter Entry. Both "SucceedNext" pointers and the "FailNext" pointer of the higher Meter Entry point to lists of actions. In the color-blind mode, all three classifier "next" entries point to the lower rate meter entry. In the color-aware mode, the AFm1 classifier points to the lower rate entry, the AFm2 classifier points to the higher rate entry (since it is only compared against that rate), and the AFm3 classifier points directly to the actions taken when both rates fail ๐Ÿ’œ

3.6.1.2.2. AF Actions On an Ingress Edge Interface โœจ

okay so for network planning (and maybe billing ๐Ÿ’ธ), we count everything that arrives. ๐Ÿงฎ That means we set up a count action, which is an action table entry pointing to a count table entry. ๐Ÿ“Š

We also mark traffic with the right DSCP ๐ŸŽ€. The first R bits per second get marked AFm1, the next S-R bits per second get marked AFm2, and the rest get marked AFm3. ๐Ÿซถ Traffic might already be arriving with that same DSCP, but in general, checking whether it's being remarked to the same value is extra complexity that doesn't really help. So we set up a mark action, which is an action table entry pointing to a mark table entry. ๐Ÿ’…

At this point the usual thing happens and the traffic just gets forwarded normally. โœˆ๏ธ To show that, the SucceedNext pointer of the Mark Action is set to zeroDotZero. ๐Ÿฆ‹

3.6.1.3. EF Implementation On an Ingress Edge Interface

the EF class applies a Single Rate Two Color Meter ๐ŸŒธ, which splits traffic into conforming and excess groups. ๐Ÿซง The goal, on the ingress interface at the edge of the network, is to measure conforming traffic, mark it appropriately, and drop the excess. ๐Ÿšซ๐Ÿ’–

3.6.1.3.1. EF Metering On an Ingress Edge Interface

a single rate two color (srTCM) meter needs one token bucket ๐Ÿชฃ. So it's configured with a single meter entry and a matching Token Bucket Parameter Entry. Arriving traffic either "succeeds" or "fails". โœ…โŒ

3.6.1.3.2. EF Actions On an Ingress Edge Interface

same energy as before, but for EF โœจ. For network planning and maybe billing, we count arriving traffic that conforms to the meter. So we configure a count action, which is an action table entry pointing to a count table entry. ๐Ÿ”ข

We also (re)mark traffic with the EF DSCP ๐Ÿ’œ. So we configure a mark action, which is an action table entry pointing to a mark table entry. ๐ŸŽ€

Then the successful traffic gets forwarded normally. ๐Ÿƒโ€โ™€๏ธ To show that, the SucceedNext pointer of the Mark Action is set to zeroDotZero. ๐ŸŒˆ

Traffic that breaks the arrival policy, though, has to be dropped ๐Ÿ™…โ€โ™€๏ธ๐Ÿ’€. You can put a count action on this traffic if you want the extra counters, but the drop counter in the Algorithmic Drop Entry already counts dropped packets, so it's not clearly necessary. ๐Ÿคทโ€โ™€๏ธ An Algorithmic Drop Entry of type alwaysDrop with no successor is enough. ๐Ÿ‘‘

3.7. AF and EF Egress Edge Interface Configuration ๐Ÿฆข

3.7.1. Classification On an Egress Edge Interface

okay so a packet that shows up at an egress interface might have already been classified on an ingress interface, and the egress interface might be able to see that info ๐Ÿ‘€. If it's relevant, there's zero reason not to use it ๐Ÿ’…. If it's not available, though, the egress interface might need to (re)classify ๐Ÿ”„. Either way, it picks up its "program" from the diffServDataPathTable ๐Ÿงš. That points to a classifier, which selects traffic according to some specification for each traffic class. ๐Ÿ—‚๏ธ

        +-----------------------+
        | diffServDataPathStart |
        +-----------+-----------+
                    |
         +----------+
         |
      +--+--+     +-----+     +-----+     +-----+     +-----+
      | AF1 +-----+ AF2 +-----+ AF3 +-----+ AF4 +-----+ EF  |
      +-+++-+     +-+++-+     +-+++-+     +-+++-+     +-+-+-+
        |||         |||         |||         |||         | |
      +-+++-+     +-+++-+     +-+++-+     +-+++-+     +-+-+-+
      |trTCM|     |trTCM|     |trTCM|     |trTCM|     |srTCM|
      |Meter|     |Meter|     |Meter|     |Meter|     |Meter|
      +-+++-+     +-+++-+     +-+++-+     +-+++-+     +-+-+-+
        |||         |||         |||         |||         | |
      +-+||---+   +-+||---+   +-+||---+   +-+||---+   +-+-|---+
      |+-+|----+  |+-+|----+  |+-+|----+  |+-+|----+  |+--+----+
      ||+-+-----+ ||+-+-----+ ||+-+-----+ ||+-+-----+ ||Actions|
      +||Actions| +||Actions| +||Actions| +||Actions| +|       |
       +|       |  +|       |  +|       |  +|       |  +-+-----+
        +-+-----+   +-+-----+   +-+-----+   +-+-----+    |
        |||         |||         |||         |||          |
      +-+++--+    +-+++--+    +-+++--+    +-+++--+    +--+---+
      | Queue|    | Queue|    | Queue|    | Queue|    | Queue|
      +--+---+    +--+---+    +--+---+    +--+---+    +--+---+
         |           |           |           |           |
      +--+-----------+-----------+-----------+---+       |
      |     WFQ/WRR Scheduler                    |       |
      +--------------------------------------+---+       |
                                             |           |
                                       +-----+-----------+----+
                                       |  Priority Scheduler  |
                                       +----------+-----------+
                                                  |
                                                  V

          Figure 8: combined EF and AF implementation

an example of a classifier for an AFm class would be three classifier elements in a row ๐Ÿ”—, each pointing to a Multi-field classification parameter block that identifies one of the AFmn DSCPs. ๐Ÿงฉ Or, the filter could hold selectors for HTTP traffic or some other application ๐ŸŒ.

an example of a classifier for EF traffic might be a classifier element pointing to a Multi-field parameter that specifies the EF code point ๐Ÿ’œ. It could also be a bunch of classifiers with parameter blocks for individual telephone calls ๐Ÿ“ž, or one of a variety of other approaches ๐ŸŒท.

each classifier delivers traffic to the right functional data path elements. ๐Ÿššโœจ

3.7.2. AF Implementation On an Egress Edge Interface

each AFm class applies a Two Rate Three Color Meter ๐ŸŒˆ, which splits traffic into three groups ๐Ÿ“. These groups are traffic that conforms to both specified rates, traffic that conforms only to the higher one, and traffic that conforms to neither. ๐Ÿซง The intent, on the ingress interface at the edge of the network, is to measure traffic and mark it appropriately. ๐Ÿ’–

3.7.2.1. AF Metering On an Egress Edge Interface โœจ

okay so each AFm class runs a Two Rate Three Color Meter ๐ŸŒˆ, which sorts traffic into three groups. If you have two rates R and S, where R < S, and traffic arrives at rate T, then traffic up to R bits per second counts as conforming to the "confirmed" rate, R. If R < T, traffic up to S-R bits per second conforms to the "excess" rate, S. Anything past that is non-conformant ๐Ÿ’€.

Two meter entries handle this, one for the conforming rate and one for the excess rate. The rate parameters live in associated Token Bucket Parameter Entries ๐Ÿงš. The "FailNext" pointer of the lower rate Meter Entry points to the other Meter Entry. Both "SucceedNext" pointers and the "FailNext" pointer of the higher Meter Entry point to lists of actions ๐Ÿซถ. In the color-blind mode, all three classifier "next" entries point to the lower rate meter entry. In the color-aware mode, the AFm1 classifier points to the lower rate entry, the AFm2 classifier points to the higher rate entry (since it's only compared against that rate), and the AFm3 classifier points directly to the actions taken when both rates fail ๐Ÿ’….

      +-----------------------------------------------------+
      |                     Classifier                      |
      +--------+--------------------------------------------+
               |Green| Yellow| Red
               |     |       |
            +--+-----+-------+--+ Fail +--------------------+
            |      Meter        +------+      Meter         |
            +--+----------------+      +---+-------+--------+
               | Succeed (Green)           |       |Fail (Red)
               |                 +---------+       |
               |                 | Succeed (Yellow)|
          +----+----+       +----+----+       +----+----+
          |  Count  |       |  Count  |       |  Count  |
          |  Action |       |  Action |       |  Action |
          +----+----+       +----+----+       +----+----+
               |                 |                 |
          +----+----+       +----+----+       +----+----+
          |Mark AFx1|       |Mark AFx2|       |Mark AFx3|
          |  Action |       |  Action |       |  Action |
          +----+----+       +----+----+       +----+----+
               |                 |                 |
          +----+----+       +----+----+       +----+----+
          |  Random |       |  Random |       |  Random |
          |  Drop   |       |  Drop   |       |  Drop   |
          |  Action |       |  Action |       |  Action |
          +----+----+       +----+----+       +----+----+
               |                 |                 |
      +--------+-----------------+-----------------+--------+
      |                        Queue                        |
      +--------------------------+--------------------------+
                                 |
                            +----+----+
                            |  Rate   |
                            |Scheduler|
                            +----+----+
                                 |

      Figure 9a: Typical AF Edge egress interface configuration,
                 using color-blind meters

      +-----------------------------------------------------+
      |                     Classifier                      |
      +--------+--------------------------------------------+
               |Green            | Yellow          | Red
               |                 |                 |
          +----+----+       +----+----+            |
          |  Count  |       |  Count  |            |
          |  Action +-------+  Action +------------+
          +----+----+ Fail  +----+----+  Fail      |
               |Succeed          |Succeed          |
          +----+----+       +----+----+       +----+----+
          |  Count  |       |  Count  |       |  Count  |
          |  Action |       |  Action |       |  Action |
          +----+----+       +----+----+       +----+----+
               |                 |                 |
          +----+----+       +----+----+       +----+----+
          |Mark AFx1|       |Mark AFx2|       |Mark AFx3|
          |  Action |       |  Action |       |  Action |
          +----+----+       +----+----+       +----+----+
               |                 |                 |
          +----+----+       +----+----+       +----+----+
          |  Random |       |  Random |       |  Random |
          |  Drop   |       |  Drop   |       |  Drop   |
          |  Action |       |  Action |       |  Action |
          +----+----+       +----+----+       +----+----+
               |                 |                 |
      +--------+-----------------+-----------------+--------+
      |                        Queue                        |
      +--------------------------+--------------------------+
                                 |
                            +----+----+
                            |  Rate   |
                            |Scheduler|
                            +----+----+
                                 |

      Figure 9b: Typical AF Edge egress interface configuration,
                 using color-aware meters

      +-----------------------------------------------------+
      |                     Classifier                      |
      +--------+-----------------+-----------------+--------+
               | Green           | Yellow          | Red
               |                 |                 |
          +----+----+       +----+----+       +----+----+
          |  Count  |       |  Count  |       |  Count  |
          |  Action |       |  Action |       |  Action |
          +----+----+       +----+----+       +----+----+
               |                 |                 |
          +----+----+       +----+----+       +----+----+
          |  Random |       |  Random |       |  Random |
          |  Drop   |       |  Drop   |       |  Drop   |
          |  Action |       |  Action |       |  Action |
          +----+----+       +----+----+       +----+----+
               |                 |                 |
      +--------+-----------------+-----------------+--------+
      |                        Queue                        |
      +--------------------------+--------------------------+
                                 |
                            +----+----+
                            |  Rate   |
                            |Scheduler|
                            +----+----+
                                 |

      Figure 10: Typical AF Edge core interface configuration

3.7.2.2. AF Actions On an Egress Edge Interface ๐Ÿฆ‹

so for network planning, and maybe for billing too ๐Ÿงพ, departing traffic is normally counted. That's why a "count" action gets configured, made of an action table entry pointing to a count table entry ๐Ÿ’–.

Traffic can also get marked with an appropriate DSCP ๐Ÿ“. The first R bits per second are marked AFm1, the next S-R bits per second are marked AFm2, and the rest gets marked AFm3. It could happen that traffic shows up already marked with the same DSCP, but in general, figuring out that it's being remarked to the same value just isn't worth the extra complexity ๐Ÿ™ˆ. So a "mark" action gets configured too, made of an action table entry pointing to a mark table entry.

At this point the usual case is that traffic is now queued for transmission ๐Ÿšฆ. The queue uses Active Queue Management, with an algorithm such as RED. So an Algorithmic Dropper gets configured for each AFmn traffic stream, with a slightly lower min-threshold (and possibly a lower max-threshold) for the excess traffic than for the committed traffic ๐Ÿ‘‘.

3.7.2.3. AF Rate-based Queuing On an Egress Edge Interface ๐ŸŒธ

The queue AF expects is normally a work-conserving queue โœจ. It usually has a specified minimum rate, and it may have a maximum rate below the interface's bandwidth. In concept, it uses as much bandwidth as is available to it, but it still guarantees the lower bound ๐Ÿซถ.

Common ways to build this include various forms of Weighted Fair Queuing (WFQ) or Weighted Round Robin (WRR) ๐ŸŽ€. Averaged over a longer interval, these give each class a predictable throughput rate. They differ in that over short intervals they order traffic differently. In general, traffic classes that keep traffic sitting in a queue will tend to soak up latency from queues with lower mean occupancy, and in exchange they get to use any spare capacity going ๐Ÿ”ฅ.

3.7.3. EF Implementation On an Egress Edge Interface ๐Ÿ’œ

The EF class applies a Single Rate Two Color Meter, which splits traffic into "conforming" and "excess" groups ๐ŸŒˆ. The goal, on the egress interface at the edge of the network, is to measure and appropriately mark the conforming traffic and drop the excess ๐Ÿ’….

3.7.3.1. EF Metering On an Egress Edge Interface ๐Ÿงš

A single rate two color (srTCM) meter needs one token bucket ๐Ÿชฃ. So it's configured using a single meter entry with a corresponding Token Bucket Parameter Entry. Arriving traffic either "succeeds" or "fails" โœจ.

3.7.3.2. EF Actions On an Egress Edge Interface

Okay so, for network planning and maybe billing too ๐Ÿ’… traffic that conforms to the meter usually gets counted on the way out. That's why we configure a "count" action, which is an action table entry pointing to a count table entry ๐Ÿงฎ

Also, the traffic gets (re)marked with the EF DSCP โœจ so we configure a "mark" action too. That's an action table entry pointing to a mark table entry.

      +-----------------------------------------------------+
      |                     Classifier                      |
      +-------------------------+---------------------------+
                                | Voice
                                |
                  +-------------+----------+
                  |           Meter        |
                  +----+-------------+-----+
                       | Succeed     | Fail
                       |             |
                  +----+----+   +----+----+
                  |  Count  |   |  Always |
                  |  Action |   |  Drop   |
                  +----+----+   |  Action |
                       |        +---------+
                  +----+---------+
                  |  Algorithmic |
                  |  Drop Action |
                  +----+---------+
                       |
      +----------------+---------------+
      |              Queue             |
      +----------------+---------------+
                       |
                 +-----+-----+
                 |  Priority |
                 | Scheduler |
                 +-----+-----+

      Figure 11: Typical EF Edge (Policing) Configuration

              +--------------------------------+
              |           Classifier           |
              +----------------+---------------+
                               | Voice
                               |
                          +----+----+
                          |  Count  |
                          |  Action |
                          +----+----+
                               |
                        +------+-------+
                        |  Algorithmic |
                        |  Drop Action |
                        +------+-------+
                               |
              +----------------+---------------+
              |              Queue             |
              +----------------+---------------+
                               |
                         +-----+-----+
                         |  Priority |
                         | Scheduler |
                         +-----+-----+

      Figure 12: Typical EF Core interface Configuration

At this point, the traffic that passed is queued for transmission ๐Ÿš€ using either a priority queue or a rate-based queue with a lot of over-provisioning. Since we know how much traffic is present, you might not drop from this queue at all ๐Ÿซถ

Traffic that went over the policy, though, gets dropped ๐Ÿ’€ You can add a count action on that traffic if the individual counters are interesting to you. Honestly though, the drop counter in the Algorithmic Drop Entry already counts the dropped packets, so that's not clearly necessary. An Algorithmic Drop Entry of type alwaysDrop with no successor is enough, no cap ๐Ÿ’–

3.7.3.3. EF Priority Queuing On an Egress Edge Interface

The normal setup is a priority queue, because it keeps induced jitter super low ๐ŸŒธ Each EF class gets its own separate queue, and those queues sit in strict ordering. Iconic behaviour, honestly ๐Ÿ‘‘


4. Conventions used in this MIB

4.1. The use of RowPointer to indicate data path linkage

RowPointer is a textual convention, and its whole job is to identify a conceptual row in a MIB table by pointing to one of its objects ๐ŸŽ€ This MIB uses it in one of its main ways, to show succession, by pointing to the data path linkage table entries.

When it comes to succession, the RowPointer is answering the question "what happens next?" ๐Ÿงš Instead of assuming the next table has to be the one the conceptual model [MODEL] describes and then giving its index, the RowPointer takes you straight to the MIB row for that thing. In the diffServMeterTable, for example, the diffServMeterFailNext RowPointer might take you to another meter, while the diffServMeterSucceedNext RowPointer would take you to an action.

A RowPointer isn't tied to any specific object beyond whatever value it holds, so it's totally possible and acceptable to use RowPointers to merge data paths ๐Ÿฆ‹ An obvious example is the classifier. Traffic matching the DSCPs AF11, AF12, and AF13 might all go to the same meter so they get the processing described in the Assured Forwarding PHB. Another use is merging data paths from several interfaces. If they represent a single service contract, sharing one set of counters and one policy might be a really desirable setup ๐Ÿ’…

Note well, though: these configurations can come with related implementation issues. If Differentiated Services processing for the interfaces is implemented across multiple forwarding engines, those engines will need to talk to each other if they're going to implement a feature like this. An implementation that doesn't provide this capability isn't considered to have failed the intention of this MIB or of the [MODEL]. An implementation that does provide it isn't considered superior from a standards perspective, so no ranking drama here ๐Ÿ™ˆ
NOTE -- The RowPointer construct is what connects the functional data paths. The [MODEL] describes these as TCBs, which is a helpful way to understand them. This MIB doesn't model TCBs directly, though. It works at a lower level of abstraction, using only individual elements connected in succession by RowPointers. So the idea of TCBs enclosing individual Functional Data Path elements isn't directly applicable to this MIB, even though management tools that use this MIB might still use that concept ๐Ÿง 

A path through a device that follows a set of RowPointers can be indeterminate, meaning it ends in a dangling RowPointer ๐Ÿ˜ญ The MIB module's DESCRIPTION-clause gives guidance for each linkage attribute. In general, for both zeroDotZero and a dangling RowPointer, the data path is assumed to end, and the traffic should be handed to the next logical part of the device. That's usually a forwarding process, a transmission engine, or the proverbial bit-bucket (aka the place packets go to disappear ๐Ÿ—‘๏ธ). If something varies from this usage, the attribute affected will say so.

4.2. The use of RowPointer to indicate parameters

RowPointer is also used in this MIB to show parameterization, meaning it points to parameterization table entries ๐ŸŒˆ

For indirection, like in the diffServClfrElementTable, the goal is to let other MIBs (including proprietary ones) define new and arcane filters, like MAC headers, IPv4 and IPv6 headers, BGP Communities, and all sorts of other wild things ๐Ÿงš All while still using this MIB's structures. It's a form of class inheritance (if you know "object oriented" language). It lets base object definitions ("classes") get extended in proprietary or standard ways in the future by other documents. Very main character energy ๐Ÿ‘‘

RowPointer also makes it clear that the content of the identified conceptual row doesn't change. That means it can be used and pointed to at the same time by more than one data path linkage table entry ๐Ÿซถ The identification of RowPointer lets higher level policy mechanisms take advantage of this.

4.3. Conceptual row creation and deletion

A bunch of conceptual tables in this MIB use an arbitrary integer value as their index, and that value has to be unique across the scope of the agent ๐Ÿ“ To help with multi-manager row-creation problems, there has to be a mechanism that lets a manager get unique index values, and that makes sure the manager knows whether it got what it wanted or not. Crucial stuff, bestie.

Typically, a table like this has an associated NextFree variable, like diffServClfrNextFree. That variable gives a suitable value for the index of the next row to be created, like diffServClfrId. A value of zero means the agent can't configure any more entries. The table also has a columnar Status attribute with RowStatus syntax [RFC 2579].

Usually, when a manager tries to create a row, the agent creates it and returns success ๐Ÿ’– If the agent doesn't have enough resources, or the row already exists, it returns an error instead. A manager has to be ready to try again in those cases, probably by re-reading the NextFree value to get a new index. That's because a second manager might have slipped in between the first manager's read of NextFree and the first manager's row-creation attempt ๐Ÿ˜ญ

To make creating and deleting rows in this MIB easier to manage, the agent is expected to help keep things consistent ๐Ÿงš It might do this by keeping internal usage counters for any row that a RowPointer could point to, or by some other equivalent method. When a RowPointer gets created or written, and the row it points to doesn't exist, the SET returns an inconsistentValue error. When a RowStatus variable is set to 'destroy' but the usage counter is non-zero, the SET doesn't return an error, but the indicated row is left intact. The agent should remove that row later, once the usage counter hits zero ๐Ÿซง

The use of RowStatus is covered in more detail in [RFC 2579].

5. Extending this MIB โœจ

With the structures of this MIB split into data path linkage tables and parameterization tables, and with RowPointer in the mix, new data path linkage and parameterization tables can be defined in other MIB modules and used with the tables defined in this MIB ๐Ÿฆ‹ This MIB doesn't limit what type of entries its RowPointer attributes can point to. So new functional data path elements can be defined in other MIBs and plugged into the functional data path elements of this MIB. For example, a new Action functional data path element could be defined for Traffic Engineering and integrated with Differentiated Services functional data path elements, possibly used in the same data path, sharing the same classifiers and meters ๐Ÿ’…

It's more likely that new parameterization tables will show up in other MIBs, as new methods or proprietary methods get deployed for existing Differentiated Services Functional Data Path Elements ๐ŸŽ€ For example, different kinds of filters can be defined by using new filter parameterization tables. New scheduling methods can be deployed by defining new scheduling method OIDs and new scheduling parameter tables.

Notice that both new data path linkage tables and new parameterization tables can be added without needing to change this MIB document or affecting existing tables and how they're used. Iykyk, it's so clean ๐ŸŒธ

6. MIB Definition ๐Ÿ“

DIFFSERV-DSCP-TC DEFINITIONS ::= BEGIN

    IMPORTS
    Integer32, MODULE-IDENTITY, mib-2
         FROM SNMPv2-SMI
    TEXTUAL-CONVENTION
         FROM SNMPv2-TC;

okay bestie, the MIB keeps going and it's giving precision ๐Ÿ’…๐ŸŽ€ Everything below is copied exactly, because the machines are picky ๐Ÿค–๐Ÿซถ

diffServDSCPTC MODULE-IDENTITY
    LAST-UPDATED "200205090000Z"
    ORGANIZATION "IETF Differentiated Services WG"
    CONTACT-INFO
       "       Fred Baker
               Cisco Systems
               1121 Via Del Rey
               Santa Barbara, CA 93117, USA
               E-mail: fred@cisco.com

               Kwok Ho Chan
               Nortel Networks
               600 Technology Park Drive
               Billerica, MA 01821, USA
               E-mail: khchan@nortelnetworks.com

               Andrew Smith
               Harbour Networks
               Jiuling Building
               21 North Xisanhuan Ave.
               Beijing, 100089, PRC
               E-mail: ah_smith@acm.org

                 Differentiated Services Working Group:
                 diffserv@ietf.org"
    DESCRIPTION
       "The Textual Conventions defined in this module should be used
       whenever a Differentiated Services Code Point is used in a MIB."
    REVISION "200205090000Z"
    DESCRIPTION
       "Initial version, published as RFC 3289."
    ::= { mib-2 96 }

Dscp ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "d"
    STATUS   current
    DESCRIPTION
       "A Differentiated Services Code-Point that may be used for
       marking a traffic stream."
    REFERENCE
        "RFC 2474, RFC 2780"
    SYNTAX   Integer32 (0..63)

DscpOrAny ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "d"
    STATUS   current
    DESCRIPTION
       "The IP header Differentiated Services Code-Point that may be
       used for discriminating among traffic streams. The value -1 is
       used to indicate a wild card i.e. any value."
    REFERENCE
        "RFC 2474, RFC 2780"
    SYNTAX   Integer32 (-1 | 0..63)

END

DIFFSERV-MIB DEFINITIONS ::= BEGIN

    IMPORTS
    Unsigned32, Counter64, MODULE-IDENTITY, OBJECT-TYPE,
    OBJECT-IDENTITY, zeroDotZero, mib-2
         FROM SNMPv2-SMI
    TEXTUAL-CONVENTION, RowStatus, RowPointer,
    StorageType, AutonomousType
         FROM SNMPv2-TC
    MODULE-COMPLIANCE, OBJECT-GROUP
         FROM SNMPv2-CONF
    ifIndex, InterfaceIndexOrZero
        FROM IF-MIB
    InetAddressType, InetAddress, InetAddressPrefixLength,
    InetPortNumber
        FROM INET-ADDRESS-MIB
    BurstSize
        FROM INTEGRATED-SERVICES-MIB
    Dscp, DscpOrAny
        FROM DIFFSERV-DSCP-TC;

diffServMib MODULE-IDENTITY
    LAST-UPDATED "200202070000Z"
    ORGANIZATION "IETF Differentiated Services WG"
    CONTACT-INFO
       "       Fred Baker
               Cisco Systems
               1121 Via Del Rey
               Santa Barbara, CA 93117, USA
               E-mail: fred@cisco.com

               Kwok Ho Chan
               Nortel Networks
               600 Technology Park Drive
               Billerica, MA 01821, USA
               E-mail: khchan@nortelnetworks.com

               Andrew Smith
               Harbour Networks
               Jiuling Building
               21 North Xisanhuan Ave.
               Beijing, 100089, PRC
               E-mail: ah_smith@acm.org

               Differentiated Services Working Group:
               diffserv@ietf.org"
    DESCRIPTION
       "This MIB defines the objects necessary to manage a device that
       uses the Differentiated Services Architecture described in RFC
       2475. The Conceptual Model of a Differentiated Services Router
       provides supporting information on how such a router is modeled."
    REVISION "200202070000Z"
    DESCRIPTION
       "Initial version, published as RFC 3289."
    ::= { mib-2 97 }

diffServMIBObjects     OBJECT IDENTIFIER ::= { diffServMib 1 }
diffServMIBConformance OBJECT IDENTIFIER ::= { diffServMib 2 }
diffServMIBAdmin       OBJECT IDENTIFIER ::= { diffServMib 3 }

IndexInteger ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "d"
    STATUS   current
    DESCRIPTION
       "An integer which may be used as a table index."
    SYNTAX   Unsigned32 (1..4294967295)

IndexIntegerNextFree ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "d"
    STATUS   current
    DESCRIPTION
       "An integer which may be used as a new Index in a table.

       The special value of 0 indicates that no more new entries can be
       created in the relevant table.

       When a MIB is used for configuration, an object with this SYNTAX
       always contains a legal value (if non-zero) for an index that is
       not currently used in the relevant table. The Command Generator
       (Network Management Application) reads this variable and uses the
       (non-zero) value read when creating a new row with an SNMP SET.
       When the SET is performed, the Command Responder (agent) must
       determine whether the value is indeed still unused; Two Network
       Management Applications may attempt to create a row
       (configuration entry) simultaneously and use the same value. If
       it is currently unused, the SET succeeds and the Command
       Responder (agent) changes the value of this object, according to
       an implementation-specific algorithm.  If the value is in use,
       however, the SET fails.  The Network Management Application must
       then re-read this variable to obtain a new usable value.

       An OBJECT-TYPE definition using this SYNTAX MUST specify the
       relevant table for which the object is providing this
       functionality."
    SYNTAX   Unsigned32 (0..4294967295)

IfDirection ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION
       "IfDirection specifies a direction of data travel on an
       interface. 'inbound' traffic is operated on during reception from
       the interface, while 'outbound' traffic is operated on prior to
       transmission on the interface."
    SYNTAX  INTEGER {
                inbound(1),     -- ingress interface
                outbound(2)     -- egress interface
}

--
-- Data Path
--

diffServDataPath       OBJECT IDENTIFIER ::= { diffServMIBObjects 1 }

--
-- Data Path Table
--
-- The Data Path Table enumerates the Differentiated Services
-- Functional Data Paths within this device.  Each entry in this table
-- is indexed by ifIndex and ifDirection.  Each entry provides the
-- first Differentiated Services Functional Data Path Element to
-- process data flowing along specific data path.  This table should
-- have at most two entries for each interface capable of
-- Differentiated Services processing on this device: ingress and
-- egress.

-- Note that Differentiated Services Functional Data Path Elements
-- linked together using their individual next pointers and anchored by
-- an entry of the diffServDataPathTable constitute a functional data
-- path.
--

diffServDataPathTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServDataPathEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "The data path table contains RowPointers indicating the start of
       the functional data path for each interface and traffic direction
       in this device. These may merge, or be separated into parallel
       data paths."
    ::= { diffServDataPath 1 }

diffServDataPathEntry OBJECT-TYPE
    SYNTAX       DiffServDataPathEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry in the data path table indicates the start of a single
       Differentiated Services Functional Data Path in this device.

       These are associated with individual interfaces, logical or
       physical, and therefore are instantiated by ifIndex. Therefore,
       the interface index must have been assigned, according to the
       procedures applicable to that, before it can be meaningfully
       used. Generally, this means that the interface must exist.

       When diffServDataPathStorage is of type nonVolatile, however,
       this may reflect the configuration for an interface whose ifIndex
       has been assigned but for which the supporting implementation is
       not currently present."
    INDEX { ifIndex, diffServDataPathIfDirection }
    ::= { diffServDataPathTable 1 }

DiffServDataPathEntry ::= SEQUENCE  {
    diffServDataPathIfDirection    IfDirection,
    diffServDataPathStart          RowPointer,
    diffServDataPathStorage        StorageType,
    diffServDataPathStatus         RowStatus
}

diffServDataPathIfDirection OBJECT-TYPE
    SYNTAX       IfDirection
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "IfDirection specifies whether the reception or transmission path
       for this interface is in view."
    ::= { diffServDataPathEntry 1 }

diffServDataPathStart OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This selects the first Differentiated Services Functional Data
       Path Element to handle traffic for this data path. This
       RowPointer should point to an instance of one of:
         diffServClfrEntry
         diffServMeterEntry
         diffServActionEntry
         diffServAlgDropEntry
         diffServQEntry

       A value of zeroDotZero in this attribute indicates that no
       Differentiated Services treatment is performed on traffic of this
       data path. A pointer with the value zeroDotZero normally
       terminates a functional data path.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    ::= { diffServDataPathEntry 2 }

diffServDataPathStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServDataPathEntry 3 }

diffServDataPathStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time."
    ::= { diffServDataPathEntry 4 }

--
-- Classifiers
--

diffServClassifier     OBJECT IDENTIFIER ::= { diffServMIBObjects 2 }

--
-- Classifier Table
--
-- The Classifier Table allows multiple classifier elements, of same or
-- different types, to be used together. A classifier must completely
-- classify all packets presented to it. This means that all traffic
-- presented to a classifier must match at least one classifier element
-- within the classifier, with the classifier element parameters
-- specified by a filter.

-- If there is ambiguity between classifier elements of different
-- classifier, classifier linkage order indicates their precedence; the
-- first classifier in the link is applied to the traffic first.

-- Entries in the classifier element table serves as the anchor for
-- each classification pattern, defined in filter table entries.  Each
-- classifier element table entry also specifies the subsequent
-- downstream Differentiated Services Functional Data Path Element when
-- the classification pattern is satisfied. Each entry in the
-- classifier element table describes one branch of the fan-out
-- characteristic of a classifier indicated in the Informal
-- Differentiated Services Model section 4.1.  A classifier is composed
-- of one or more classifier elements.

diffServClfrNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServClfrId, or a
       zero to indicate that none exist."
    ::= { diffServClassifier 1 }

okay bestie, the classifier table is basically the guest list for the whole party ๐ŸŽ€โœจ every classifier gets its own row here ๐Ÿ’…

diffServClfrTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServClfrEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "This table enumerates all the diffserv classifier functional
       data path elements of this device.  The actual classification
       definitions are defined in diffServClfrElementTable entries
       belonging to each classifier.

       An entry in this table, pointed to by a RowPointer specifying an
       instance of diffServClfrStatus, is frequently used as the name
       for a set of classifier elements, which all use the index
       diffServClfrId. Per the semantics of the classifier element
       table, these entries constitute one or more unordered sets of
       tests which may be simultaneously applied to a message to
       classify it.

       The primary function of this table is to ensure that the value of
       diffServClfrId is unique before attempting to use it in creating
       a diffServClfrElementEntry. Therefore, the diffServClfrEntry must
       be created on the same SET as the diffServClfrElementEntry, or
       before the diffServClfrElementEntry is created."
    ::= { diffServClassifier 2 }

diffServClfrEntry OBJECT-TYPE
    SYNTAX       DiffServClfrEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry in the classifier table describes a single classifier.
       All classifier elements belonging to the same classifier use the
       classifier's diffServClfrId as part of their index."
    INDEX { diffServClfrId }
    ::= { diffServClfrTable 1 }

DiffServClfrEntry ::= SEQUENCE  {
    diffServClfrId              IndexInteger,
    diffServClfrStorage         StorageType,
    diffServClfrStatus          RowStatus
}

diffServClfrId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the classifier entries.  Managers
       should obtain new values for row creation in this table by
       reading diffServClfrNextFree."
    ::= { diffServClfrEntry 1 }

diffServClfrStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServClfrEntry 2 }

diffServClfrStatus OBJECT-TYPE

    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServClfrEntry 3 }

ok now we're in the classifier element zone ๐Ÿงš this is where the actual tests live, and the precedence stuff is giving main character energy ๐Ÿ‘‘

--
-- Classifier Element Table
--
diffServClfrElementNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServClfrElementId,
       or a zero to indicate that none exist."
    ::= { diffServClassifier 3 }

diffServClfrElementTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServClfrElementEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "The classifier element table enumerates the relationship between
       classification patterns and subsequent downstream Differentiated
       Services Functional Data Path elements.
       diffServClfrElementSpecific points to a filter that specifies the
       classification parameters. A classifier may use filter tables of
       different types together.

       One example of a filter table defined in this MIB is
       diffServMultiFieldClfrTable, for IP Multi-Field Classifiers
       (MFCs). Such an entry might identify anything from a single
       micro-flow (an identifiable sub-session packet stream directed
       from one sending transport to the receiving transport or
       transports), or aggregates of those such as the traffic from a
       host, traffic for an application, or traffic between two hosts
       using an application and a given DSCP. The standard Behavior
       Aggregate used in the Differentiated Services Architecture is
       encoded as a degenerate case of such an aggregate - the traffic
       using a particular DSCP value.

       Filter tables for other filter types may be defined elsewhere."

    ::= { diffServClassifier 4 }

diffServClfrElementEntry OBJECT-TYPE
    SYNTAX       DiffServClfrElementEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry in the classifier element table describes a single
       element of the classifier."
    INDEX { diffServClfrId, diffServClfrElementId }
    ::= { diffServClfrElementTable 1 }

DiffServClfrElementEntry ::= SEQUENCE  {
    diffServClfrElementId          IndexInteger,
    diffServClfrElementPrecedence  Unsigned32,
    diffServClfrElementNext        RowPointer,
    diffServClfrElementSpecific    RowPointer,
    diffServClfrElementStorage     StorageType,
    diffServClfrElementStatus      RowStatus
}

diffServClfrElementId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Classifier Element entries.
       Managers obtain new values for row creation in this table by
       reading diffServClfrElementNextFree."
    ::= { diffServClfrElementEntry 1 }

diffServClfrElementPrecedence OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The relative order in which classifier elements are applied:
       higher numbers represent classifier element with higher
       precedence.  Classifier elements with the same order must be
       unambiguous i.e. they must define non-overlapping patterns, and
       are considered to be applied simultaneously to the traffic
       stream. Classifier elements with different order may overlap in
       their filters:  the classifier element with the highest order
       that matches is taken.

       On a given interface, there must be a complete classifier in
       place at all times in the ingress direction.  This means one or
       more filters must match any possible pattern. There is no such
       requirement in the egress direction."
    ::= { diffServClfrElementEntry 2 }

diffServClfrElementNext OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This attribute provides one branch of the fan-out functionality
       of a classifier described in the Informal Differentiated Services
       Model section 4.1.

       This selects the next Differentiated Services Functional Data
       Path Element to handle traffic for this data path. This
       RowPointer should point to an instance of one of:
         diffServClfrEntry
         diffServMeterEntry
         diffServActionEntry
         diffServAlgDropEntry
         diffServQEntry

       A value of zeroDotZero in this attribute indicates no further
       Differentiated Services treatment is performed on traffic of this
       data path. The use of zeroDotZero is the normal usage for the
       last functional data path element of the current data path.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."

    ::= { diffServClfrElementEntry 3 }

diffServClfrElementSpecific OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "A pointer to a valid entry in another table, filter table, that
       describes the applicable classification parameters, e.g. an entry
       in diffServMultiFieldClfrTable.

       The value zeroDotZero is interpreted to match anything not
       matched by another classifier element - only one such entry may
       exist for each classifier.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the element is ignored."
    ::= { diffServClfrElementEntry 4 }

diffServClfrElementStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServClfrElementEntry 5 }

diffServClfrElementStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServClfrElementEntry 6 }

last bit for this part, and the IP multi-field table is literally the most iconic one ๐Ÿฆ‹ it's where the actual IP header matching happens, no cap ๐ŸŒˆ

--
-- IP Multi-field Classification Table
--
-- Classification based on six different fields in the IP header.
-- Functional Data Paths may share definitions by using the same entry.
--

diffServMultiFieldClfrNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for
       diffServMultiFieldClfrId, or a zero to indicate that none exist."
    ::= { diffServClassifier 5 }

diffServMultiFieldClfrTable OBJECT-TYPE
    SYNTAX   SEQUENCE OF DiffServMultiFieldClfrEntry
    MAX-ACCESS   not-accessible
    STATUS   current
    DESCRIPTION
       "A table of IP Multi-field Classifier filter entries that a
       system may use to identify IP traffic."
    ::= { diffServClassifier 6 }

diffServMultiFieldClfrEntry OBJECT-TYPE
    SYNTAX       DiffServMultiFieldClfrEntry
    MAX-ACCESS   not-accessible
    STATUS   current
    DESCRIPTION
       "An IP Multi-field Classifier entry describes a single filter."
    INDEX { diffServMultiFieldClfrId }
    ::= { diffServMultiFieldClfrTable 1 }

DiffServMultiFieldClfrEntry ::= SEQUENCE {
    diffServMultiFieldClfrId           IndexInteger,
    diffServMultiFieldClfrAddrType     InetAddressType,
    diffServMultiFieldClfrDstAddr      InetAddress,
    diffServMultiFieldClfrDstPrefixLength InetAddressPrefixLength,
    diffServMultiFieldClfrSrcAddr      InetAddress,
    diffServMultiFieldClfrSrcPrefixLength InetAddressPrefixLength,
    diffServMultiFieldClfrDscp         DscpOrAny,
    diffServMultiFieldClfrFlowId       Unsigned32,
    diffServMultiFieldClfrProtocol     Unsigned32,
    diffServMultiFieldClfrDstL4PortMin InetPortNumber,
    diffServMultiFieldClfrDstL4PortMax InetPortNumber,
    diffServMultiFieldClfrSrcL4PortMin InetPortNumber,
    diffServMultiFieldClfrSrcL4PortMax InetPortNumber,
    diffServMultiFieldClfrStorage      StorageType,
    diffServMultiFieldClfrStatus       RowStatus
}

diffServMultiFieldClfrId OBJECT-TYPE
    SYNTAX         IndexInteger
    MAX-ACCESS     not-accessible
    STATUS     current
    DESCRIPTION
       "An index that enumerates the MultiField Classifier filter
       entries.  Managers obtain new values for row creation in this
       table by reading diffServMultiFieldClfrNextFree."

    ::= { diffServMultiFieldClfrEntry 1 }

Okay so we're picking up right where the classifier row left off, and this part covers the address and port matching bits. Then we hit the Meters section ๐Ÿฆ‹

diffServMultiFieldClfrAddrType OBJECT-TYPE
    SYNTAX         InetAddressType
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The type of IP address used by this classifier entry.  While
       other types of addresses are defined in the InetAddressType
       textual convention, and DNS names, a classifier can only look at
       packets on the wire. Therefore, this object is limited to IPv4
       and IPv6 addresses."
    ::= { diffServMultiFieldClfrEntry 2 }

diffServMultiFieldClfrDstAddr OBJECT-TYPE
    SYNTAX         InetAddress
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The IP address to match against the packet's destination IP
       address. This may not be a DNS name, but may be an IPv4 or IPv6
       prefix.  diffServMultiFieldClfrDstPrefixLength indicates the
       number of bits that are relevant."
    ::= { diffServMultiFieldClfrEntry 3 }

diffServMultiFieldClfrDstPrefixLength OBJECT-TYPE
    SYNTAX         InetAddressPrefixLength
    UNITS          "bits"
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The length of the CIDR Prefix carried in
       diffServMultiFieldClfrDstAddr. In IPv4 addresses, a length of 0
       indicates a match of any address; a length of 32 indicates a
       match of a single host address, and a length between 0 and 32
       indicates the use of a CIDR Prefix. IPv6 is similar, except that
       prefix lengths range from 0..128."
    DEFVAL         { 0 }
    ::= { diffServMultiFieldClfrEntry 4 }

diffServMultiFieldClfrSrcAddr OBJECT-TYPE
    SYNTAX         InetAddress
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The IP address to match against the packet's source IP address.
       This may not be a DNS name, but may be an IPv4 or IPv6 prefix.
       diffServMultiFieldClfrSrcPrefixLength indicates the number of
       bits that are relevant."
    ::= { diffServMultiFieldClfrEntry 5 }

diffServMultiFieldClfrSrcPrefixLength OBJECT-TYPE
    SYNTAX         InetAddressPrefixLength
    UNITS          "bits"
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION

       "The length of the CIDR Prefix carried in
       diffServMultiFieldClfrSrcAddr. In IPv4 addresses, a length of 0
       indicates a match of any address; a length of 32 indicates a
       match of a single host address, and a length between 0 and 32
       indicates the use of a CIDR Prefix. IPv6 is similar, except that
       prefix lengths range from 0..128."
    DEFVAL         { 0 }
    ::= { diffServMultiFieldClfrEntry 6 }

diffServMultiFieldClfrDscp OBJECT-TYPE
    SYNTAX         DscpOrAny
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The value that the DSCP in the packet must have to match this
       entry. A value of -1 indicates that a specific DSCP value has not
       been defined and thus all DSCP values are considered a match."
    DEFVAL         { -1 }
    ::= { diffServMultiFieldClfrEntry 7 }

diffServMultiFieldClfrFlowId OBJECT-TYPE
    SYNTAX         Unsigned32 (0..1048575)
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The flow identifier in an IPv6 header."
    ::= { diffServMultiFieldClfrEntry 8 }

diffServMultiFieldClfrProtocol OBJECT-TYPE
    SYNTAX         Unsigned32 (0..255)
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The IP protocol to match against the IPv4 protocol number or the
       IPv6 Next- Header number in the packet. A value of 255 means
       match all.  Note the protocol number of 255 is reserved by IANA,
       and Next-Header number of 0 is used in IPv6."
    DEFVAL         { 255 }
    ::= { diffServMultiFieldClfrEntry 9 }

diffServMultiFieldClfrDstL4PortMin OBJECT-TYPE
    SYNTAX         InetPortNumber
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The minimum value that the layer-4 destination port number in
       the packet must have in order to match this classifier entry."
    DEFVAL         { 0 }
    ::= { diffServMultiFieldClfrEntry 10 }

diffServMultiFieldClfrDstL4PortMax OBJECT-TYPE
    SYNTAX         InetPortNumber
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The maximum value that the layer-4 destination port number in
       the packet must have in order to match this classifier entry.
       This value must be equal to or greater than the value specified
       for this entry in diffServMultiFieldClfrDstL4PortMin."
    DEFVAL         { 65535 }
    ::= { diffServMultiFieldClfrEntry 11 }

diffServMultiFieldClfrSrcL4PortMin OBJECT-TYPE
    SYNTAX         InetPortNumber
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The minimum value that the layer-4 source port number in the
       packet must have in order to match this classifier entry."
    DEFVAL         { 0 }
    ::= { diffServMultiFieldClfrEntry 12 }

diffServMultiFieldClfrSrcL4PortMax OBJECT-TYPE
    SYNTAX         InetPortNumber
    MAX-ACCESS     read-create
    STATUS         current
    DESCRIPTION
       "The maximum value that the layer-4 source port number in the
       packet must have in order to match this classifier entry. This
       value must be equal to or greater than the value specified for
       this entry in diffServMultiFieldClfrSrcL4PortMin."
    DEFVAL         { 65535 }
    ::= { diffServMultiFieldClfrEntry 13 }

diffServMultiFieldClfrStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServMultiFieldClfrEntry 14 }

diffServMultiFieldClfrStatus OBJECT-TYPE

    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServMultiFieldClfrEntry 15 }

Meters ๐ŸŒธ

Now we're in the meters zone, and this bit is giving "building blocks" energy. The MIB has a specific definition for the Token Bucket Meter, but it's only one kind of meter spec, and other metering parameter sets can be defined in other MIBs ๐Ÿงš

--
-- Meters
--

diffServMeter          OBJECT IDENTIFIER ::= { diffServMIBObjects 3 }

--
-- This MIB supports a variety of Meters.  It includes a specific
-- definition for Token Bucket Meter, which are but one type of
-- specification. Other metering parameter sets can be defined in other
-- MIBs.

-- Multiple meter elements may be logically cascaded using their
-- diffServMeterSucceedNext and diffServMeterFailNext pointers if
-- required. One example of this might be for an AF PHB implementation
-- that uses multiple level conformance meters.

-- Cascading of individual meter elements in the MIB is intended to be
-- functionally equivalent to multiple level conformance determination
-- of a packet.  The sequential nature of the representation is merely
-- a notational convenience for this MIB.

-- srTCM meters (RFC 2697) can be specified using two sets of
-- diffServMeterEntry and diffServTBParamEntry. The first set specifies
-- the Committed Information Rate and Committed Burst Size
-- token-bucket.  The second set specifies the Excess Burst Size
-- token-bucket.

-- trTCM meters (RFC 2698) can be specified using two sets of
-- diffServMeterEntry and diffServTBParamEntry. The first set specifies
-- the Committed Information Rate and Committed Burst Size
-- token-bucket.  The second set specifies the Peak Information Rate
-- and Peak Burst Size token-bucket.

-- tswTCM meters (RFC 2859) can be specified using two sets of
-- diffServMeterEntry and diffServTBParamEntry. The first set specifies
-- the Committed Target Rate token-bucket.  The second set specifies
-- the Peak Target Rate token-bucket. diffServTBParamInterval in each
-- token bucket reflects the Average Interval.
--

diffServMeterNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServMeterId, or a
       zero to indicate that none exist."
    ::= { diffServMeter 1 }

diffServMeterTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServMeterEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "This table enumerates specific meters that a system may use to
       police a stream of traffic. The traffic stream to be metered is
       determined by the Differentiated Services Functional Data Path
       Element(s) upstream of the meter i.e. by the object(s) that point
       to each entry in this table.  This may include all traffic on an
       interface.

       Specific meter details are to be found in table entry referenced
       by diffServMeterSpecific."
    ::= { diffServMeter 2 }

diffServMeterEntry OBJECT-TYPE
    SYNTAX       DiffServMeterEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry in the meter table describes a single conformance level
       of a meter."
    INDEX { diffServMeterId }
    ::= { diffServMeterTable 1 }

DiffServMeterEntry ::= SEQUENCE  {
    diffServMeterId                IndexInteger,
    diffServMeterSucceedNext       RowPointer,
    diffServMeterFailNext          RowPointer,
    diffServMeterSpecific          RowPointer,
    diffServMeterStorage           StorageType,
    diffServMeterStatus            RowStatus
}
diffServMeterId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Meter entries.  Managers obtain new
       values for row creation in this table by reading
       diffServMeterNextFree."
    ::= { diffServMeterEntry 1 }

diffServMeterSucceedNext OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "If the traffic does conform, this selects the next
       Differentiated Services Functional Data Path element to handle
       traffic for this data path. This RowPointer should point to an
       instance of one of:
         diffServClfrEntry
         diffServMeterEntry
         diffServActionEntry
         diffServAlgDropEntry
         diffServQEntry

       A value of zeroDotZero in this attribute indicates that no
       further Differentiated Services treatment is performed on traffic
       of this data path. The use of zeroDotZero is the normal usage for
       the last functional data path element of the current data path.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    DEFVAL      { zeroDotZero }
    ::= { diffServMeterEntry 2 }

Okay bestie, the meter stuff gets spicy here ๐ŸŒธ The MIB code is verbatim below, because implementers need every single character ๐Ÿ’…

diffServMeterFailNext OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "If the traffic does not conform, this selects the next
       Differentiated Services Functional Data Path element to handle
       traffic for this data path. This RowPointer should point to an
       instance of one of:
         diffServClfrEntry
         diffServMeterEntry
         diffServActionEntry
         diffServAlgDropEntry
         diffServQEntry

       A value of zeroDotZero in this attribute indicates no further
       Differentiated Services treatment is performed on traffic of this
       data path. The use of zeroDotZero is the normal usage for the
       last functional data path element of the current data path.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    DEFVAL      { zeroDotZero }
    ::= { diffServMeterEntry 3 }

diffServMeterSpecific OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This indicates the behavior of the meter by pointing to an entry
       containing detailed parameters. Note that entries in that
       specific table must be managed explicitly.

       For example, diffServMeterSpecific may point to an entry in
       diffServTBParamTable, which contains an instance of a single set
       of Token Bucket parameters.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the meter always succeeds."
    ::= { diffServMeterEntry 4 }

diffServMeterStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServMeterEntry 5 }

diffServMeterStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServMeterEntry 6 }

--
-- Token Bucket Parameter Table
--

diffServTBParam        OBJECT IDENTIFIER ::= { diffServMIBObjects 4 }

-- Each entry in the Token Bucket Parameter Table parameterize a single
-- token bucket.  Multiple token buckets can be used together to
-- parameterize multiple levels of conformance.

-- Note that an entry in the Token Bucket Parameter Table can be shared
-- by multiple diffServMeterTable entries.
--

diffServTBParamNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServTBParamId, or a
       zero to indicate that none exist."
    ::= { diffServTBParam 1 }

diffServTBParamTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServTBParamEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "This table enumerates a single set of token bucket meter
       parameters that a system may use to police a stream of traffic.
       Such meters are modeled here as having a single rate and a single
       burst size. Multiple entries are used when multiple rates/burst
       sizes are needed."
    ::= { diffServTBParam 2 }

diffServTBParamEntry OBJECT-TYPE
    SYNTAX       DiffServTBParamEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry that describes a single set of token bucket
       parameters."
    INDEX { diffServTBParamId }
    ::= { diffServTBParamTable 1 }

DiffServTBParamEntry ::= SEQUENCE  {
    diffServTBParamId              IndexInteger,
    diffServTBParamType            AutonomousType,
    diffServTBParamRate            Unsigned32,
    diffServTBParamBurstSize       BurstSize,
    diffServTBParamInterval        Unsigned32,
    diffServTBParamStorage         StorageType,
    diffServTBParamStatus          RowStatus
}

diffServTBParamId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Token Bucket Parameter entries.
       Managers obtain new values for row creation in this table by
       reading diffServTBParamNextFree."
    ::= { diffServTBParamEntry 1 }

diffServTBParamType OBJECT-TYPE
    SYNTAX       AutonomousType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The Metering algorithm associated with the Token Bucket
       parameters.  zeroDotZero indicates this is unknown.

       Standard values for generic algorithms:
       diffServTBParamSimpleTokenBucket, diffServTBParamAvgRate,
       diffServTBParamSrTCMBlind, diffServTBParamSrTCMAware,
       diffServTBParamTrTCMBlind, diffServTBParamTrTCMAware, and
       diffServTBParamTswTCM are specified in this MIB as OBJECT-
       IDENTITYs; additional values may be further specified in other
       MIBs."
    ::= { diffServTBParamEntry 2 }

diffServTBParamRate OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    UNITS        "kilobits per second"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The token-bucket rate, in kilobits per second (kbps). This
       attribute is used for:
       1. CIR in RFC 2697 for srTCM
       2. CIR and PIR in RFC 2698 for trTCM
       3. CTR and PTR in RFC 2859 for TSWTCM
       4. AverageRate in RFC 3290."
    ::= { diffServTBParamEntry 3 }

diffServTBParamBurstSize OBJECT-TYPE
    SYNTAX       BurstSize
    UNITS        "Bytes"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The maximum number of bytes in a single transmission burst. This
       attribute is used for:
       1. CBS and EBS in RFC 2697 for srTCM
       2. CBS and PBS in RFC 2698 for trTCM
       3. Burst Size in RFC 3290."
    ::= { diffServTBParamEntry 4 }

diffServTBParamInterval OBJECT-TYPE
    SYNTAX       Unsigned32 (1..4294967295)
    UNITS        "microseconds"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The time interval used with the token bucket.  For:
       1. Average Rate Meter, the Informal Differentiated Services Model
          section 5.2.1, - Delta.
       2. Simple Token Bucket Meter, the Informal Differentiated
          Services Model section 5.1, - time interval t.
       3. RFC 2859 TSWTCM, - AVG_INTERVAL.
       4. RFC 2697 srTCM, RFC 2698 trTCM, - token bucket update time
          interval."
    ::= { diffServTBParamEntry 5 }

diffServTBParamStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServTBParamEntry 6 }

diffServTBParamStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServTBParamEntry 7 }

--
-- OIDs for diffServTBParamType definitions.
--

diffServTBMeters  OBJECT IDENTIFIER ::= { diffServMIBAdmin 1 }

diffServTBParamSimpleTokenBucket OBJECT-IDENTITY
    STATUS       current
    DESCRIPTION
       "Two Parameter Token Bucket Meter as described in the Informal
       Differentiated Services Model section 5.2.3."
    ::= { diffServTBMeters 1 }

diffServTBParamAvgRate OBJECT-IDENTITY
    STATUS       current
    DESCRIPTION
       "Average Rate Meter as described in the Informal Differentiated
       Services Model section 5.2.1."
    ::= { diffServTBMeters 2 }

diffServTBParamSrTCMBlind OBJECT-IDENTITY
    STATUS       current
    DESCRIPTION
       "Single Rate Three Color Marker Metering as defined by RFC 2697,
       in the `Color Blind' mode as described by the RFC."
    REFERENCE
        "RFC 2697"
    ::= { diffServTBMeters 3 }

diffServTBParamSrTCMAware OBJECT-IDENTITY
    STATUS       current
    DESCRIPTION
       "Single Rate Three Color Marker Metering as defined by RFC 2697,
       in the `Color Aware' mode as described by the RFC."
    REFERENCE
        "RFC 2697"

    ::= { diffServTBMeters 4 }

diffServTBParamTrTCMBlind OBJECT-IDENTITY
    STATUS       current
    DESCRIPTION
       "Two Rate Three Color Marker Metering as defined by RFC 2698, in
       the `Color Blind' mode as described by the RFC."
    REFERENCE
        "RFC 2698"
    ::= { diffServTBMeters 5 }

diffServTBParamTrTCMAware OBJECT-IDENTITY
    STATUS       current
    DESCRIPTION
       "Two Rate Three Color Marker Metering as defined by RFC 2698, in
       the `Color Aware' mode as described by the RFC."
    REFERENCE
        "RFC 2698"
    ::= { diffServTBMeters 6 }

diffServTBParamTswTCM OBJECT-IDENTITY
    STATUS       current
    DESCRIPTION
       "Time Sliding Window Three Color Marker Metering as defined by
       RFC 2859."
    REFERENCE
        "RFC 2859"
    ::= { diffServTBMeters 7 }

--
-- Actions
--

diffServAction         OBJECT IDENTIFIER ::= { diffServMIBObjects 5 }

--
-- The Action Table allows enumeration of the different types of
-- actions to be applied to a traffic flow.
--

diffServActionNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServActionId, or a
       zero to indicate that none exist."
    ::= { diffServAction 1 }

diffServActionTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServActionEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "The Action Table enumerates actions that can be performed to a
       stream of traffic. Multiple actions can be concatenated. For
       example, traffic exiting from a meter may be counted, marked, and
       potentially dropped before entering a queue.

       Specific actions are indicated by diffServActionSpecific which
       points to an entry of a specific action type parameterizing the
       action in detail."
    ::= { diffServAction 2 }

diffServActionEntry OBJECT-TYPE
    SYNTAX       DiffServActionEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "Each entry in the action table allows description of one
       specific action to be applied to traffic."
    INDEX { diffServActionId }
    ::= { diffServActionTable 1 }

DiffServActionEntry ::= SEQUENCE  {
    diffServActionId                IndexInteger,
    diffServActionInterface         InterfaceIndexOrZero,
    diffServActionNext              RowPointer,
    diffServActionSpecific          RowPointer,
    diffServActionStorage           StorageType,
    diffServActionStatus            RowStatus
}

diffServActionId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Action entries.  Managers obtain
       new values for row creation in this table by reading
       diffServActionNextFree."
    ::= { diffServActionEntry 1 }

That's the whole meter-and-token-bucket crew ๐ŸŽ€ Meters decide if traffic is conforming, and the FailNext pointer tells the traffic where to go if it isn't ๐Ÿฆ‹ Token bucket params are the rate, burst, and interval numbers that make the meter tick โฑ๏ธ Action rows are next up, and they're giving concatenation vibes ๐Ÿงš

okay bestie, this part is all about where each action actually lives ๐Ÿฆ‹ the interface it runs on, where the traffic goes next, the extra details, and the counters ๐Ÿ”ฅ

diffServActionInterface  OBJECT-TYPE
     SYNTAX        InterfaceIndexOrZero
     MAX-ACCESS    read-create
     STATUS        current
     DESCRIPTION
       "The interface index (value of ifIndex) that this action occurs
       on. This may be derived from the diffServDataPathStartEntry's
       index by extension through the various RowPointers. However, as
       this may be difficult for a network management station, it is
       placed here as well.  If this is indeterminate, the value is
       zero.

       This is of especial relevance when reporting the counters which
       may apply to traffic crossing an interface:
          diffServCountActOctets,
          diffServCountActPkts,
          diffServAlgDropOctets,
          diffServAlgDropPkts,
          diffServAlgRandomDropOctets, and
          diffServAlgRandomDropPkts.

       It is also especially relevant to the queue and scheduler which
       may be subsequently applied."
     ::= { diffServActionEntry 2 }

diffServActionNext OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This selects the next Differentiated Services Functional Data
       Path Element to handle traffic for this data path. This
       RowPointer should point to an instance of one of:
         diffServClfrEntry
         diffServMeterEntry
         diffServActionEntry
         diffServAlgDropEntry
         diffServQEntry

       A value of zeroDotZero in this attribute indicates no further
       Differentiated Services treatment is performed on traffic of this
       data path. The use of zeroDotZero is the normal usage for the
       last functional data path element of the current data path.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    DEFVAL      { zeroDotZero }
    ::= { diffServActionEntry 3 }

diffServActionSpecific OBJECT-TYPE

    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "A pointer to an object instance providing additional information
       for the type of action indicated by this action table entry.

       For the standard actions defined by this MIB module, this should
       point to either a diffServDscpMarkActEntry or a
       diffServCountActEntry. For other actions, it may point to an
       object instance defined in some other MIB.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the Meter should be treated as
       if it were not present.  This may lead to incorrect policy
       behavior."
    ::= { diffServActionEntry 4 }

diffServActionStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServActionEntry 5 }

diffServActionStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServActionEntry 6 }

ok now the DSCP Mark action table ๐Ÿ’… this is where the actual DSCP value to stamp on packets gets stored, and one entry can be shared by a bunch of action rows ๐ŸŽ€

-- DSCP Mark Action Table
--
-- Rows of this table are pointed to by diffServActionSpecific to
-- provide detailed parameters specific to the DSCP Mark action.
--
-- A single entry in this table can be shared by multiple
-- diffServActionTable entries.
--

diffServDscpMarkActTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServDscpMarkActEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "This table enumerates specific DSCPs used for marking or
       remarking the DSCP field of IP packets. The entries of this table
       may be referenced by a diffServActionSpecific attribute."
    ::= { diffServAction 3 }

diffServDscpMarkActEntry OBJECT-TYPE
    SYNTAX       DiffServDscpMarkActEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry in the DSCP mark action table that describes a single
       DSCP used for marking."
    INDEX { diffServDscpMarkActDscp }
    ::= { diffServDscpMarkActTable 1 }

DiffServDscpMarkActEntry ::= SEQUENCE  {
    diffServDscpMarkActDscp          Dscp
}

diffServDscpMarkActDscp OBJECT-TYPE
    SYNTAX       Dscp
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "The DSCP that this Action will store into the DSCP field of the
       subject. It is quite possible that the only packets subject to
       this Action are already marked with this DSCP. Note also that
       Differentiated Services processing may result in packet being
       marked on both ingress to a network and on egress from it, and
       that ingress and egress can occur in the same router."
    ::= { diffServDscpMarkActEntry 1 }

next up is the Count Action table ๐ŸŒธ the counters live here, and there's a little note about why counting is optional and where it should go in a list of actions ๐Ÿงš

--
-- Count Action Table
--
-- Because the MIB structure allows multiple cascading
-- diffServActionEntry be used to describe multiple actions for a data
-- path, the counter became an optional action type.  In normal
-- implementation, either a data path has counters or it does not, as
-- opposed to being configurable. The management entity may choose to
-- read the counter or not.  Hence it is recommended for implementation
-- that have counters to always configure the count action as the first
-- of multiple actions.
--

diffServCountActNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for
       diffServCountActId, or a zero to indicate that none exist."
    ::= { diffServAction 4 }

diffServCountActTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServCountActEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "This table contains counters for all the traffic passing through
       an action element."
    ::= { diffServAction 5 }

diffServCountActEntry OBJECT-TYPE
    SYNTAX       DiffServCountActEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry in the count action table describes a single set of
       traffic counters."
    INDEX { diffServCountActId }
    ::= { diffServCountActTable 1 }

DiffServCountActEntry ::= SEQUENCE  {
    diffServCountActId           IndexInteger,
    diffServCountActOctets       Counter64,
    diffServCountActPkts         Counter64,
    diffServCountActStorage      StorageType,
    diffServCountActStatus       RowStatus
}

diffServCountActId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Count Action entries.  Managers
       obtain new values for row creation in this table by reading
       diffServCountActNextFree."
    ::= { diffServCountActEntry 1 }

diffServCountActOctets OBJECT-TYPE
    SYNTAX       Counter64
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "The number of octets at the Action data path element.

       Discontinuities in the value of this counter can occur at re-
       initialization of the management system and at other times as
       indicated by the value of ifCounterDiscontinuityTime on the
       relevant interface."
    ::= { diffServCountActEntry 2 }

diffServCountActPkts OBJECT-TYPE
    SYNTAX       Counter64
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "The number of packets at the Action data path element.

       Discontinuities in the value of this counter can occur at re-
       initialization of the management system and at other times as
       indicated by the value of ifCounterDiscontinuityTime on the
       relevant interface."
    ::= { diffServCountActEntry 3 }

diffServCountActStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServCountActEntry 4 }

diffServCountActStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServCountActEntry 5 }

last bit for this part is the Algorithmic Drop table ๐Ÿฆ‹ we're just getting started with it, so the next part picks up right where this one stops ๐Ÿ‘‘

--
-- Algorithmic Drop Table
--

diffServAlgDrop        OBJECT IDENTIFIER ::= { diffServMIBObjects 6 }

diffServAlgDropNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServAlgDropId, or a
       zero to indicate that none exist."
    ::= { diffServAlgDrop 1 }

diffServAlgDropTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServAlgDropEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "The algorithmic drop table contains entries describing an
       element that drops packets according to some algorithm."
    ::= { diffServAlgDrop 2 }

diffServAlgDropEntry OBJECT-TYPE
    SYNTAX       DiffServAlgDropEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry describes a process that drops packets according to
       some algorithm. Further details of the algorithm type are to be
       found in diffServAlgDropType and with more detail parameter entry
       pointed to by diffServAlgDropSpecific when necessary."
    INDEX { diffServAlgDropId }
    ::= { diffServAlgDropTable 1 }

DiffServAlgDropEntry ::= SEQUENCE  {
    diffServAlgDropId               IndexInteger,
    diffServAlgDropType             INTEGER,
    diffServAlgDropNext             RowPointer,
    diffServAlgDropQMeasure         RowPointer,
    diffServAlgDropQThreshold       Unsigned32,
    diffServAlgDropSpecific         RowPointer,
    diffServAlgDropOctets           Counter64,
    diffServAlgDropPkts             Counter64,
    diffServAlgRandomDropOctets     Counter64,
    diffServAlgRandomDropPkts       Counter64,
    diffServAlgDropStorage          StorageType,
    diffServAlgDropStatus           RowStatus
}

diffServAlgDropId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Algorithmic Dropper entries.
       Managers obtain new values for row creation in this table by
       reading diffServAlgDropNextFree."
    ::= { diffServAlgDropEntry 1 }

diffServAlgDropType OBJECT-TYPE
    SYNTAX       INTEGER {
                     other(1),
                     tailDrop(2),
                     headDrop(3),
                     randomDrop(4),
                     alwaysDrop(5)

okay bestie, we're picking up right where diffServAlgDropType was getting its whole personality ๐Ÿ’– the description is spilling over, so here's the rest of it, exactly as written. โœจ

    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The type of algorithm used by this dropper. The value other(1)
       requires further specification in some other MIB module.

       In the tailDrop(2) algorithm, diffServAlgDropQThreshold
       represents the maximum depth of the queue, pointed to by
       diffServAlgDropQMeasure, beyond which all newly arriving packets
       will be dropped.

       In the headDrop(3) algorithm, if a packet arrives when the
       current depth of the queue, pointed to by
       diffServAlgDropQMeasure, is at diffServAlgDropQThreshold, packets
       currently at the head of the queue are dropped to make room for
       the new packet to be enqueued at the tail of the queue.

       In the randomDrop(4) algorithm, on packet arrival, an Active
       Queue Management algorithm is executed which may randomly drop a
       packet. This algorithm may be proprietary, and it may drop either
       the arriving packet or another packet in the queue.
       diffServAlgDropSpecific points to a diffServRandomDropEntry that
       describes the algorithm. For this algorithm,
       diffServAlgDropQThreshold is understood to be the absolute
       maximum size of the queue and additional parameters are described
       in diffServRandomDropTable.

       The alwaysDrop(5) algorithm is as its name specifies; always
       drop. In this case, the other configuration values in this Entry
       are not meaningful; There is no useful 'next' processing step,
       there is no queue, and parameters describing the queue are not
       useful. Therefore, diffServAlgDropNext, diffServAlgDropMeasure,
       and diffServAlgDropSpecific are all zeroDotZero."
    ::= { diffServAlgDropEntry 2 }

So the vibe here is: tailDrop chops off new arrivals once the queue hits its max depth ๐ŸŽ€, headDrop kicks out the packets at the front to make room at the back ๐Ÿฆ‹, and randomDrop is the chaotic one ๐ŸŒช๏ธ where the algorithm might be proprietary and might drop either the packet that just showed up or one already waiting.

And alwaysDrop(5)? Literally just drops everything ๐Ÿ’€ no queue, no next step, nothing. That's why the other config values are basically ignored and the pointers get set to zeroDotZero. Iconic minimalism, honestly. ๐Ÿ™ˆ


Next up is diffServAlgDropNext, which is the "where does this traffic go after the dropper" object ๐Ÿงš

diffServAlgDropNext OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This selects the next Differentiated Services Functional Data
       Path Element to handle traffic for this data path. This
       RowPointer should point to an instance of one of:
         diffServClfrEntry
         diffServMeterEntry
         diffServActionEntry
         diffServQEntry

       A value of zeroDotZero in this attribute indicates no further
       Differentiated Services treatment is performed on traffic of this
       data path. The use of zeroDotZero is the normal usage for the
       last functional data path element of the current data path.

       When diffServAlgDropType is alwaysDrop(5), this object is
       ignored.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    ::= { diffServAlgDropEntry 3 }

diffServAlgDropQMeasure OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "Points to an entry in the diffServQTable to indicate the queue
       that a drop algorithm is to monitor when deciding whether to drop
       a packet. If the row pointed to does not exist, the algorithmic
       dropper element is considered inactive.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    ::= { diffServAlgDropEntry 4 }

diffServAlgDropQThreshold OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    UNITS        "Bytes"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "A threshold on the depth in bytes of the queue being measured at
       which a trigger is generated to the dropping algorithm, unless
       diffServAlgDropType is alwaysDrop(5) where this object is
       ignored.

       For the tailDrop(2) or headDrop(3) algorithms, this represents
       the depth of the queue, pointed to by diffServAlgDropQMeasure, at
       which the drop action will take place. Other algorithms will need
       to define their own semantics for this threshold."
    ::= { diffServAlgDropEntry 5 }

diffServAlgDropSpecific OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "Points to a table entry that provides further detail regarding a
       drop algorithm.

       Entries with diffServAlgDropType equal to other(1) may have this
       point to a table defined in another MIB module.

       Entries with diffServAlgDropType equal to randomDrop(4) must have
       this point to an entry in diffServRandomDropTable.

       For all other algorithms specified in this MIB, this should take
       the value zeroDotZero.

       The diffServAlgDropType is authoritative for the type of the drop
       algorithm and the specific parameters for the drop algorithm
       needs to be evaluated based on the diffServAlgDropType.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."

    ::= { diffServAlgDropEntry 6 }

diffServAlgDropOctets OBJECT-TYPE
    SYNTAX       Counter64
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "The number of octets that have been deterministically dropped by
       this drop process.

       Discontinuities in the value of this counter can occur at re-
       initialization of the management system and at other times as
       indicated by the value of ifCounterDiscontinuityTime on the
       relevant interface."
    ::= { diffServAlgDropEntry 7 }

diffServAlgDropPkts OBJECT-TYPE
    SYNTAX       Counter64
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "The number of packets that have been deterministically dropped
       by this drop process.

       Discontinuities in the value of this counter can occur at re-
       initialization of the management system and at other times as
       indicated by the value of ifCounterDiscontinuityTime on the
       relevant interface."
    ::= { diffServAlgDropEntry 8 }

diffServAlgRandomDropOctets OBJECT-TYPE
    SYNTAX       Counter64
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "The number of octets that have been randomly dropped by this
       drop process.  This counter applies, therefore, only to random
       droppers.

       Discontinuities in the value of this counter can occur at re-
       initialization of the management system and at other times as
       indicated by the value of ifCounterDiscontinuityTime on the
       relevant interface."
    ::= { diffServAlgDropEntry 9 }

diffServAlgRandomDropPkts OBJECT-TYPE
    SYNTAX       Counter64
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "The number of packets that have been randomly dropped by this
       drop process. This counter applies, therefore, only to random
       droppers.

       Discontinuities in the value of this counter can occur at re-
       initialization of the management system and at other times as
       indicated by the value of ifCounterDiscontinuityTime on the
       relevant interface."
    ::= { diffServAlgDropEntry 10 }

diffServAlgDropStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServAlgDropEntry 11 }

diffServAlgDropStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServAlgDropEntry 12 }

The pointer objects are giving "I'm just here to link things together" ๐Ÿ”—, and the counters are giving "I keep receipts" ๐Ÿงพ with octets vs pkts for everything dropped, and separate ones just for the random droppers ๐ŸŽฒ.

Also, ifCounterDiscontinuityTime is the reason counters can reset when the management system reinitializes, so don't be shocked if the numbers go back to zero, bestie ๐Ÿซถ

Now we're entering the Random Drop Table ๐ŸŽ€

--
-- Random Drop Table
--

diffServRandomDropNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServRandomDropId,
       or a zero to indicate that none exist."
    ::= { diffServAlgDrop 3 }

diffServRandomDropTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServRandomDropEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "The random drop table contains entries describing a process that
       drops packets randomly. Entries in this table are pointed to by
       diffServAlgDropSpecific."
    ::= { diffServAlgDrop 4 }

diffServRandomDropEntry OBJECT-TYPE
    SYNTAX       DiffServRandomDropEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry describes a process that drops packets according to a
       random algorithm."
    INDEX { diffServRandomDropId }
    ::= { diffServRandomDropTable 1 }

DiffServRandomDropEntry ::= SEQUENCE  {
    diffServRandomDropId               IndexInteger,
    diffServRandomDropMinThreshBytes   Unsigned32,
    diffServRandomDropMinThreshPkts    Unsigned32,
    diffServRandomDropMaxThreshBytes   Unsigned32,
    diffServRandomDropMaxThreshPkts    Unsigned32,
    diffServRandomDropProbMax          Unsigned32,
    diffServRandomDropWeight           Unsigned32,
    diffServRandomDropSamplingRate     Unsigned32,
    diffServRandomDropStorage          StorageType,
    diffServRandomDropStatus           RowStatus
}

diffServRandomDropId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Random Drop entries.  Managers
       obtain new values for row creation in this table by reading
       diffServRandomDropNextFree."
    ::= { diffServRandomDropEntry 1 }

diffServRandomDropMinThreshBytes OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    UNITS        "bytes"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The average queue depth in bytes, beyond which traffic has a
       non-zero probability of being dropped. Changes in this variable
       may or may not be reflected in the reported value of
       diffServRandomDropMinThreshPkts."
    ::= { diffServRandomDropEntry 2 }

diffServRandomDropMinThreshPkts OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    UNITS        "packets"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The average queue depth in packets, beyond which traffic has a
       non-zero probability of being dropped. Changes in this variable
       may or may not be reflected in the reported value of
       diffServRandomDropMinThreshBytes."
    ::= { diffServRandomDropEntry 3 }

diffServRandomDropMaxThreshBytes OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    UNITS        "bytes"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The average queue depth beyond which traffic has a probability
       indicated by diffServRandomDropProbMax of being dropped or
       marked. Note that this differs from the physical queue limit,
       which is stored in diffServAlgDropQThreshold. Changes in this
       variable may or may not be reflected in the reported value of
       diffServRandomDropMaxThreshPkts."
    ::= { diffServRandomDropEntry 4 }

The Random Drop Table is the fancy randomized zone ๐ŸŽฒโœจ where each entry is a random-drop process, and you grab a fresh ID from diffServRandomDropNextFree before making a new row, which is very organized of it ๐Ÿ’…

Min and Max thresholds are the vibe check ๐ŸŒˆ: the min is where a little drop chance starts, the max is where it's at its highest, and the physical queue limit is stored separately in diffServAlgDropQThreshold so don't mix them up, periodt! ๐Ÿฆ‹๐ŸŒธ

Okay bestie, the random drop table is giving main character energy, and now we're getting into the max threshold in packets ๐Ÿฆ‹

Here's the max threshold in packets, measured as an average queue depth. It's its own knob, separate from the physical queue limit, which lives over in diffServAlgDropQThreshold ๐Ÿ’…

diffServRandomDropMaxThreshPkts OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    UNITS        "packets"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The average queue depth beyond which traffic has a probability
       indicated by diffServRandomDropProbMax of being dropped or
       marked. Note that this differs from the physical queue limit,
       which is stored in diffServAlgDropQThreshold. Changes in this
       variable may or may not be reflected in the reported value of
       diffServRandomDropMaxThreshBytes."
    ::= { diffServRandomDropEntry 5 }

Next up is the worst-case drop probability, and it's counted in drops per thousand packets ๐ŸŒธ So 1000 means every single packet can get dropped, and 10 means only 1% ๐Ÿ™ˆ

diffServRandomDropProbMax OBJECT-TYPE

    SYNTAX       Unsigned32 (0..1000)
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The worst case random drop probability, expressed in drops per
       thousand packets.

       For example, if in the worst case every arriving packet may be
       dropped (100%) for a period, this has the value 1000.
       Alternatively, if in the worst case only one percent (1%) of
       traffic may be dropped, it has the value 10."
   ::= { diffServRandomDropEntry 6 }

Weight is the EWMA smoothing knob ๐Ÿงš It's basically how much the past gets to vote versus the newest sample. Implementations are allowed to limit it to a smaller set of values, like powers of two, which makes the math way easier with shifts and registers. Very smart, no cap โœจ

diffServRandomDropWeight OBJECT-TYPE
    SYNTAX       Unsigned32 (0..65536)
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The weighting of past history in affecting the Exponentially
       Weighted Moving Average function that calculates the current
       average queue depth.  The equation uses
       diffServRandomDropWeight/65536 as the coefficient for the new
       sample in the equation, and (65536 -
       diffServRandomDropWeight)/65536 as the coefficient of the old
       value.

       Implementations may limit the values of diffServRandomDropWeight
       to a subset of the possible range of values, such as powers of
       two. Doing this would facilitate implementation of the
       Exponentially Weighted Moving Average using shift instructions or
       registers."
    ::= { diffServRandomDropEntry 7 }

Sampling rate is how many times per second the queue gets checked for its average ๐Ÿฆ‹ Zero is the special vibe that means "sample about every time a packet gets enqueued or dequeued" ๐Ÿ’–

diffServRandomDropSamplingRate OBJECT-TYPE
    SYNTAX       Unsigned32 (0..1000000)
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The number of times per second the queue is sampled for queue
       average calculation.  A value of zero is used to mean that the
       queue is sampled approximately each time a packet is enqueued (or
       dequeued)."
    ::= { diffServRandomDropEntry 8 }

Storage is the row's persistence setting, and the default is nonVolatile ๐ŸŽ€ A 'permanent' row doesn't have to let you write to its columns, so don't be shocked if it's read-only ๐Ÿ™ˆ

diffServRandomDropStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServRandomDropEntry 9 }

Status is the row's lifecycle control ๐Ÿ‘‘ Every writable column can change at any time. Now here's the tea: if you set it to 'destroy' while some RowPointer is still pointing at this row, the deletion just waits until nothing is using it anymore ๐Ÿ’…

diffServRandomDropStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServRandomDropEntry 10 }

Now we're on to the Queue Table ๐Ÿงš This is where each queue (one per class of traffic) lives, and each one points at the scheduler that services it. Even if the hardware secretly does it with a shared calendar queue, the MIB still models things as individual queues. Let's gooo ๐ŸŒˆ

--
-- Queue Table
--

diffServQueue          OBJECT IDENTIFIER ::= { diffServMIBObjects 7 }

--
-- An entry of diffServQTable represents a FIFO queue Differentiated
-- Services Functional Data Path element as described in the Informal
-- Differentiated Services Model section 7.1.1. Note that the
-- specification of scheduling parameters for a queue as part of the
-- input to a scheduler functional data path element as described in
-- the Informal Differentiated Services Model section 7.1.2. This
-- allows building of hierarchical queuing/scheduling. A queue
-- therefore has these attributes:
--
-- 1. Which scheduler will service this queue, diffServQNext.
-- 2. How the scheduler will service this queue, with respect
--    to all the other queues the same scheduler needs to service,
--    diffServQMinRate.
--
-- Note that upstream Differentiated Services Functional Data Path
-- elements may point to a shared diffServQTable entry as described
-- in the Informal Differentiated Services Model section 7.1.1.
--

The next-free helper hands out an unused queue ID, or zero if there aren't any left ๐ŸŽ€

diffServQNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServQId, or a zero
       to indicate that none exist."
    ::= { diffServQueue 1 }

The Queue Table is the whole list of queues, and it's not-accessible on its own, so you go through its entries ๐Ÿฆ‹

diffServQTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServQEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "The Queue Table enumerates the individual queues.  Note that the
       MIB models queuing systems as composed of individual queues, one
       per class of traffic, even though they may in fact be structured
       as classes of traffic scheduled using a common calendar queue, or
       in other ways."
    ::= { diffServQueue 2 }

Each entry is one queue or one class of traffic, and it's indexed by diffServQId ๐Ÿ’–

diffServQEntry OBJECT-TYPE
    SYNTAX       DiffServQEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry in the Queue Table describes a single queue or class of
       traffic."
    INDEX { diffServQId }
    ::= { diffServQTable 1 }

DiffServQEntry ::= SEQUENCE  {
    diffServQId                      IndexInteger,
    diffServQNext                    RowPointer,
    diffServQMinRate                 RowPointer,
    diffServQMaxRate                 RowPointer,
    diffServQStorage                 StorageType,
    diffServQStatus                  RowStatus
}

The queue ID is the index, and you grab a fresh one by reading diffServQNextFree ๐Ÿงš

diffServQId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Queue entries.  Managers obtain new
       values for row creation in this table by reading
       diffServQNextFree."
    ::= { diffServQEntry 1 }

diffServQNext picks which scheduler services this queue ๐Ÿ‘‘ It has to point at a diffServSchedulerEntry. A zeroDotZero value means the entry is incomplete, so it does nothing yet, because it has no parameters to give it meaning. Pointing at something that doesn't exist throws an inconsistentValue error, and if the target vanishes later, it's treated as zeroDotZero ๐Ÿ™ˆ

diffServQNext OBJECT-TYPE

    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This selects the next Differentiated Services Scheduler.  The
       RowPointer must point to a diffServSchedulerEntry.

       A value of zeroDotZero in this attribute indicates an incomplete
       diffServQEntry instance. In such a case, the entry has no
       operational effect, since it has no parameters to give it
       meaning.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    ::= { diffServQEntry 2 }

diffServQMinRate points at the minimum-rate entry the scheduler should use for this queue ๐ŸŒธ If it's zeroDotZero, the minimum rate and priority are unspecified. Same error and fallback rules as before ๐Ÿ’…

diffServQMinRate OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This RowPointer indicates the diffServMinRateEntry that the
       scheduler, pointed to by diffServQNext, should use to service
       this queue.

       If the row pointed to is zeroDotZero, the minimum rate and
       priority is unspecified.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    ::= { diffServQEntry 3 }

diffServQMaxRate is the same kind of pointer, but for the max-rate entry ๐Ÿฆ‹ If it's zeroDotZero, the maximum rate is just the interface's line speed, which is a very chill default ๐ŸŒˆ

diffServQMaxRate OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This RowPointer indicates the diffServMaxRateEntry that the
       scheduler, pointed to by diffServQNext, should use to service
       this queue.

       If the row pointed to is zeroDotZero, the maximum rate is the
       line speed of the interface.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    ::= { diffServQEntry 4 }

Storage for the queue row works just like the random drop one, nonVolatile by default ๐ŸŽ€

diffServQStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServQEntry 5 }

Status is the queue row's lifecycle switch, and the destroy rule is the same delayed-until-unused drama as before ๐Ÿ’–

diffServQStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServQEntry 6 }

Last stop for this part is the Scheduler Table ๐Ÿงš A scheduler is a packet scheduler, like a priority one or a WFQ one, and the cool thing is that several different algorithms can run on the same interface at once ๐ŸŒˆ

--
-- Scheduler Table
--

diffServScheduler      OBJECT IDENTIFIER ::= { diffServMIBObjects 8 }

--
-- A Scheduler Entry represents a packet scheduler, such as a priority
-- scheduler or a WFQ scheduler. It provides flexibility for multiple
-- scheduling algorithms, each servicing multiple queues, to be used on
-- the same logical/physical interface.
--
-- Note that upstream queues or schedulers specify several of the
-- scheduler's parameters. These must be properly specified if the
-- scheduler is to behave as expected.
--
-- The diffServSchedulerMaxRate attribute specifies the parameters when
-- a scheduler's output is sent to another scheduler. This is used in
-- building hierarchical queues or schedulers.

--
-- More discussion of the scheduler functional data path element is in
-- the Informal Differentiated Services Model section 7.1.2.
--

The next-free helper for schedulers gives you an unused scheduler ID, or zero if there aren't any ๐Ÿ’…

diffServSchedulerNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServSchedulerId, or
       a zero to indicate that none exist."
    ::= { diffServScheduler 1 }

The Scheduler Table enumerates the packet schedulers, and each entry describes one scheduling algorithm instance ๐Ÿฆ‹

diffServSchedulerTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServSchedulerEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "The Scheduler Table enumerates packet schedulers. Multiple
       scheduling algorithms can be used on a given data path, with each
       algorithm described by one diffServSchedulerEntry."
    ::= { diffServScheduler 2 }

Each scheduler entry is indexed by diffServSchedulerId ๐ŸŒธ

diffServSchedulerEntry OBJECT-TYPE
    SYNTAX       DiffServSchedulerEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry in the Scheduler Table describing a single instance of
       a scheduling algorithm."
    INDEX { diffServSchedulerId }
    ::= { diffServSchedulerTable 1 }

DiffServSchedulerEntry ::= SEQUENCE  {
    diffServSchedulerId                   IndexInteger,
    diffServSchedulerNext                 RowPointer,
    diffServSchedulerMethod               AutonomousType,
    diffServSchedulerMinRate              RowPointer,
    diffServSchedulerMaxRate              RowPointer,
    diffServSchedulerStorage              StorageType,
    diffServSchedulerStatus               RowStatus
}

The scheduler ID is the index, and you get a fresh one by reading diffServSchedulerNextFree โœจ

diffServSchedulerId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Scheduler entries.  Managers obtain
       new values for row creation in this table by reading
       diffServSchedulerNextFree."
    ::= { diffServSchedulerEntry 1 }

okay so this next chunk is where the scheduler table gets really good ๐Ÿ’…โœจ

diffServSchedulerNext OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This selects the next Differentiated Services Functional Data
       Path Element to handle traffic for this data path. This normally
       is null (zeroDotZero), or points to a diffServSchedulerEntry or a
       diffServQEntry.

       However, this RowPointer may also point to an instance of:
         diffServClfrEntry,
         diffServMeterEntry,
         diffServActionEntry,
         diffServAlgDropEntry.

       It would point another diffServSchedulerEntry when implementing
       multiple scheduler methods for the same data path, such as having
       one set of queues scheduled by WRR and that group participating
       in a priority scheduling system in which other queues compete
       with it in that way.  It might also point to a second scheduler
       in a hierarchical scheduling system.

       If the row pointed to is zeroDotZero, no further Differentiated
       Services treatment is performed on traffic of this data path.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    DEFVAL       { zeroDotZero }
    ::= { diffServSchedulerEntry 2 }

diffServSchedulerNext is basically the "what's next in line?" pointer ๐Ÿงš It usually sits at zeroDotZero (aka nothing else happens to this traffic ๐Ÿ™ˆ), but it can point to another scheduler, a queue, or a few other elements. Pointing at a row that doesn't exist throws an inconsistentValue error, and if the target gets removed, it acts like zeroDotZero. Iconic behaviour, honestly ๐Ÿ’€

diffServSchedulerMethod OBJECT-TYPE
    SYNTAX       AutonomousType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The scheduling algorithm used by this Scheduler. zeroDotZero
       indicates that this is unknown.  Standard values for generic
       algorithms: diffServSchedulerPriority, diffServSchedulerWRR, and
       diffServSchedulerWFQ are specified in this MIB; additional values
       may be further specified in other MIBs."
    ::= { diffServSchedulerEntry 3 }

diffServSchedulerMinRate OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This RowPointer indicates the entry in diffServMinRateTable
       which indicates the priority or minimum output rate from this
       scheduler. This attribute is used only when there is more than
       one level of scheduler.

       When it has the value zeroDotZero, it indicates that no minimum
       rate or priority is imposed.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    DEFVAL      { zeroDotZero }
    ::= { diffServSchedulerEntry 4 }

diffServSchedulerMaxRate OBJECT-TYPE
    SYNTAX       RowPointer
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "This RowPointer indicates the entry in diffServMaxRateTable
       which indicates the maximum output rate from this scheduler.
       When more than one maximum rate applies (eg, when a multi-rate
       shaper is in view), it points to the first of those rate entries.
       This attribute is used only when there is more than one level of
       scheduler.

       When it has the value zeroDotZero, it indicates that no maximum
       rate is imposed.

       Setting this to point to a target that does not exist results in
       an inconsistentValue error.  If the row pointed to is removed or
       becomes inactive by other means, the treatment is as if this
       attribute contains a value of zeroDotZero."
    DEFVAL      { zeroDotZero }
    ::= { diffServSchedulerEntry 5 }

diffServSchedulerStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServSchedulerEntry 6 }

diffServSchedulerStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServSchedulerEntry 7 }

Okay the vibe here is "pick your algorithm, then set your limits" ๐ŸŽ€ diffServSchedulerMethod says which scheduling algorithm is in use (zeroDotZero means unknown ๐Ÿคทโ€โ™€๏ธ), and the MinRate and MaxRate pointers only matter once you've got more than one level of scheduler ๐ŸŒˆ Storage defaults to nonVolatile, and the Status row can be destroyed at any time, though destruction gets delayed while other rows still point at it. Not me being impressed by the delayed-destroy logic ๐Ÿ˜ญ๐Ÿซถ


--
-- OIDs for diffServTBParamType definitions.
--

diffServSchedulers  OBJECT IDENTIFIER ::= { diffServMIBAdmin 2 }

diffServSchedulerPriority OBJECT-IDENTITY
    STATUS       current
    DESCRIPTION
       "For use with diffServSchedulerMethod to indicate the Priority
       scheduling method.  This is defined as an algorithm in which the
       presence of data in a queue or set of queues absolutely precludes
       dequeue from another queue or set of queues of lower priority.
       Note that attributes from diffServMinRateEntry of the
       queues/schedulers feeding this scheduler are used when
       determining the next packet to schedule."
    ::= { diffServSchedulers 1 }

diffServSchedulerWRR OBJECT-IDENTITY
    STATUS       current
    DESCRIPTION
       "For use with diffServSchedulerMethod to indicate the Weighted
       Round Robin scheduling method, defined as any algorithm in which
       a set of queues are visited in a fixed order, and varying amounts
       of traffic are removed from each queue in turn to implement an
       average output rate by class. Notice attributes from
       diffServMinRateEntry of the queues/schedulers feeding this
       scheduler are used when determining the next packet to schedule."

    ::= { diffServSchedulers 2 }

diffServSchedulerWFQ OBJECT-IDENTITY
    STATUS       current
    DESCRIPTION
       "For use with diffServSchedulerMethod to indicate the Weighted
       Fair Queuing scheduling method, defined as any algorithm in which
       a set of queues are conceptually visited in some order, to
       implement an average output rate by class. Notice attributes from
       diffServMinRateEntry of the queues/schedulers feeding this
       scheduler are used when determining the next packet to schedule."
    ::= { diffServSchedulers 3 }

Now the scheduler method identities ๐Ÿฆ‹ Three of them are defined here: Priority (higher-priority data wins outright ๐Ÿ‘‘), Weighted Round Robin (queues get visited in a fixed order, with varying amounts taken from each one ๐Ÿ“), and Weighted Fair Queuing (queues get visited in some order to get an average output rate per class ๐ŸŒธ). All three look at the diffServMinRateEntry of whatever feeds them when deciding the next packet, which is kind of a vibe ๐Ÿ’œ


--
-- Minimum Rate Parameters Table
--
-- The parameters used by a scheduler for its inputs or outputs are
-- maintained separately from the Queue or Scheduler table entries for
-- reusability reasons and so that they may be used by both queues and
-- schedulers.  This follows the approach for separation of data path
-- elements from parameterization that is used throughout this MIB.
-- Use of these Minimum Rate Parameter Table entries by Queues and
-- Schedulers allows the modeling of hierarchical scheduling systems.
--
-- Specifically, a Scheduler has one or more inputs and one output.
-- Any queue feeding a scheduler, or any scheduler which feeds a second
-- scheduler, might specify a minimum transfer rate by pointing to an
-- Minimum Rate Parameter Table entry.
--
-- The diffServMinRatePriority/Abs/Rel attributes are used as
-- parameters to the work-conserving portion of a scheduler:
-- "work-conserving" implies that the scheduler can continue to emit
-- data as long as there is data available at its input(s).  This has
-- the effect of guaranteeing a certain priority relative to other
-- scheduler inputs and/or a certain minimum proportion of the
-- available output bandwidth. Properly configured, this means a
-- certain minimum rate, which may be exceeded should traffic be
-- available should there be spare bandwidth after all other classes
-- have had opportunities to consume their own minimum rates.
--

diffServMinRateNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServMinRateId, or a
       zero to indicate that none exist."

    ::= { diffServScheduler 3 }

diffServMinRateTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServMinRateEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "The Minimum Rate Parameters Table enumerates individual sets of
       scheduling parameter that can be used/reused by Queues and
       Schedulers."
    ::= { diffServScheduler 4 }

diffServMinRateEntry OBJECT-TYPE
    SYNTAX       DiffServMinRateEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry in the Minimum Rate Parameters Table describes a single
       set of scheduling parameters for use by one or more queues or
       schedulers."
    INDEX { diffServMinRateId }
    ::= { diffServMinRateTable 1 }

DiffServMinRateEntry ::= SEQUENCE  {
    diffServMinRateId              IndexInteger,
    diffServMinRatePriority        Unsigned32,
    diffServMinRateAbsolute        Unsigned32,
    diffServMinRateRelative        Unsigned32,
    diffServMinRateStorage         StorageType,
    diffServMinRateStatus          RowStatus
}

diffServMinRateId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Scheduler Parameter entries.
       Managers obtain new values for row creation in this table by
       reading diffServMinRateNextFree."
    ::= { diffServMinRateEntry 1 }

diffServMinRatePriority OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The priority of this input to the associated scheduler, relative
       to the scheduler's other inputs. A queue or scheduler with a
       larger numeric value will be served before another with a smaller
       numeric value."
    ::= { diffServMinRateEntry 2 }

diffServMinRateAbsolute OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    UNITS        "kilobits per second"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The minimum absolute rate, in kilobits/sec, that a downstream
       scheduler element should allocate to this queue. If the value is
       zero, then there is effectively no minimum rate guarantee. If the
       value is non-zero, the scheduler will assure the servicing of
       this queue to at least this rate.

       Note that this attribute value and that of
       diffServMinRateRelative are coupled: changes to one will affect
       the value of the other. They are linked by the following
       equation, in that setting one will change the other:

         diffServMinRateRelative =
                 (diffServMinRateAbsolute*1000000)/ifSpeed

       or, if appropriate:

         diffServMinRateRelative = diffServMinRateAbsolute/ifHighSpeed"
    REFERENCE
        "ifSpeed, ifHighSpeed, Interface MIB, RFC 2863"
    ::= { diffServMinRateEntry 3 }

So this part is all about the Minimum Rate Parameters Table ๐ŸŽ€ The big idea is that the parameters live in their own table, so queues and schedulers can both reuse them, which is how hierarchical scheduling gets modelled ๐Ÿงš The priority, absolute and relative attributes are the knobs for the work-conserving part of a scheduler. Work-conserving just means it keeps emitting data as long as there's data waiting at its inputs โญ Then there's the coupling bit: diffServMinRateAbsolute and diffServMinRateRelative are linked by that equation, so changing one changes the other. Okay that's giving math-class trauma but it's also kind of iconic ๐Ÿ™ˆ๐Ÿ’…

diffServMinRateRelative OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The minimum rate that a downstream scheduler element should
       allocate to this queue, relative to the maximum rate of the
       interface as reported by ifSpeed or ifHighSpeed, in units of
       1/1000 of 1. If the value is zero, then there is effectively no
       minimum rate guarantee. If the value is non-zero, the scheduler
       will assure the servicing of this queue to at least this rate.

       Note that this attribute value and that of
       diffServMinRateAbsolute are coupled: changes to one will affect
       the value of the other. They are linked by the following
       equation, in that setting one will change the other:

         diffServMinRateRelative =
                 (diffServMinRateAbsolute*1000000)/ifSpeed

       or, if appropriate:

         diffServMinRateRelative = diffServMinRateAbsolute/ifHighSpeed"
    REFERENCE
        "ifSpeed, ifHighSpeed, Interface MIB, RFC 2863"
    ::= { diffServMinRateEntry 4 }

diffServMinRateStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServMinRateEntry 5 }

diffServMinRateStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServMinRateEntry 6 }

okay so the Maximum Rate Parameter Table is where the rate limits live, bestie ๐ŸŽ€ the big idea is that these parameters are kept separate from the Queue and Scheduler entries so they can be reused by both ๐Ÿ’… that's what lets you build hierarchical scheduling systems, which is literally so iconic ๐Ÿฆ‹ and multi-rate shapers like a Dual Leaky Bucket use several entries that share the same diffServMaxRateId but have different diffServMaxRateLevels ๐Ÿซถ

--
-- Maximum Rate Parameter Table
--
-- The parameters used by a scheduler for its inputs or outputs are
-- maintained separately from the Queue or Scheduler table entries for
-- reusability reasons and so that they may be used by both queues and
-- schedulers.  This follows the approach for separation of data path
-- elements from parameterization that is used throughout this MIB.
-- Use of these Maximum Rate Parameter Table entries by Queues and
-- Schedulers allows the modeling of hierarchical scheduling systems.
--
-- Specifically, a Scheduler has one or more inputs and one output.
-- Any queue feeding a scheduler, or any scheduler which feeds a second
-- scheduler, might specify a maximum transfer rate by pointing to a
-- Maximum Rate Parameter Table entry. Multi-rate shapers, such as a
-- Dual Leaky Bucket algorithm, specify their rates using multiple
-- Maximum Rate Parameter Entries with the same diffServMaxRateId but
-- different diffServMaxRateLevels.
--
-- The diffServMaxRateLevel/Abs/Rel attributes are used as
-- parameters to the non-work-conserving portion of a scheduler:
-- non-work-conserving implies that the scheduler may sometimes not
-- emit a packet, even if there is data available at its input(s).
-- This has the effect of limiting the servicing of the queue/scheduler
-- input or output, in effect performing shaping of the packet stream
-- passing through the queue/scheduler, as described in the Informal
-- Differentiated Services Model section 7.2.
--

diffServMaxRateNextFree OBJECT-TYPE
    SYNTAX       IndexIntegerNextFree
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "This object contains an unused value for diffServMaxRateId, or a
       zero to indicate that none exist."
    ::= { diffServScheduler 5 }

diffServMaxRateTable OBJECT-TYPE
    SYNTAX       SEQUENCE OF DiffServMaxRateEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "The Maximum Rate Parameter Table enumerates individual sets of
       scheduling parameter that can be used/reused by Queues and
       Schedulers."
    ::= { diffServScheduler 6 }

diffServMaxRateEntry OBJECT-TYPE
    SYNTAX       DiffServMaxRateEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An entry in the Maximum Rate Parameter Table describes a single
       set of scheduling parameters for use by one or more queues or
       schedulers."
    INDEX { diffServMaxRateId, diffServMaxRateLevel }
    ::= { diffServMaxRateTable 1 }

DiffServMaxRateEntry ::= SEQUENCE  {
    diffServMaxRateId              IndexInteger,
    diffServMaxRateLevel           Unsigned32,
    diffServMaxRateAbsolute        Unsigned32,
    diffServMaxRateRelative        Unsigned32,
    diffServMaxRateThreshold       BurstSize,
    diffServMaxRateStorage         StorageType,
    diffServMaxRateStatus          RowStatus
}

the Id is the index that managers grab new values from, by reading diffServMaxRateNextFree ๐ŸŒธ

diffServMaxRateId OBJECT-TYPE
    SYNTAX       IndexInteger
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that enumerates the Maximum Rate Parameter entries.
       Managers obtain new values for row creation in this table by
       reading diffServMaxRateNextFree."
    ::= { diffServMaxRateEntry 1 }

diffServMaxRateLevel OBJECT-TYPE
    SYNTAX       Unsigned32 (1..32)
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
       "An index that indicates which level of a multi-rate shaper is
       being given its parameters. A multi-rate shaper has some number
       of rate levels. Frame Relay's dual rate specification refers to a
       'committed' and an 'excess' rate; ATM's dual rate specification
       refers to a 'mean' and a 'peak' rate. This table is generalized
       to support an arbitrary number of rates. The committed or mean
       rate is level 1, the peak rate (if any) is the highest level rate
       configured, and if there are other rates they are distributed in
       monotonically increasing order between them."
    ::= { diffServMaxRateEntry 2 }

diffServMaxRateAbsolute OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    UNITS        "kilobits per second"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The maximum rate in kilobits/sec that a downstream scheduler
       element should allocate to this queue. If the value is zero, then
       there is effectively no maximum rate limit and that the scheduler
       should attempt to be work conserving for this queue. If the value
       is non-zero, the scheduler will limit the servicing of this queue
       to, at most, this rate in a non-work-conserving manner.

       Note that this attribute value and that of
       diffServMaxRateRelative are coupled: changes to one will affect
       the value of the other. They are linked by the following
       equation, in that setting one will change the other:

         diffServMaxRateRelative =
                 (diffServMaxRateAbsolute*1000000)/ifSpeed

       or, if appropriate:

         diffServMaxRateRelative = diffServMaxRateAbsolute/ifHighSpeed"
    REFERENCE
        "ifSpeed, ifHighSpeed, Interface MIB, RFC 2863"
    ::= { diffServMaxRateEntry 3 }

diffServMaxRateRelative OBJECT-TYPE
    SYNTAX       Unsigned32  (1..4294967295)
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The maximum rate that a downstream scheduler element should
       allocate to this queue, relative to the maximum rate of the
       interface as reported by ifSpeed or ifHighSpeed, in units of
       1/1000 of 1. If the value is zero, then there is effectively no
       maximum rate limit and the scheduler should attempt to be work
       conserving for this queue. If the value is non-zero, the
       scheduler will limit the servicing of this queue to, at most,
       this rate in a non-work-conserving manner.

       Note that this attribute value and that of
       diffServMaxRateAbsolute are coupled: changes to one will affect
       the value of the other. They are linked by the following
       equation, in that setting one will change the other:

         diffServMaxRateRelative =
                 (diffServMaxRateAbsolute*1000000)/ifSpeed

       or, if appropriate:

         diffServMaxRateRelative = diffServMaxRateAbsolute/ifHighSpeed"
    REFERENCE
        "ifSpeed, ifHighSpeed, Interface MIB, RFC 2863"
    ::= { diffServMaxRateEntry 4 }

diffServMaxRateThreshold OBJECT-TYPE
    SYNTAX       BurstSize
    UNITS        "Bytes"
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The number of bytes of queue depth at which the rate of a
       multi-rate scheduler will increase to the next output rate. In
       the last conceptual row for such a shaper, this threshold is
       ignored and by convention is zero."
    REFERENCE
        "Adaptive rate Shaper, RFC 2963"
    ::= { diffServMaxRateEntry 5 }

diffServMaxRateStorage OBJECT-TYPE
    SYNTAX       StorageType
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The storage type for this conceptual row.  Conceptual rows
       having the value 'permanent' need not allow write-access to any
       columnar objects in the row."
    DEFVAL { nonVolatile }
    ::= { diffServMaxRateEntry 6 }

diffServMaxRateStatus OBJECT-TYPE
    SYNTAX       RowStatus
    MAX-ACCESS   read-create
    STATUS       current
    DESCRIPTION
       "The status of this conceptual row. All writable objects in this
       row may be modified at any time. Setting this variable to
       'destroy' when the MIB contains one or more RowPointers pointing
       to it results in destruction being delayed until the row is no
       longer used."
    ::= { diffServMaxRateEntry 7 }

ooh and now we're at the MIB compliance bit, the part that groups everything into conformance buckets ๐Ÿ‘‘โœจ

--
-- MIB Compliance statements.
--

diffServMIBCompliances OBJECT IDENTIFIER ::=
                                     { diffServMIBConformance 1 }
diffServMIBGroups      OBJECT IDENTIFIER ::=
                                     { diffServMIBConformance 2 }

okay bestie, this is where the compliance checklists get fun ๐Ÿ’…โœจ first up is the full one, for devices that can be both watched and configured ๐ŸŽ€

diffServMIBFullCompliance MODULE-COMPLIANCE
    STATUS current
    DESCRIPTION
       "When this MIB is implemented with support for read-create, then
       such an implementation can claim full compliance. Such devices
       can then be both monitored and configured with this MIB."

    MODULE IF-MIB -- The interfaces MIB, RFC2863
    MANDATORY-GROUPS {

       ifCounterDiscontinuityGroup
    }

    MODULE -- This Module
    MANDATORY-GROUPS {
        diffServMIBDataPathGroup, diffServMIBClfrGroup,
        diffServMIBClfrElementGroup, diffServMIBMultiFieldClfrGroup,
        diffServMIBActionGroup, diffServMIBAlgDropGroup,
        diffServMIBQGroup, diffServMIBSchedulerGroup,
        diffServMIBMaxRateGroup, diffServMIBMinRateGroup,
        diffServMIBCounterGroup
    }

    GROUP diffServMIBMeterGroup
    DESCRIPTION
       "This group is mandatory for devices that implement metering
       functions."

    GROUP diffServMIBTBParamGroup
    DESCRIPTION
       "This group is mandatory for devices that implement token-bucket
       metering functions."

    GROUP diffServMIBDscpMarkActGroup
    DESCRIPTION
       "This group is mandatory for devices that implement DSCP-Marking
       functions."

    GROUP diffServMIBRandomDropGroup
    DESCRIPTION
       "This group is mandatory for devices that implement Random Drop
       functions."

    OBJECT diffServDataPathStatus
    SYNTAX RowStatus { active(1) }
    WRITE-SYNTAX RowStatus { createAndGo(4), destroy(6) }
    DESCRIPTION
       "Support for createAndWait and notInService is not required."

    OBJECT diffServClfrStatus
    SYNTAX RowStatus { active(1) }
    WRITE-SYNTAX RowStatus { createAndGo(4), destroy(6) }
    DESCRIPTION
       "Support for createAndWait and notInService is not required."

    OBJECT diffServClfrElementStatus
    SYNTAX RowStatus { active(1) }
    WRITE-SYNTAX RowStatus { createAndGo(4), destroy(6) }
    DESCRIPTION
       "Support for createAndWait and notInService is not required."

    OBJECT diffServMultiFieldClfrAddrType
    SYNTAX  InetAddressType { unknown(0), ipv4(1), ipv6(2) }
    DESCRIPTION
       "An implementation is only required to support IPv4 and IPv6
       addresses."

    OBJECT diffServMultiFieldClfrDstAddr
    SYNTAX  InetAddress (SIZE(0|4|16))
    DESCRIPTION
       "An implementation is only required to support IPv4 and globally
       unique IPv6 addresses."

    OBJECT diffServAlgDropStatus
    SYNTAX RowStatus { active(1) }
    WRITE-SYNTAX RowStatus { createAndGo(4), destroy(6) }
    DESCRIPTION
       "Support for createAndWait and notInService is not required."

    OBJECT diffServRandomDropStatus
    SYNTAX RowStatus { active(1) }
    WRITE-SYNTAX RowStatus { createAndGo(4), destroy(6) }
    DESCRIPTION
       "Support for createAndWait and notInService is not required."

    OBJECT diffServQStatus
    SYNTAX RowStatus { active(1) }
    WRITE-SYNTAX RowStatus { createAndGo(4), destroy(6) }
    DESCRIPTION
       "Support for createAndWait and notInService is not required."

    OBJECT diffServSchedulerStatus
    SYNTAX RowStatus { active(1) }
    WRITE-SYNTAX RowStatus { createAndGo(4), destroy(6) }
    DESCRIPTION
       "Support for createAndWait and notInService is not required."

    OBJECT diffServMinRateStatus
    SYNTAX RowStatus { active(1) }
    WRITE-SYNTAX RowStatus { createAndGo(4), destroy(6) }
    DESCRIPTION
       "Support for createAndWait and notInService is not required."

    OBJECT diffServMaxRateStatus
    SYNTAX RowStatus { active(1) }
    WRITE-SYNTAX RowStatus { createAndGo(4), destroy(6) }
    DESCRIPTION
       "Support for createAndWait and notInService is not required."

    ::= { diffServMIBCompliances 1 }

--
-- Read-Only Compliance
--

diffServMIBReadOnlyCompliance MODULE-COMPLIANCE
    STATUS current
    DESCRIPTION
       "When this MIB is implemented without support for read-create
       (i.e. in read-only mode), then such an implementation can claim
       read-only compliance. Such a device can then be monitored but can
       not be configured with this MIB."

    MODULE IF-MIB -- The interfaces MIB, RFC2863
    MANDATORY-GROUPS {
       ifCounterDiscontinuityGroup
    }

    MODULE -- This Module
    MANDATORY-GROUPS {
        diffServMIBDataPathGroup, diffServMIBClfrGroup,
        diffServMIBClfrElementGroup, diffServMIBMultiFieldClfrGroup,
        diffServMIBActionGroup, diffServMIBAlgDropGroup,
        diffServMIBQGroup, diffServMIBSchedulerGroup,
        diffServMIBMaxRateGroup, diffServMIBMinRateGroup,
        diffServMIBCounterGroup
    }

    GROUP diffServMIBMeterGroup
    DESCRIPTION
       "This group is mandatory for devices that implement metering
       functions."

    GROUP diffServMIBTBParamGroup
    DESCRIPTION
       "This group is mandatory for devices that implement token-bucket
       metering functions."

    GROUP        diffServMIBDscpMarkActGroup
    DESCRIPTION
       "This group is mandatory for devices that implement DSCP-Marking
       functions."

    GROUP        diffServMIBRandomDropGroup
    DESCRIPTION
       "This group is mandatory for devices that implement Random Drop
       functions."

    OBJECT       diffServDataPathStart
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServDataPathStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServDataPathStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServClfrNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object not needed when diffServClfrTable is implemented read-
       only"

    OBJECT       diffServClfrStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServClfrStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServClfrElementNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object not needed when diffServClfrelementTable is implemented
       read-only"

    OBJECT       diffServClfrElementPrecedence
    MIN-ACCESS   read-only
    DESCRIPTION

       "Write access is not required."

    OBJECT       diffServClfrElementNext
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServClfrElementSpecific
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServClfrElementStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServClfrElementStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServMultiFieldClfrNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServMultiFieldClfrTable is
       implemented in read-only mode."

    OBJECT       diffServMultiFieldClfrAddrType
    SYNTAX       InetAddressType { unknown(0), ipv4(1), ipv6(2) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required. An implementation is only required
       to support IPv4 and IPv6 addresses."

    OBJECT       diffServMultiFieldClfrDstAddr
    SYNTAX       InetAddress (SIZE(0|4|16))
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required. An implementation is only required
       to support IPv4 and globally unique IPv6 addresses."

    OBJECT       diffServMultiFieldClfrDstPrefixLength
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMultiFieldClfrSrcAddr
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required. An implementation is only required
       to support IPv4 and globally unique IPv6 addresses."

    OBJECT       diffServMultiFieldClfrSrcPrefixLength
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMultiFieldClfrDscp
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMultiFieldClfrFlowId
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMultiFieldClfrProtocol
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMultiFieldClfrDstL4PortMin
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMultiFieldClfrDstL4PortMax
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMultiFieldClfrSrcL4PortMin
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMultiFieldClfrSrcL4PortMax
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMultiFieldClfrStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMultiFieldClfrStatus
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, createAndWait and notInService
       support is not required."

    OBJECT       diffServMeterNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServMultiFieldClfrTable is
       implemented in read-only mode."

    OBJECT       diffServMeterSucceedNext
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMeterFailNext
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMeterSpecific
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMeterStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMeterStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServTBParamNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServTBParamTable is implemented in
       read-only mode."

    OBJECT       diffServTBParamType
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServTBParamRate
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServTBParamBurstSize
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServTBParamInterval
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServTBParamStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServTBParamStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServActionNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServActionTable is implemented in
       read-only mode."

    OBJECT       diffServActionInterface
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServActionNext
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

okay so the read-only compliance list is still going, and it's giving "you don't have to write anything, just read it" ๐Ÿ’…๐ŸŽ€ here are the rest of the groups โœจ

    OBJECT       diffServActionSpecific
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServActionStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServActionStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServCountActNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServCountActTable is implemented
       in read-only mode."

    OBJECT       diffServCountActStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServCountActStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServAlgDropNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServAlgDropTable is implemented in
       read-only mode."

    OBJECT       diffServAlgDropType
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServAlgDropNext
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServAlgDropQMeasure
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServAlgDropQThreshold
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServAlgDropSpecific
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServAlgDropStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServAlgDropStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServRandomDropNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServRandomDropTable is implemented
       in read-only mode."

    OBJECT       diffServRandomDropMinThreshBytes
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServRandomDropMinThreshPkts
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServRandomDropMaxThreshBytes
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServRandomDropMaxThreshPkts
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServRandomDropProbMax
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServRandomDropWeight
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServRandomDropSamplingRate
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServRandomDropStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServRandomDropStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServQNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServQTable is implemented in
       read-only mode."

    OBJECT       diffServQNext
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServQMinRate
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServQMaxRate
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServQStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServQStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServSchedulerNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServSchedulerTable is implemented
       in read-only mode."

    OBJECT       diffServSchedulerNext
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServSchedulerMethod
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServSchedulerMinRate
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServSchedulerMaxRate
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServSchedulerStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServSchedulerStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServMinRateNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServMinRateTable is implemented in
       read-only mode."

    OBJECT       diffServMinRatePriority
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMinRateAbsolute
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMinRateRelative
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMinRateStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMinRateStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    OBJECT       diffServMaxRateNextFree
    MIN-ACCESS   not-accessible
    DESCRIPTION
       "Object is not needed when diffServMaxrateTable is implemented in
       read-only mode."

    OBJECT       diffServMaxRateAbsolute
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMaxRateRelative
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMaxRateThreshold
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMaxRateStorage
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required."

    OBJECT       diffServMaxRateStatus
    SYNTAX       RowStatus { active(1) }
    MIN-ACCESS   read-only
    DESCRIPTION
       "Write access is not required, and active is the only status that
       needs to be supported."

    ::= { diffServMIBCompliances 2 }

diffServMIBDataPathGroup OBJECT-GROUP
    OBJECTS {
              diffServDataPathStart, diffServDataPathStorage,
              diffServDataPathStatus
    }
    STATUS       current
    DESCRIPTION
       "The Data Path Group defines the MIB Objects that describe a
       functional data path."
    ::= { diffServMIBGroups 1 }

diffServMIBClfrGroup OBJECT-GROUP
    OBJECTS {
              diffServClfrNextFree, diffServClfrStorage,
              diffServClfrStatus
    }
    STATUS       current
    DESCRIPTION
       "The Classifier Group defines the MIB Objects that describe the
       list the starts of individual classifiers."
    ::= { diffServMIBGroups 2 }

diffServMIBClfrElementGroup OBJECT-GROUP
    OBJECTS {
              diffServClfrElementNextFree,
              diffServClfrElementPrecedence, diffServClfrElementNext,
              diffServClfrElementSpecific, diffServClfrElementStorage,
              diffServClfrElementStatus
    }
    STATUS       current
    DESCRIPTION
       "The Classifier Element Group defines the MIB Objects that
       describe the classifier elements that make up a generic
       classifier."
    ::= { diffServMIBGroups 3 }

diffServMIBMultiFieldClfrGroup OBJECT-GROUP
    OBJECTS {
              diffServMultiFieldClfrNextFree,
              diffServMultiFieldClfrAddrType,
              diffServMultiFieldClfrDstAddr,
              diffServMultiFieldClfrDstPrefixLength,
              diffServMultiFieldClfrFlowId,
              diffServMultiFieldClfrSrcAddr,
              diffServMultiFieldClfrSrcPrefixLength,
              diffServMultiFieldClfrDscp,
              diffServMultiFieldClfrProtocol,
              diffServMultiFieldClfrDstL4PortMin,
              diffServMultiFieldClfrDstL4PortMax,
              diffServMultiFieldClfrSrcL4PortMin,
              diffServMultiFieldClfrSrcL4PortMax,
              diffServMultiFieldClfrStorage,
              diffServMultiFieldClfrStatus
    }
    STATUS       current
    DESCRIPTION
       "The Multi-field Classifier Group defines the MIB Objects that
       describe a classifier element for matching on various fields of
       an IP and upper-layer protocol header."
    ::= { diffServMIBGroups 4 }

diffServMIBMeterGroup OBJECT-GROUP
    OBJECTS {
              diffServMeterNextFree, diffServMeterSucceedNext,
              diffServMeterFailNext, diffServMeterSpecific,
              diffServMeterStorage, diffServMeterStatus
    }
    STATUS       current
    DESCRIPTION
       "The Meter Group defines the objects used in describing a generic
       meter element."
    ::= { diffServMIBGroups 5 }

diffServMIBTBParamGroup OBJECT-GROUP
    OBJECTS {
              diffServTBParamNextFree, diffServTBParamType,
              diffServTBParamRate, diffServTBParamBurstSize,
              diffServTBParamInterval, diffServTBParamStorage,
              diffServTBParamStatus
    }
    STATUS       current
    DESCRIPTION
       "The Token-Bucket Meter Group defines the objects used in
       describing a token bucket meter element."
    ::= { diffServMIBGroups 6 }

diffServMIBActionGroup OBJECT-GROUP
    OBJECTS {
              diffServActionNextFree, diffServActionNext,
              diffServActionSpecific, diffServActionStorage,
              diffServActionInterface, diffServActionStatus
    }
    STATUS       current
    DESCRIPTION
       "The Action Group defines the objects used in describing a
       generic action element."
    ::= { diffServMIBGroups 7 }

diffServMIBDscpMarkActGroup OBJECT-GROUP
    OBJECTS {
              diffServDscpMarkActDscp
    }
    STATUS       current
    DESCRIPTION
       "The DSCP Mark Action Group defines the objects used in
       describing a DSCP Marking Action element."
    ::= { diffServMIBGroups 8 }

diffServMIBCounterGroup OBJECT-GROUP
    OBJECTS {
              diffServCountActOctets, diffServCountActPkts,
              diffServAlgDropOctets, diffServAlgDropPkts,
              diffServAlgRandomDropOctets, diffServAlgRandomDropPkts,
              diffServCountActStorage, diffServCountActStatus,
              diffServCountActNextFree

    }
    STATUS       current
    DESCRIPTION
       "A collection of objects providing information specific to
       packet-oriented network interfaces."
    ::= { diffServMIBGroups 9 }
diffServMIBAlgDropGroup OBJECT-GROUP
    OBJECTS {
              diffServAlgDropNextFree, diffServAlgDropType,
              diffServAlgDropNext, diffServAlgDropQMeasure,
              diffServAlgDropQThreshold, diffServAlgDropSpecific,
              diffServAlgDropStorage, diffServAlgDropStatus
    }
    STATUS       current
    DESCRIPTION
       "The Algorithmic Drop Group contains the objects that describe
       algorithmic dropper operation and configuration."
    ::= { diffServMIBGroups 10 }

diffServMIBRandomDropGroup OBJECT-GROUP
    OBJECTS {
              diffServRandomDropNextFree,
              diffServRandomDropMinThreshBytes,
              diffServRandomDropMinThreshPkts,
              diffServRandomDropMaxThreshBytes,
              diffServRandomDropMaxThreshPkts,
              diffServRandomDropProbMax,
              diffServRandomDropWeight,
              diffServRandomDropSamplingRate,
              diffServRandomDropStorage,
              diffServRandomDropStatus
    }
    STATUS       current
    DESCRIPTION
       "The Random Drop Group augments the Algorithmic Drop Group for
       random dropper operation and configuration."
    ::= { diffServMIBGroups 11 }

diffServMIBQGroup OBJECT-GROUP

    OBJECTS {
              diffServQNextFree, diffServQNext, diffServQMinRate,
              diffServQMaxRate, diffServQStorage, diffServQStatus
    }
    STATUS       current
    DESCRIPTION
       "The Queue Group contains the objects that describe an
       interface's queues."
    ::= { diffServMIBGroups 12 }

diffServMIBSchedulerGroup OBJECT-GROUP
    OBJECTS {
              diffServSchedulerNextFree, diffServSchedulerNext,
              diffServSchedulerMethod, diffServSchedulerMinRate,
              diffServSchedulerMaxRate, diffServSchedulerStorage,
              diffServSchedulerStatus
    }
    STATUS       current
    DESCRIPTION
       "The Scheduler Group contains the objects that describe packet
       schedulers on interfaces."
    ::= { diffServMIBGroups 13 }

diffServMIBMinRateGroup OBJECT-GROUP
    OBJECTS {
              diffServMinRateNextFree, diffServMinRatePriority,
              diffServMinRateAbsolute, diffServMinRateRelative,
              diffServMinRateStorage, diffServMinRateStatus
    }
    STATUS       current
    DESCRIPTION
       "The Minimum Rate Parameter Group contains the objects that
       describe packet schedulers' minimum rate or priority guarantees."
    ::= { diffServMIBGroups 14 }

diffServMIBMaxRateGroup OBJECT-GROUP
    OBJECTS {
              diffServMaxRateNextFree, diffServMaxRateAbsolute,
              diffServMaxRateRelative, diffServMaxRateThreshold,
              diffServMaxRateStorage, diffServMaxRateStatus
    }
    STATUS       current
    DESCRIPTION
       "The Maximum Rate Parameter Group contains the objects that
       describe packet schedulers' maximum rate guarantees."
    ::= { diffServMIBGroups 15 }

END

7. Acknowledgments ๐Ÿซถ

okay so this MIB is literally built on top of so much amazing work ๐ŸŒˆ it grew out of the Informal Management Model for Differentiated Services Routers, the Differentiated Services PIB, and the Differentiated Services Policy MIB (SNMPCONF WG) โœจ

tons of people helped make it happen, but the big shoutouts go to Yoram Bernet, Steve Blake, Brian Carpenter, Dave Durham, Michael Fine, Victor Firoiu, Jeremy Greene, Dan Grossman, Roch Guerin, Scott Hahn, Joel Halpern, Van Jacobsen, Keith McCloghrie, Bob Moore, Kathleen Nichols, Ping Pan, Nabil Seddigh, John Seligson, and Walter Weiss ๐Ÿ’–

and the reviewers who were especially gorgeous about it were Juergen Schoenwaelder, Dave Perkins, Frank Strauss, Harrie Hazewinkel, and Bert Wijnen ๐Ÿ‘‘ they looked at how the MIB is structured and how it gets used for network management, plus whether it actually follows SMIv2 ๐Ÿงš

8. Security Considerations ๐Ÿ”’

okay this section is serious bestie, so read it properly ๐Ÿ’€

so, it's pretty obvious that this MIB is useful for configuration. and anything you can configure can also be misconfigured, which can have seriously disastrous effects ๐Ÿ˜ญ

as of writing, no security holes have been found beyond the ones SNMP Security is already meant to handle. those mostly come down to controlling access to sensitive info and to who can configure a device. the other stuff is operator error, which no security architecture can cover ๐Ÿ™ˆ

there are loads of read-write and read-create objects in this MIB, and those are often sensitive or vulnerable depending on the network. doing SET operations in an unsecured environment without proper protection can seriously mess with network operations ๐Ÿ’… for configuration control, SNMP Version 3 is the recommended choice over older versions, because its security model is better โœจ

some objects in here may hold business-sensitive info, like a customer's service contract or the filters a service provider applies to a customer's ingress or egress traffic. but no objects are sensitive in their own right, like passwords or monetary amounts ๐Ÿ“

it might even be important to control GET access to these objects, and maybe even encrypt their values when they go over the network via SNMP. not every version of SNMP has features for that kind of secure setup ๐Ÿ˜ฌ

SNMPv1 on its own is not a secure environment. even if the network is secure (for example, using IPSec), there's still no control over who on that secure network can GET/SET (read/change/create/delete) the objects in this MIB ๐Ÿฅบ

implementors are recommended to think about the security features provided by the SNMPv3 framework. specifically, the User-based Security Model [RFC 2574] and the View-based Access Control Model [RFC 2575] are recommended ๐ŸŒธ

after that, it's on the customer or user to make sure the SNMP entity giving access to an instance of this MIB is set up so only the principals (users) with legitimate rights can GET or SET (change/create/delete) those objects ๐Ÿซถ

9. Intellectual Property Rights ๐Ÿ“œ

the IETF doesn't take a position on whether any intellectual property or other rights claimed to cover this technology are valid or in scope, or on whether any license to those rights is available. it also doesn't say it has tried to find any of those rights ๐Ÿฆ‹ info about the IETF's rules for rights in standards-track and standards-related docs can be found in BCP-11. copies of claimed rights made available for publication, assurances of licenses to be made available, or results of an attempt to get a general license or permission for implementers or users to use those proprietary rights can all be obtained from the IETF Secretariat ๐Ÿ’ผ

the IETF also invites anyone interested to bring to its attention any copyrights, patents, patent applications, or other proprietary rights that may cover technology required to practice this standard. send that info to the IETF Executive Director ๐Ÿ’œ

10. References โœจ

Okay bestie, here's the reading list ๐Ÿ“š๐Ÿ’… every single source this spec cites, in the original order with all the details intact:

  • [RFC 2571] Harrington, D., Presuhn, R. and B. Wijnen, "An Architecture for Describing SNMP Management Frameworks", RFC 2571, April 1999.
  • [RFC 1155] Rose, M. and K. McCloghrie, "Structure and Identification of Management Information for TCP/IP-based Internets", STD 16, RFC 1155, May 1990.
  • [RFC 1212] Rose, M. and K. McCloghrie, "Concise MIB Definitions", STD 16, RFC 1212, March 1991.
  • [RFC 1215] Rose, M., "A Convention for Defining Traps for use with the SNMP", RFC 1215, March 1991.
  • [RFC 2578] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case, J., Rose, M. and S. Waldbusser, "Structure of Management Information Version 2 (SMIv2)", STD 58, RFC 2578, April 1999.
  • [RFC 2579] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case, J., Rose, M. and S. Waldbusser, "Textual Conventions for SMIv2", STD 58, RFC 2579, April 1999.
  • [RFC 2580] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case, J., Rose, M. and S. Waldbusser, "Conformance Statements for SMIv2", STD 58, RFC 2580, April 1999.
  • [RFC 1157] Case, J., Fedor, M., Schoffstall, M. and J. Davin, "Simple Network Management Protocol", STD 15, RFC 1157, May 1990.
  • [RFC 1901] Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Introduction to Community-based SNMPv2", RFC 1901, January 1996.
  • [RFC 1906] Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Transport Mappings for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1906, January 1996.
  • [RFC 2572] Case, J., Harrington D., Presuhn R. and B. Wijnen, "Message Processing and Dispatching for the Simple Network Management Protocol (SNMP)", RFC 2572, April 1999.
  • [RFC 2574] Blumenthal, U. and B. Wijnen, "User-based Security Model (USM) for version 3 of the Simple Network Management Protocol (SNMPv3)", RFC 2574, April 1999.
  • [RFC 1905] Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Protocol Operations for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1905, January 1996.
  • [RFC 2573] Levi, D., Meyer, P. and B. Stewart, "SNMP Applications", RFC 2573, April 1999.
  • [RFC 2575] Wijnen, B., Presuhn, R. and K. McCloghrie, "View-based Access Control Model (VACM) for the Simple Network Management Protocol (SNMP)", RFC 2575, April 1999.
  • [RFC 2570] Case, J., Mundy, R., Partain, D. and B. Stewart, "Introduction to Version 3 of the Internet-standard Network Management Framework", RFC 2570, April 1999.
  • [RFC 2119] Bradner, S., "Key words to use in the RFCs", BCP 14, RFC 2119, March 1997.
  • [ACTQMGMT] V. Firoiu, M. Borden, "A Study of Active Queue Management for Congestion Control", March 2000, In IEEE Infocom 2000, http://www.ieee-infocom.org/2000/papers/405.pdf
  • [AQMROUTER] V. Misra, W. Gong, D. Towsley, "Fluid-based analysis of a network of AQM routers supporting TCP flows with an application to RED", In SIGCOMM 2000, http://www.acm.org/sigcomm/sigcomm2000/conf/paper/sigcomm2000-4-3.ps.gz
  • [AF-PHB] Heinanen, J., Baker, F., Weiss, W. and J. Wroclawski, "Assured Forwarding PHB Group", RFC 2597, June 1999.
  • [DSARCH] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z. and W. Weiss, "An Architecture for Differentiated Service", RFC 2475, December 1998.
  • [DSFIELD] Nichols, K., Blake, S., Baker, F. and D. Black, "Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers", RFC 2474, December 1998.
  • [DSPIB] Fine, M., McCloghrie, K., Seligson, J., Chan, K., Hahn, S. and A. Smith, "Differentiated Services Quality of Service Policy Information Base", Work in Progress.
  • [DSTERMS] Grossman, D., "New Terminology for Differentiated Services", RFC 3260, April 2002.
  • [EF-PHB] Jacobson, V., Nichols, K. and K. Poduri, "An Expedited Forwarding PHB", RFC 3246, March 2002.
  • [IF-MIB] McCloghrie, K. and F. Kastenholz, "The Interfaces Group MIB using SMIv2", RFC 2863, June 2000.
  • [INETADDRESS] Daniele, M., Haberman, B., Routhier, S. and J. Schoenwaelder, "Textual Conventions for Internet Network Addresses.", RFC 3291, May 2002.
  • [INTSERVMIB] Baker, F., Krawczyk, J. and A. Sastry, "Integrated Services Management Information Base using SMIv2", RFC 2213, September 1997.
  • [MODEL] Bernet, Y., Blake, S., Smith, A. and D. Grossman, "An Informal Management Model for Differentiated Services Routers", Work in Progress.
  • [RED93] "Random Early Detection", 1993.
  • [srTCM] Heinanen, J. and R. Guerin, "A Single Rate Three Color Marker", RFC 2697, September 1999.
  • [trTCM] Heinanen, J. and R. Guerin, "A Two Rate Three Color Marker", RFC 2698, September 1999.
  • [TSWTCM] Fang, W., Seddigh, N. and B. Nandy, "A Time Sliding Window Three Color Marker (TSWTCM)", RFC 2859, June 2000.
  • [SHAPER] Bonaventure, O. and S. De Cnodder, "A Rate Adaptive Shaper for Differentiated Services", RFC 2963, October 2000.

11. Authors' Addresses ๐Ÿ’Œ

Meet the squad who built this ๐Ÿซถ Here are the three authors and how to reach them:

Fred Baker
Cisco Systems
1121 Via Del Rey
Santa Barbara, California 93117

EMail: fred@cisco.com


Kwok Ho Chan
Nortel Networks
600 Technology Park Drive
Billerica, MA 01821

EMail: khchan@nortelnetworks.com


Andrew Smith
Harbour Networks
Jiuling Building
21 North Xisanhuan Ave.
Beijing, 100089, PRC

EMail: ah_smith@acm.org

Copyright (C) The Internet Society (2002). All Rights Reserved. ๐Ÿ”’

Here's the legal part, and it matters, so I'm keeping every bit of it ๐Ÿงš Anyone can copy and share this document, and translations too. People are also free to write derivative works that comment on it, explain it, or help people implement it, and to publish and distribute those in whole or in part with no restrictions, as long as the copyright notice and this paragraph stay on every copy and derivative work.

The document itself may not be modified in any way, so you can't strip the copyright notice or the references to the Internet Society or other Internet organizations. The one exception is when it's needed for developing Internet standards, in which case the copyright procedures in the Internet Standards process must be followed. Translating it into languages other than English is also allowed.

The permissions above are perpetual and won't be revoked by the Internet Society or its successors or assigns ๐Ÿ’œ

This document and the information in it is provided on an "AS IS" basis, and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ๐Ÿ’€

Acknowledgement ๐Ÿ“

Funding for the RFC Editor function is currently provided by the Internet Society. Thank you, Internet Society, for keeping the lights on โœจ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from