rfc3290.txt

来自「RFC 的详细文档!」· 文本 代码 · 共 1,553 行 · 第 1/5 页

TXT
1,553 行
字号

   A similar type of classifier can be defined for IPv6.

4.2.3.  Free-form Classifier

   A Free-form classifier is made up of a set of user definable
   arbitrary filters each made up of {bit-field size, offset (from head
   of packet), mask}:

      Classifier2:
      Filter12:    OutputA
      Filter13:    OutputB
      Default:     OutputC







Bernet, et. al.              Informational                     [Page 17]

RFC 3290           Diffserv Informal Management Model           May 2002


      Filter12:
      Type:        FreeForm
      SizeBits:    3 (bits)
      Offset:      16 (bytes)
      Value:       100 (binary)
      Mask:        101 (binary)

      Filter13:
      Type:        FreeForm
      SizeBits:    12 (bits)
      Offset:      16 (bytes)
      Value:       100100000000 (binary)
      Mask:        111111111111 (binary)

   Free-form filters can be combined into filter groups to form very
   powerful filters.

4.2.4.  Other Possible Classifiers

   Classification may also be performed based on information at the
   datalink layer below IP (e.g., VLAN or datalink-layer priority) or
   perhaps on the ingress or egress IP, logical or physical interface
   identifier (e.g., the incoming channel number on a channelized
   interface).  A classifier that filters based on IEEE 802.1p Priority
   and on 802.1Q VLAN-ID might be represented as:

      Classifier3:
      Filter14 AND Filter15:  OutputA
      Default:                OutputB

      Filter14:                        -- priority 4 or 5
      Type:        Ieee8021pPriority
      Value:       100 (binary)
      Mask:        110 (binary)

      Filter15:                        -- VLAN 2304
      Type:        Ieee8021QVlan
      Value:       100100000000 (binary)
      Mask:        111111111111 (binary)

   Such classifiers may be the subject of other standards or may be
   proprietary to a router vendor but they are not discussed further
   here.








Bernet, et. al.              Informational                     [Page 18]

RFC 3290           Diffserv Informal Management Model           May 2002


5.  Meters

   Metering is defined in [DSARCH].  Diffserv network providers may
   choose to offer services to customers based on a temporal (i.e.,
   rate) profile within which the customer submits traffic for the
   service.  In this event, a meter might be used to trigger real-time
   traffic conditioning actions (e.g., marking) by routing a non-
   conforming packet through an appropriate next-stage action element.
   Alternatively, by counting conforming and/or non-conforming traffic
   using a Counter element downstream of the Meter, it might also be
   used to help in collecting data for out-of-band management functions
   such as billing applications.

   Meters are logically 1:N (fan-out) devices (although a multiplexor
   can be used in front of a meter).  Meters are parameterized by a
   temporal profile and by conformance levels, each of which is
   associated with a meter's output.  Each output can be connected to
   another functional element.

   Note that this model of a meter differs slightly from that described
   in [DSARCH].  In that description the meter is not a datapath element
   but is instead used to monitor the traffic stream and send control
   signals to action elements to dynamically modulate their behavior
   based on the conformance of the packet.  This difference in the
   description does not change the function of a meter.  Figure 4
   illustrates a meter with 3 levels of conformance.

   In some Diffserv examples (e.g., [AF-PHB]), three levels of
   conformance are discussed in terms of colors, with green representing
   conforming, yellow representing partially conforming and red
   representing non-conforming.  These different conformance levels may
   be used to trigger different queuing, marking or dropping treatment
   later on in the processing.  Other example meters use a binary notion
   of conformance; in the general case N levels of conformance can be
   supported.  In general there is no constraint on the type of
   functional datapath element following a meter output, but care must
   be taken not to inadvertently configure a datapath that results in
   packet reordering that is not consistent with the requirements of the
   relevant PHB specification.












Bernet, et. al.              Informational                     [Page 19]

RFC 3290           Diffserv Informal Management Model           May 2002


      unmetered              metered
      traffic                traffic
                +---------+
                |         |--------> conformance A
      --------->|  meter  |--------> conformance B
                |         |--------> conformance C
                +---------+

      Figure 4. A Generic Meter

   A meter, according to this model, measures the rate at which packets
   making up a stream of traffic pass it, compares the rate to some set
   of thresholds, and produces some number of potential results (two or
   more):  a given packet is said to be "conformant" to a level of the
   meter if, at the time that the packet is being examined, the stream
   appears to be within the rate limit for the profile associated with
   that level.  A fuller discussion of conformance to meter profiles
   (and the associated requirements that this places on the schedulers
   upstream) is provided in Appendix A.

5.1.  Examples

   The following are some examples of possible meters.

