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 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
This MIB defines a single parameter type for classification, the Multi-field Classifier. As a parameter, a filter may be specified once and applied to many interfaces, using diffServClfrElementSpecific. This filter matches: o IP source address prefix, including host, CIDR Prefix, and "any source address" o IP destination address prefix, including host, CIDR Prefix, and "any destination address" o IPv6 Flow ID o IP protocol or "any" o TCP/UDP/SCTP source port range, including "any" o TCP/UDP/SCTP destination port range, including "any" o Differentiated Services Code Point Since port ranges, IP prefixes, or "any" are defined in each case, it is clear that a wide variety of filters can be constructed. The Differentiated Services Behavior Aggregate filter is a special case of this filter, in which only the DSCP is specified. Other MIB modules may define similar filters in the same way. For example, a filter for Ethernet information might define source and destination MAC addresses of "any", Ethernet Packet Type, IEEE 802.2 SAPs, and IEEE 802.1 priorities. A filter related to policy routing might be structured like the diffServMultiFieldClfrTable, but contain the BGP Communities of the source and destination prefix rather than the prefix itself, meaning "any prefix in this community". For such a filter, a table similar to diffServMultiFieldClfrTable is constructed, and diffServClfrElementSpecific is configured to point to it.
When the MIB is used for configuration, diffServMultiFieldClfrNextFree always contains a legal value for diffServMultiFieldClfrId that is not currently used in the system's configuration.3.3. Metering Traffic
As discussed in [MODEL], a meter and a shaper are functions that operate on opposing ends of a link. A shaper schedules traffic for transmission at specific times in order to approximate a particular line speed or combination of line speeds. In its simplest form, if the traffic stream contains constant sized packets, it might transmit one packet per unit time to build the equivalent of a CBR circuit. However, various factors intervene to make the approximation inexact; multiple classes of traffic may occasionally schedule their traffic at the same time, the variable length nature of IP traffic may introduce variation, and factors in the link or physical layer may change traffic timing. A meter integrates the arrival rate of traffic and determines whether the shaper at the far end was correctly applied, or whether the behavior of the application in question is naturally close enough to such behavior to be acceptable under a given policy. A common type of meter is a Token Bucket meter, such as [srTCM] or [trTCM]. This type of meter assumes the use of a shaper at a previous node; applications which send at a constant rate when sending may conform if the token bucket is properly specified. It specifies the acceptable arrival rate and quantifies the acceptable variability, often by specifying a burst size or an interval; since rate = quantity/time, specifying any two of those parameters implies the third, and a large interval provides for a forgiving system. Multiple rates may be specified, as in AF, such that a subset of the traffic (up to one rate) is accepted with one set of guarantees, and traffic in excess of that but below another rate has a different set of guarantees. Other types of meters exist as well. One use of a meter is when a service provider sells at most, a certain bit rate to one of its customers, and wants to drop the excess. In such a case, the fractal nature of normal Internet traffic must be reflected in large burst intervals, as TCP frequently sends packet pairs or larger bursts, and responds poorly when more than one packet in a round trip interval is dropped. Applications like FTP contain the effect by simply staying below the target bit rate; this type of configuration very adversely affects transaction applications like HTTP, however. Another use of a meter is in the AF specification, in which excess traffic is marked with a related DSCP and subjected to slightly more active queue depth management. The
application is not sharply limited to a contracted rate in such a case, but can be readily contained should its traffic create a burden.3.3.1. diffServMeterTable - The Meter Table
The Meter Table is a structural table, specifying a specific functional data path element. Its entry consists essentially of 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, to identify 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 may be designed in other MIB modules. When the MIB is used for configuration, diffServMeterNextFree always contains a legal value for diffServMeterId that is not 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 may 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, it fails the first few but is slower than and therefore conforms to the higher rates, or it fails all of them. As such, multi-rate meters should specify those rates in monotonically increasing order, passing through the diffServMeterFailNext from more committed to more excess rates, and finally falling through diffServMeterFailNext to the set of actions that apply to traffic which conforms to none of the specified rates. diffServTBParamType in the first entry indicates the algorithm being used. At each rate, diffServTBParamRate is derivable from diffServTBParamBurstSize and diffServTBParamInterval; a superior implementation will allow the
configuration of any two of diffServTBParamRate, diffServTBParamBurstSize, and diffServTBParamInterval, and respond with the appropriate error code if all three are specified but are not mathematically related. When the MIB is used for configuration, diffServTBParamNextFree always contains a legal value for diffServTBParamId that is not currently used in the system's configuration.3.4. Actions applied to packets
"Actions" are the things a differentiated services interface PHB may do to a packet in transit. At a minimum, such 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 composed of a structural element, the diffServActionTable, and various component action entries that may be applied. In the case of the Algorithmic Dropper, an additional parameter table may 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 are chained through diffServActionNext, ultimately resulting in zeroDotZero (indicating that 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 is not currently used in the system's configuration.3.4.2. diffServCountActTable - The Count Action Table
The count action accumulates statistics pertaining to traffic passing through a given path through the policy. It is intended to be useful for usage-based billing, for statistical studies, or for analysis of the behavior of a policy in a given network. The objects in the Count Action are various counters and a discontinuity time. The counters display 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 that every path through a policy should have a corresponding counter. In early versions, it was impossible to configure an action without implementing a counter, although the current design makes them in effect the network manager's option, as a result of making actions consistent in structure and extensibility. The assurance of proper debugging and accounting is therefore left with the policy designer. When the MIB is used for configuration, diffServCountActNextFree always contains a legal value for diffServCountActId that is not 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. It might be viewed not so much as an array of single-object entries as an array of OBJECT-IDENTIFIER conventions, as the OID for a diffServDscpMarkActDscp instance conveys all of the necessary information: packets are to be marked with the requisite DSCP. As such, contrary to common practice, the index for the table is read- only, and 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 is in effect a method which applies a packet to a queue, and may modify either. 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 is inspected, and 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 determine whether the packet should be dropped. When the MIB is used for configuration, diffServAlgDropNextFree always contains a legal value for diffServAlgDropId that is not currently used in the system's configuration.
3.4.5. diffServRandomDropTable - The Random Drop Parameters Table
The Random Drop Table is an extension of the Algorithmic Drop Table intended for use on queues whose depth is actively managed. Active Queue Management algorithms are typified by [RED93], but the parameters they use vary. It was deemed for the purposes of this MIB that the proper values to represent include: o Target case mean queue depth, expressed in bytes or packets o Worst case mean queue depth, expressed in bytes or packets o Maximum drop rate expressed as drops per thousand o Coefficient of an exponentially weighted moving average, expressed as the numerator of a fraction whose denominator is 65536. o Sampling rate An example of the representation chosen in this MIB for this element is shown in Figure 1. Random droppers often have their drop probability function described as a plot of drop probability (P) against averaged queue length (Q). (Qmin,Pmin) then defines the start of the characteristic plot. Normally Pmin=0, meaning with average queue length below Qmin, there will be no drops. (Qmax,Pmax) defines a "knee" on the plot, after which point the drop probability becomes more progressive (greater slope). (Qclip,1) defines the queue length at which all packets will be dropped. Notice this is different from Tail Drop because this uses an averaged queue length, although it is possible for Qclip to equal Qmax. In the MIB module, diffServRandomDropMinThreshBytes and diffServRandomDropMinThreshPkts represent Qmin. diffServRandomDropMaxThreshBytes and diffServRandomDropMaxThreshPkts represent Qmax. diffServAlgDropQThreshold represents Qclip. diffServRandomDropInvProbMax represents Pmax (inverse). This MIB does not represent Pmin (assumed to be zero unless otherwise represented). In addition, since message memory is finite, queues generally have some upper bound above which they are incapable of storing additional traffic. Normally this number is equal to Qclip, specified by diffServAlgDropQThreshold.
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 Each random dropper specification is associated with a queue. This allows multiple drop processes (of same or different types) to be associated with the same queue, as different PHB implementations may require. This also allows for sequences of multiple droppers if necessary. The calculation of a smoothed queue length may also have an important bearing on the behavior of the dropper: parameters may include the sampling interval or rate, and the weight of each sample. The performance may be very sensitive to the values of these parameters and a wide range of possible values may be required due to a wide range of link speeds. Most algorithms include a sample weight, represented here by diffServRandomDropWeight. The availability of diffServRandomDropSamplingRate as readable is important, the information provided by Sampling Rate is essential to the configuration of diffServRandomDropWeight. Having Sampling Rate be configurable is also helpful, as line speed increases, the ability to have queue sampling be less frequent than packet arrival is needed. Note, however, 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 are not standardized here. When the MIB is used for configuration, diffServRandomDropNextFree always contains a legal value for diffServRandomDropId that is not currently used in the system's configuration.
3.5. Queuing and Scheduling of Packets
These include Queues and Schedulers, which are inter-related in their use of queuing techniques. By doing so, it is possible to build multi-level schedulers, such as those which treat a set of queues as having priority among them, and at a specific priority find a secondary WFQ scheduler with some number of queues.3.5.1. diffServQTable - The Class or Queue Table
The Queue Table models simple FIFO queues. The Scheduler Table allows flexibility in constructing both simple and somewhat more complex queuing hierarchies from those queues. Queue Table entries are pointed at by the "next" attributes of the upstream elements, such as diffServMeterSucceedNext or diffServActionNext. Note that multiple upstream elements may direct their traffic to the same Queue Table entry. 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 accomplish that, the upstream diffServAlgDropNext pointers each point to the same diffServQEntry. A common requirement of a queue is that its traffic enjoy a certain minimum or maximum rate, or that it be given a certain priority. Functionally, the selection of such is a function of a scheduler. The parameter is associated with the queue, however, using the Minimum or Maximum Rate Parameters Table. When the MIB is used for configuration, diffServQNextFree always contains a legal value for diffServQId that is not 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 allows flexibility in constructing both simple and somewhat more complex queuing hierarchies from those queues. When the MIB is used for configuration, diffServSchedulerNextFree always contains a legal value for diffServSchedulerId that is not 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, this is done using the diffServMinRateTable.
Rates may be expressed as absolute rates, or as a fraction of ifSpeed, and imply the use of a rate-based scheduler such as WFQ or WRR. The use of a priority implies the use of a Priority Scheduler. Only one of the Absolute or Relative rates needs to be set; the other 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 less 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 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 is not 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, this is 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 takes the relevant value as a result. The definition of a multirate shaper requires multiple diffServMaxRateEntries. In this 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 which exceeds the arrival rate of traffic. When the MIB is used for configuration, diffServMaxRateNextFree always contains a legal value for diffServMaxRateId that is not currently used in the system's configuration.3.5.5. Using queues and schedulers together
For representing a Strict Priority scheduler, each scheduler input is assigned a priority with respect to all the other inputs feeding the same scheduler, with default values for the other parameters. Higher-priority traffic that is not being delayed for shaping will be serviced before a lower-priority input. An example is found in Figure 2.
For weighted scheduling methods, such as WFQ or WRR, the "weight" of a given scheduler input is represented with a Minimum Service Rate leaky-bucket profile which provides a guaranteed minimum bandwidth to that input, if required. This is represented by a rate diffServMinRateAbsolute; the classical weight is the ratio between that rate and the interface speed, or perhaps the ratio between that rate and the sum of the configured rates for classes. The rate may be represented by a relative value, as a fraction of the interface's current line rate, diffServMinRateRelative, to assist in cases where line rates are variable or where a higher-level policy might be expressed in terms of fractions of network resources. The two rate parameters are inter-related and changes in one may be reflected in the other. An example is found in figure 3. +-----+ +-------+ | 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 scheduling methods, one can say loosely, that WRR focuses on meeting bandwidth sharing, without concern for relative delay amongst the queues; where WFQ controls both queue the service order and the amount of traffic serviced, providing 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: this is done by defining a Maximum Service Rate leaky-bucket profile in order to limit the scheduler bandwidth available to that input. This is represented by a rate, in diffServMaxRateAbsolute; the classical weight is the ratio between that rate and the interface speed, or perhaps the ratio between that rate and the sum of the configured rates for classes. The rate may be represented by a relative value, as a fraction of the interface's current line rate, diffServMaxRateRelative. This MIB presumes that shaping is something a scheduler does to its inputs, which it models as a queue with a maximum rate or 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 | +-----+ Figure 3: WRR or WFQ rate-based scheduler with two inputs The same may be done on a queue, if a given class is to be shaped to a maximum rate without shaping 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. This requires 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, one must use a combination of priority and WRR/WFQ scheduling. This requires us to cascade two schedulers. If one were to additionally shape the output of the system to a rate lower than the interface rate, one must 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 us 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 ensures that any excess is appropriately dealt with according to the PHB. For AF, this means marking excess; for EF, it means dropping 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 arriving at an ingress interface picks up its policy from the diffServDataPathTable. This points to a classifier, which will select traffic according to 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 identifying 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 specifying the EF code point, a collection of classifiers with parameter blocks specifying individual telephone calls, or a variety of other approaches. Typically, of course, a classifier identifies a variety of traffic and breaks it up into separate classes. It might very well contain fourteen classifier elements indicating the twelve AFmn DSCP values, EF, and "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, dividing traffic into three groups. These groups of traffic conform to both specified rates, only the higher one, or none. The intent, on the ingress interface at the edge of the network, is to measure and appropriately mark traffic.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, 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 (as 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
For network planning and perhaps for billing purposes, arriving traffic is normally counted. Therefore, a "count" action, consisting of an action table entry pointing to a count table entry, is configured. Also, traffic is marked with the appropriate DSCP. The first R bits per second are marked AFm1, the next S-R bits per second are marked AFm2, and the rest is marked AFm3. It may be that traffic is arriving marked with the same DSCP, but in general, the additional complexity of deciding that it is being remarked to the same value is not useful. Therefore, a "mark" action, consisting of an action table entry pointing to a mark table entry, is configured. At this point, the usual case is that traffic is now forwarded in the usual manner. To indicate this, 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, dividing traffic into "conforming" and "excess" groups. The intent, on the ingress interface at the edge of the network, is to measure and appropriately mark conforming traffic and drop the excess.3.6.1.3.1. EF Metering On an Ingress Edge Interface
A single rate two color (srTCM) meter requires one token bucket. It is therefore configured using a single meter entry with a corresponding Token Bucket Parameter Entry. Arriving traffic either "succeeds" or "fails".3.6.1.3.2. EF Actions On an Ingress Edge Interface
For network planning and perhaps for billing purposes, arriving traffic that conforms to the meter is normally counted. Therefore, a "count" action, consisting of an action table entry pointing to a count table entry, is configured.
Also, traffic is (re)marked with the EF DSCP. Therefore, a "mark" action, consisting of an action table entry pointing to a mark table entry, is configured. At this point, the successful traffic is now forwarded in the usual manner. To indicate this, the "SucceedNext" pointer of the Mark Action is set to zeroDotZero. Traffic that exceeded the arrival policy, however, is to be dropped. One can use a count action on this traffic if the several counters are interesting. However, since the drop counter in the Algorithmic Drop Entry will count packets dropped, this is not clearly necessary. An Algorithmic Drop Entry of the type "alwaysDrop" with no successor is sufficient.3.7. AF and EF Egress Edge Interface Configuration
3.7.1. Classification On an Egress Edge Interface
A packet arriving at an egress interface may have been classified on an ingress interface, and the egress interface may have access to that information. If it is relevant, there is no reason not to use that information. If it is not available, however, there may be a need to (re)classify on the egress interface. In any event, it picks up its "program" from the diffServDataPathTable. This points to a classifier, which will select 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 a succession of three classifier elements, each pointing to a Multi-field classification parameter block identifying one of the AFmn DSCPs. Alternatively, the filter might contain selectors for HTTP traffic or some other application.
An example of a classifier for EF traffic might be either a classifier element pointing to a Multi-field parameter specifying the EF code point, or a collection of classifiers with parameter blocks specifying individual telephone calls, or a variety of other approaches. Each classifier delivers traffic to appropriate functional data path elements.3.7.2. AF Implementation On an Egress Edge Interface
Each AFm class applies a Two Rate Three Color Meter, dividing traffic into three groups. These groups of traffic conform to both specified rates, only the higher one, or none. The intent, on the ingress interface at the edge of the network, is to measure and appropriately mark traffic.3.7.2.1. AF Metering On an Egress 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, 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 (as it is 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 configuration3.7.2.2. AF Actions On an Egress Edge Interface
For network planning and perhaps for billing purposes, departing traffic is normally counted. Therefore, a "count" action, consisting of an action table entry pointing to a count table entry, is configured. Also, traffic may be 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 is marked AFm3. It may be that traffic is arriving marked with the same DSCP, but in general, the additional complexity of deciding that it is being remarked to the same value is not useful. Therefore, a "mark" action, consisting of an action table entry pointing to a mark table entry, is configured. At this point, the usual case is that traffic is now queued for transmission. The queue uses Active Queue Management, using an algorithm such as RED. Therefore, an Algorithmic Dropper is
configured for each AFmn traffic stream, with a slightly lower min- threshold (and possibly 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 expected by AF is normally a work-conserving queue. It usually has a specified minimum rate, and may have a maximum rate below the bandwidth of the interface. In concept, it will use as much bandwidth as is available to it, but assure the lower bound. Common ways to implement this include various forms of Weighted Fair Queuing (WFQ) or Weighted Round Robin (WRR). Integrated over a longer interval, these give each class a predictable throughput rate. They differ in that over short intervals they will order traffic differently. In general, traffic classes that keep traffic in queue will tend to absorb latency from queues with lower mean occupancy, in exchange for which they make use of any available capacity.3.7.3. EF Implementation On an Egress Edge Interface
The EF class applies a Single Rate Two Color Meter, dividing traffic into "conforming" and "excess" groups. The intent, on the egress interface at the edge of the network, is to measure and appropriately mark conforming traffic and drop the excess.3.7.3.1. EF Metering On an Egress Edge Interface
A single rate two color (srTCM) meter requires one token bucket. It is therefore 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
For network planning and perhaps for billing purposes, departing traffic that conforms to the meter is normally counted. Therefore, a "count" action, consisting of an action table entry pointing to a count table entry, is configured. Also, traffic is (re)marked with the EF DSCP. Therefore, a "mark" action, consisting of an action table entry pointing to a mark table entry, is configured.
+-----------------------------------------------------+ | 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 successful traffic is now queued for transmission, using a priority queue or perhaps a rate-based queue with significant over-provision. Since the amount of traffic present is known, one might not drop from this queue at all. Traffic that exceeded the policy, however, is dropped. A count action can be used on this traffic if the several counters are interesting. However, since the drop counter in the Algorithmic Drop Entry will count packets dropped, this is not clearly necessary. An Algorithmic Drop Entry of the type "alwaysDrop" with no successor is sufficient.3.7.3.3. EF Priority Queuing On an Egress Edge Interface
The normal implementation is a priority queue, to minimize induced jitter. A separate queue is used for each EF class, with a strict ordering.
4. Conventions used in this MIB
4.1. The use of RowPointer to indicate data path linkage
RowPointer is a textual convention used to identify a conceptual row in a MIB Table by pointing to one of its objects. One of the ways this MIB uses it is to indicate succession, pointing to data path linkage table entries. For succession, it answers the question "what happens next?". Rather than presume that the next table must be as specified in the conceptual model [MODEL] and providing its index, the RowPointer takes you to the MIB row representing 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. Since a RowPointer is not tied to any specific object except by the value it contains, it is possible and acceptable to use RowPointers to merge data paths. An obvious example of such a use is in the classifier: traffic matching the DSCPs AF11, AF12, and AF13 might be presented to the same meter in order to perform the processing described in the Assured Forwarding PHB. Another use would be to merge data paths from several interfaces; if they represent a single service contract, having them share a common set of counters and common policy may be a desirable configuration. Note well, however, that such configurations may have related implementation issues - if Differentiated Services processing for the interfaces is implemented in multiple forwarding engines, the engines will need to communicate if they are to implement such a feature. An implementation that fails to provide this capability is not considered to have failed the intention of this MIB or of the [MODEL]; an implementation that does provide it is not considered superior from a standards perspective. NOTE -- the RowPointer construct is used to connect the functional data paths. The [MODEL] describes these as TCBs, as an aid to understanding. This MIB, however, does not model TCBs directly. It operates at a lower level of abstraction using only individual elements, connected in succession by RowPointers. Therefore, the concept of TCBs enclosing individual Functional Data Path elements is not directly applicable to this MIB, although management tools that use this MIB may employ such a concept. It is possible that a path through a device following a set of RowPointers is indeterminate i.e. it ends in a dangling RowPointer. Guidance is provided in the MIB module's DESCRIPTION-clause for each of the linkage attribute. In general, for both zeroDotZero and dangling RowPointer, it is assumed the data path ends and the traffic
should be given to the next logical part of the device, usually a forwarding process or a transmission engine, or the proverbial bit- bucket. Any variation from this usage is indicated by the attribute affected.4.2. The use of RowPointer to indicate parameters
RowPointer is also used in this MIB to indicate parameterization, for pointing to parameterization table entries. For indirection (as in the diffServClfrElementTable), the idea is to allow other MIBs, including proprietary ones, to define new and arcane filters - MAC headers, IPv4 and IPv6 headers, BGP Communities and all sorts of other things - while still utilizing the structures of this MIB. This is a form of class inheritance (in "object oriented" language): it allows base object definitions ("classes") to be extended in proprietary or standard ways, in the future, by other documents. RowPointer also clearly indicates the identified conceptual row's content does not change, hence they can be simultaneously used and pointed to, by more than one data path linkage table entries. The identification of RowPointer allows higher level policy mechanisms to take advantage of this characteristic.4.3. Conceptual row creation and deletion
A number of conceptual tables defined in this MIB use as an index an arbitrary integer value, unique across the scope of the agent. In order to help with multi-manager row-creation problems, a mechanism must be provided to allow a manager to obtain unique values for such an index and to ensure that, when used, the manager knows whether it got what it wanted or not. Typically, such a table has an associated NextFree variable e.g. diffServClfrNextFree which provides a suitable value for the index of the next row to be created e.g. diffServClfrId. The value zero is used to indicate that the agent can configure no more entries. The table also has a columnar Status attribute with RowStatus syntax [RFC 2579]. Generally, if a manager attempts to create a row, the agent will create the row and return success. If the agent has insufficient resources or such a row already exists, then it returns an error. A manager must be prepared to try again in such circumstances, probably by re-reading the NextFree to obtain a new index value in case a second manager had got in between the first manager's read of the NextFree value and the first manager's row-creation attempt.
To simplify management creation and deletion of rows in this MIB, the agent is expected to assist in maintaining its consistency. It may accomplish this by maintaining internal usage counters for any row that might be pointed to by a RowPointer, or by any equivalent means. When a RowPointer is created or written, and the row it points to does not exist, the SET returns an inconsistentValue error. When a RowStatus variable is set to 'destroy' but the usage counter is non- zero, the SET returns no error but the indicated row is left intact. The agent should later remove the row in the event that the usage counter becomes zero. The use of RowStatus is covered in more detail in [RFC 2579].5. Extending this MIB
With the structures of this MIB divided into data path linkage tables and parameterization tables, and with the use of RowPointer, new data path linkage and parameterization tables can be defined in other MIB modules, and used with tables defined in this MIB. This MIB does not limit the type of entries its RowPointer attributes can point to, hence new functional data path elements can be defined in other MIBs and integrated with functional data path elements of this MIB. For example, new Action functional data path element can be defined for Traffic Engineering and be integrated with Differentiated Services functional data path elements, possibly used within the same data path sharing the same classifiers and meters. It is more likely that new parameterization tables will be created 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 both new data path linkage tables and parameterization tables can be added without needing to change this MIB document or affect existing tables and their usage.