5.1.1.  Average Rate Meter

   An example of a very simple meter is an average rate meter.  This
   type of meter measures the average rate at which packets are
   submitted to it over a specified averaging time.

   An average rate profile may take the following form:

      Meter1:
      Type:                AverageRate
      Profile:             Profile1
      ConformingOutput:    Queue1
      NonConformingOutput: Counter1

      Profile1:
      Type:                AverageRate
      AverageRate:         120 kbps
      Delta:               100 msec

   A Meter measuring against this profile would continually maintain a
   count that indicates the total number and/or cumulative byte-count of
   packets arriving between time T (now) and time T - 100 msecs.  So
   long as an arriving packet does not push the count over 12 kbits in
   the last 100 msec, the packet would be deemed conforming.  Any packet



Bernet, et. al.              Informational                     [Page 20]

RFC 3290           Diffserv Informal Management Model           May 2002


   that pushes the count over 12 kbits would be deemed non-conforming.
   Thus, this Meter deems packets to correspond to one of two
   conformance levels: conforming or non-conforming, and sends them on
   for the appropriate subsequent treatment.

5.1.2.  Exponential Weighted Moving Average (EWMA) Meter

   The EWMA form of Meter is easy to implement in hardware and can be
   parameterized as follows:

      avg_rate(t) = (1 - Gain) * avg_rate(t') +  Gain * rate(t)
      t = t' + Delta

   For a packet arriving at time t:

      if (avg_rate(t) > AverageRate)
         non-conforming
      else
         conforming

   "Gain" controls the time constant (e.g., frequency response) of what
   is essentially a simple IIR low-pass filter.  "Rate(t)" measures the
   number of incoming bytes in a small fixed sampling interval, Delta.
   Any packet that arrives and pushes the average rate over a predefined
   rate AverageRate is deemed non-conforming.  An EWMA Meter profile
   might look something like the following:

      Meter2:
      Type:                ExpWeightedMovingAvg
      Profile:             Profile2
      ConformingOutput:    Queue1
      NonConformingOutput: AbsoluteDropper1

      Profile2:
      Type:                ExpWeightedMovingAvg
      AverageRate:         25 kbps
      Delta:               10 usec
      Gain:                1/16

5.1.3.  Two-Parameter Token Bucket Meter

   A more sophisticated Meter might measure conformance to a token
   bucket (TB) profile.  A TB profile generally has two parameters, an
   average token rate, R, and a burst size, B.  TB Meters compare the
   arrival rate of packets to the average rate specified by the TB
   profile.  Logically, tokens accumulate in a bucket at the average





Bernet, et. al.              Informational                     [Page 21]

RFC 3290           Diffserv Informal Management Model           May 2002


   rate, R, up to a maximum credit which is the burst size, B.  When a
   packet of length L arrives, a conformance test is applied.  There are
   at least two such tests in widespread use:

   Strict conformance
      Packets of length L bytes are considered conforming only if there
      are sufficient tokens available in the bucket at the time of
      packet arrival for the complete packet (i.e., the current depth is
      greater than or equal to L): no tokens may be borrowed from future
      token allocations.  For examples of this approach, see [SRTCM] and
      [TRTCM].

   Loose conformance
      Packets of length L bytes are considered conforming if any tokens
      are available in the bucket at the time of packet arrival: up to L
      bytes may then be borrowed from future token allocations.

   Packets are allowed to exceed the average rate in bursts up to the
   burst size.  For further discussion of loose and strict conformance
   to token bucket profiles, as well as system and implementation
   issues, see Appendix A.

   A two-parameter TB meter has exactly two possible conformance levels
   (conforming, non-conforming).  Such a meter might appear as follows:

      Meter3:
      Type:                SimpleTokenBucket
      Profile:             Profile3
      ConformanceType:     loose
      ConformingOutput:    Queue1
      NonConformingOutput: AbsoluteDropper1

      Profile3:
      Type:                SimpleTokenBucket
      AverageRate:         200 kbps
      BurstSize:           100 kbytes

5.1.4.  Multi-Stage Token Bucket Meter

   More complicated TB meters might define multiple burst sizes and more
   conformance levels.  Packets found to exceed the larger burst size
   are deemed non-conforming.  Packets found to exceed the smaller burst
   size are deemed partially-conforming.  Packets exceeding neither are
   deemed conforming.  Some token bucket meters designed for Diffserv
   networks are described in more detail in [SRTCM, TRTCM]; in some of
   these references, three levels of conformance are discussed in terms
   of colors with green representing conforming, yellow representing
   partially conforming, and red representing non-conforming.  Note that



Bernet, et. al.              Informational                     [Page 22]

RFC 3290           Diffserv Informal Management Model           May 2002


   these multiple-conformance-level meters can sometimes be implemented
   using an appropriate sequence of multiple two-parameter TB meters.

   A profile for a multi-stage TB meter with three levels of conformance
   might look as follows:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?