home *** CD-ROM | disk | FTP | other *** search
/ Internet Core Protocols / Oreilly-InternetCoreProtocols.iso / RFCs / rfc2330.txt < prev    next >
Encoding:
Text File  |  1999-10-14  |  94.4 KB  |  2,244 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          V. Paxson
  8. Request for Comments: 2330                Lawrence Berkeley National Lab
  9. Category: Informational                                         G. Almes
  10.                                              Advanced Network & Services
  11.                                                               J. Mahdavi
  12.                                                                M. Mathis
  13.                                          Pittsburgh Supercomputer Center
  14.                                                                 May 1998
  15.  
  16.  
  17.                   Framework for IP Performance Metrics
  18.  
  19.  
  20. 1. Status of this Memo
  21.  
  22.    This memo provides information for the Internet community.  It does
  23.    not specify an Internet standard of any kind.  Distribution of this
  24.    memo is unlimited.
  25.  
  26.  
  27. 2. Copyright Notice
  28.  
  29.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  30.  
  31. Table of Contents
  32.  
  33.    1.  STATUS OF THIS MEMO.............................................1
  34.    2.  COPYRIGHT NOTICE................................................1
  35.    3.  INTRODUCTION....................................................2
  36.    4.  CRITERIA FOR IP PERFORMANCE METRICS.............................3
  37.    5.  TERMINOLOGY FOR PATHS AND CLOUDS................................4
  38.    6.  FUNDAMENTAL CONCEPTS............................................5
  39.      6.1  Metrics......................................................5
  40.      6.2  Measurement Methodology......................................6
  41.      6.3  Measurements, Uncertainties, and Errors......................7
  42.    7.  METRICS AND THE ANALYTICAL FRAMEWORK............................8
  43.    8.  EMPIRICALLY SPECIFIED METRICS..................................11
  44.    9.  TWO FORMS OF COMPOSITION.......................................12
  45.      9.1  Spatial Composition of Metrics..............................12
  46.      9.2  Temporal Composition of Formal Models and Empirical Metrics.13
  47.    10.  ISSUES RELATED TO TIME........................................14
  48.      10.1  Clock Issues...............................................14
  49.      10.2  The Notion of "Wire Time"..................................17
  50.    11. SINGLETONS, SAMPLES, AND STATISTICS............................19
  51.      11.1  Methods of Collecting Samples..............................20
  52.        11.1.1 Poisson Sampling........................................21
  53.        11.1.2 Geometric Sampling......................................22
  54.        11.1.3 Generating Poisson Sampling Intervals...................22
  55.  
  56.  
  57.  
  58. Paxson, et. al.              Informational                      [Page 1]
  59.  
  60. RFC 2330          Framework for IP Performance Metrics          May 1998
  61.  
  62.  
  63.      11.2  Self-Consistency...........................................24
  64.      11.3  Defining Statistical Distributions.........................25
  65.      11.4  Testing For Goodness-of-Fit................................27
  66.    12. AVOIDING STOCHASTIC METRICS....................................28
  67.    13. PACKETS OF TYPE P..............................................29
  68.    14. INTERNET ADDRESSES VS. HOSTS...................................30
  69.    15. STANDARD-FORMED PACKETS........................................30
  70.    16. ACKNOWLEDGEMENTS...............................................31
  71.    17. SECURITY CONSIDERATIONS........................................31
  72.    18. APPENDIX.......................................................32
  73.    19. REFERENCES.....................................................38
  74.    20. AUTHORS' ADDRESSES.............................................39
  75.    21. FULL COPYRIGHT STATEMENT.......................................40
  76.  
  77.  
  78. 3. Introduction
  79.  
  80.    The purpose of this memo is to define a general framework for
  81.    particular metrics to be developed by the IETF's IP Performance
  82.    Metrics effort, begun by the Benchmarking Methodology Working Group
  83.    (BMWG) of the Operational Requirements Area, and being continued by
  84.    the IP Performance Metrics Working Group (IPPM) of the Transport
  85.    Area.
  86.  
  87.    We begin by laying out several criteria for the metrics that we
  88.    adopt.  These criteria are designed to promote an IPPM effort that
  89.    will maximize an accurate common understanding by Internet users and
  90.    Internet providers of the performance and reliability both of end-
  91.    to-end paths through the Internet and of specific 'IP clouds' that
  92.    comprise portions of those paths.
  93.  
  94.    We next define some Internet vocabulary that will allow us to speak
  95.    clearly about Internet components such as routers, paths, and clouds.
  96.  
  97.    We then define the fundamental concepts of 'metric' and 'measurement
  98.    methodology', which allow us to speak clearly about measurement
  99.    issues.  Given these concepts, we proceed to discuss the important
  100.    issue of measurement uncertainties and errors, and develop a key,
  101.    somewhat subtle notion of how they relate to the analytical framework
  102.    shared by many aspects of the Internet engineering discipline.  We
  103.    then introduce the notion of empirically defined metrics, and finish
  104.    this part of the document with a general discussion of how metrics
  105.    can be 'composed'.
  106.  
  107.    The remainder of the document deals with a variety of issues related
  108.    to defining sound metrics and methodologies:  how to deal with
  109.    imperfect clocks; the notion of 'wire time' as distinct from 'host
  110.    time'; how to aggregate sets of singleton metrics into samples and
  111.  
  112.  
  113.  
  114. Paxson, et. al.              Informational                      [Page 2]
  115.  
  116. RFC 2330          Framework for IP Performance Metrics          May 1998
  117.  
  118.  
  119.    derive sound statistics from those samples; why it is recommended to
  120.    avoid thinking about Internet properties in probabilistic terms (such
  121.    as the probability that a packet is dropped), since these terms often
  122.    include implicit assumptions about how the network behaves; the
  123.    utility of defining metrics in terms of packets of a generic type;
  124.    the benefits of preferring IP addresses to DNS host names; and the
  125.    notion of 'standard-formed' packets.  An appendix discusses the
  126.    Anderson-Darling test for gauging whether a set of values matches a
  127.    given statistical distribution, and gives C code for an
  128.    implementation of the test.
  129.  
  130.    In some sections of the memo, we will surround some commentary text
  131.    with the brackets {Comment: ... }.  We stress that this commentary is
  132.    only commentary, and is not itself part of the framework document or
  133.    a proposal of particular metrics.  In some cases this commentary will
  134.    discuss some of the properties of metrics that might be envisioned,
  135.    but the reader should assume that any such discussion is intended
  136.    only to shed light on points made in the framework document, and not
  137.    to suggest any specific metrics.
  138.  
  139.  
  140. 4. Criteria for IP Performance Metrics
  141.  
  142.    The overarching goal of the IP Performance Metrics effort is to
  143.    achieve a situation in which users and providers of Internet
  144.    transport service have an accurate common understanding of the
  145.    performance and reliability of the Internet component 'clouds' that
  146.    they use/provide.
  147.  
  148.    To achieve this, performance and reliability metrics for paths
  149.    through the Internet must be developed.  In several IETF meetings
  150.    criteria for these metrics have been specified:
  151.  
  152.  +    The metrics must be concrete and well-defined,
  153.  +    A methodology for a metric should have the property that it is
  154.       repeatable: if the methodology is used multiple times under
  155.       identical conditions, the same measurements should result in the
  156.       same measurements.
  157.  +    The metrics must exhibit no bias for IP clouds implemented with
  158.       identical technology,
  159.  +    The metrics must exhibit understood and fair bias for IP clouds
  160.       implemented with non-identical technology,
  161.  +    The metrics must be useful to users and providers in understanding
  162.       the performance they experience or provide,
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Paxson, et. al.              Informational                      [Page 3]
  171.  
  172. RFC 2330          Framework for IP Performance Metrics          May 1998
  173.  
  174.  
  175.  +    The metrics must avoid inducing artificial performance goals.
  176.  
  177.  
  178. 5. Terminology for Paths and Clouds
  179.  
  180.    The following list defines terms that need to be precise in the
  181.    development of path metrics.  We begin with low-level notions of
  182.    'host', 'router', and 'link', then proceed to define the notions of
  183.    'path', 'IP cloud', and 'exchange' that allow us to segment a path
  184.    into relevant pieces.
  185.  
  186.    host A computer capable of communicating using the Internet
  187.         protocols; includes "routers".
  188.  
  189.    link A single link-level connection between two (or more) hosts;
  190.         includes leased lines, ethernets, frame relay clouds, etc.
  191.  
  192.    routerA host which facilitates network-level communication between
  193.         hosts by forwarding IP packets.
  194.  
  195.    path A sequence of the form < h0, l1, h1, ..., ln, hn >, where n >=
  196.         0, each hi is a host, each li is a link between hi-1 and hi,
  197.         each h1...hn-1 is a router.  A pair <li, hi> is termed a 'hop'.
  198.         In an appropriate operational configuration, the links and
  199.         routers in the path facilitate network-layer communication of
  200.         packets from h0 to hn.  Note that path is a unidirectional
  201.         concept.
  202.  
  203.    subpath
  204.         Given a path, a subpath is any subsequence of the given path
  205.         which is itself a path.  (Thus, the first and last element of a
  206.         subpath is a host.)
  207.  
  208.    cloudAn undirected (possibly cyclic) graph whose vertices are routers
  209.         and whose edges are links that connect pairs of routers.
  210.         Formally, ethernets, frame relay clouds, and other links that
  211.         connect more than two routers are modelled as fully-connected
  212.         meshes of graph edges.  Note that to connect to a cloud means to
  213.         connect to a router of the cloud over a link; this link is not
  214.         itself part of the cloud.
  215.  
  216.    exchange
  217.         A special case of a link, an exchange directly connects either a
  218.         host to a cloud and/or one cloud to another cloud.
  219.  
  220.    cloud subpath
  221.         A subpath of a given path, all of whose hosts are routers of a
  222.         given cloud.
  223.  
  224.  
  225.  
  226. Paxson, et. al.              Informational                      [Page 4]
  227.  
  228. RFC 2330          Framework for IP Performance Metrics          May 1998
  229.  
  230.  
  231.    path digest
  232.         A sequence of the form < h0, e1, C1, ..., en, hn >, where n >=
  233.         0, h0 and hn are hosts, each e1 ... en is an exchange, and each
  234.         C1 ... Cn-1 is a cloud subpath.
  235.  
  236. 6. Fundamental Concepts
  237.  
  238.  
  239. 6.1. Metrics
  240.  
  241.    In the operational Internet, there are several quantities related to
  242.    the performance and reliability of the Internet that we'd like to
  243.    know the value of.  When such a quantity is carefully specified, we
  244.    term the quantity a metric.  We anticipate that there will be
  245.    separate RFCs for each metric (or for each closely related group of
  246.    metrics).
  247.  
  248.    In some cases, there might be no obvious means to effectively measure
  249.    the metric; this is allowed, and even understood to be very useful in
  250.    some cases.  It is required, however, that the specification of the
  251.    metric be as clear as possible about what quantity is being
  252.    specified.  Thus, difficulty in practical measurement is sometimes
  253.    allowed, but ambiguity in meaning is not.
  254.  
  255.    Each metric will be defined in terms of standard units of
  256.    measurement.  The international metric system will be used, with the
  257.    following points specifically noted:
  258.  
  259.  +    When a unit is expressed in simple meters (for distance/length) or
  260.       seconds (for duration), appropriate related units based on
  261.       thousands or thousandths of acceptable units are acceptable.
  262.       Thus, distances expressed in kilometers (km), durations expressed
  263.       in milliseconds (ms), or microseconds (us) are allowed, but not
  264.       centimeters (because the prefix is not in terms of thousands or
  265.       thousandths).
  266.  +    When a unit is expressed in a combination of units, appropriate
  267.       related units based on thousands or thousandths of acceptable
  268.       units are acceptable, but all such thousands/thousandths must be
  269.       grouped at the beginning.  Thus, kilo-meters per second (km/s) is
  270.       allowed, but meters per millisecond is not.
  271.  +    The unit of information is the bit.
  272.  +    When metric prefixes are used with bits or with combinations
  273.       including bits, those prefixes will have their metric meaning
  274.       (related to decimal 1000), and not the meaning conventional with
  275.       computer storage (related to decimal 1024).  In any RFC that
  276.       defines a metric whose units include bits, this convention will be
  277.       followed and will be repeated to ensure clarity for the reader.
  278.  
  279.  
  280.  
  281.  
  282. Paxson, et. al.              Informational                      [Page 5]
  283.  
  284. RFC 2330          Framework for IP Performance Metrics          May 1998
  285.  
  286.  
  287.  +    When a time is given, it will be expressed in UTC.
  288.  
  289.    Note that these points apply to the specifications for metrics and
  290.    not, for example, to packet formats where octets will likely be used
  291.    in preference/addition to bits.
  292.  
  293.    Finally, we note that some metrics may be defined purely in terms of
  294.    other metrics; such metrics are call 'derived metrics'.
  295.  
  296.  
  297. 6.2. Measurement Methodology
  298.  
  299.    For a given set of well-defined metrics, a number of distinct
  300.    measurement methodologies may exist.  A partial list includes:
  301.  
  302.  +    Direct measurement of a performance metric using injected test
  303.       traffic.  Example: measurement of the round-trip delay of an IP
  304.       packet of a given size over a given route at a given time.
  305.  +    Projection of a metric from lower-level measurements.  Example:
  306.       given accurate measurements of propagation delay and bandwidth for
  307.       each step along a path, projection of the complete delay for the
  308.       path for an IP packet of a given size.
  309.  +    Estimation of a constituent metric from a set of more aggregated
  310.       measurements.  Example: given accurate measurements of delay for a
  311.       given one-hop path for IP packets of different sizes, estimation
  312.       of propagation delay for the link of that one-hop path.
  313.  +    Estimation of a given metric at one time from a set of related
  314.       metrics at other times.  Example: given an accurate measurement of
  315.       flow capacity at a past time, together with a set of accurate
  316.       delay measurements for that past time and the current time, and
  317.       given a model of flow dynamics, estimate the flow capacity that
  318.       would be observed at the current time.
  319.  
  320.    This list is by no means exhaustive.  The purpose is to point out the
  321.    variety of measurement techniques.
  322.  
  323.    When a given metric is specified, a given measurement approach might
  324.    be noted and discussed.  That approach, however, is not formally part
  325.    of the specification.
  326.  
  327.    A methodology for a metric should have the property that it is
  328.    repeatable: if the methodology is used multiple times under identical
  329.    conditions, it should result in consistent measurements.
  330.  
  331.    Backing off a little from the word 'identical' in the previous
  332.    paragraph, we could more accurately use the word 'continuity' to
  333.    describe a property of a given methodology: a methodology for a given
  334.    metric exhibits continuity if, for small variations in conditions, it
  335.  
  336.  
  337.  
  338. Paxson, et. al.              Informational                      [Page 6]
  339.  
  340. RFC 2330          Framework for IP Performance Metrics          May 1998
  341.  
  342.  
  343.    results in small variations in the resulting measurements.  Slightly
  344.    more precisely, for every positive epsilon, there exists a positive
  345.    delta, such that if two sets of conditions are within delta of each
  346.    other, then the resulting measurements will be within epsilon of each
  347.    other.  At this point, this should be taken as a heuristic driving
  348.    our intuition about one kind of robustness property rather than as a
  349.    precise notion.
  350.  
  351.    A metric that has at least one methodology that exhibits continuity
  352.    is said itself to exhibit continuity.
  353.  
  354.    Note that some metrics, such as hop-count along a path, are integer-
  355.    valued and therefore cannot exhibit continuity in quite the sense
  356.    given above.
  357.  
  358.    Note further that, in practice, it may not be practical to know (or
  359.    be able to quantify) the conditions relevant to a measurement at a
  360.    given time.  For example, since the instantaneous load (in packets to
  361.    be served) at a given router in a high-speed wide-area network can
  362.    vary widely over relatively brief periods and will be very hard for
  363.    an external observer to quantify, various statistics of a given
  364.    metric may be more repeatable, or may better exhibit continuity.  In
  365.    that case those particular statistics should be specified when the
  366.    metric is specified.
  367.  
  368.    Finally, some measurement methodologies may be 'conservative' in the
  369.    sense that the act of measurement does not modify, or only slightly
  370.    modifies, the value of the performance metric the methodology
  371.    attempts to measure.  {Comment: for example, in a wide-are high-speed
  372.    network under modest load, a test using several small 'ping' packets
  373.    to measure delay would likely not interfere (much) with the delay
  374.    properties of that network as observed by others.  The corresponding
  375.    statement about tests using a large flow to measure flow capacity
  376.    would likely fail.}
  377.  
  378.  
  379. 6.3. Measurements, Uncertainties, and Errors
  380.  
  381.    Even the very best measurement methodologies for the very most well
  382.    behaved metrics will exhibit errors.  Those who develop such
  383.    measurement methodologies, however, should strive to:
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Paxson, et. al.              Informational                      [Page 7]
  395.  
  396. RFC 2330          Framework for IP Performance Metrics          May 1998
  397.  
  398.  
  399.  +    minimize their uncertainties/errors,
  400.  +    understand and document the sources of uncertainty/error, and
  401.  +    quantify the amounts of uncertainty/error.
  402.  
  403.    For example, when developing a method for measuring delay, understand
  404.    how any errors in your clocks introduce errors into your delay
  405.    measurement, and quantify this effect as well as you can.  In some
  406.    cases, this will result in a requirement that a clock be at least up
  407.    to a certain quality if it is to be used to make a certain
  408.    measurement.
  409.  
  410.    As a second example, consider the timing error due to measurement
  411.    overheads within the computer making the measurement, as opposed to
  412.    delays due to the Internet component being measured.  The former is a
  413.    measurement error, while the latter reflects the metric of interest.
  414.    Note that one technique that can help avoid this overhead is the use
  415.    of a packet filter/sniffer, running on a separate computer that
  416.    records network packets and timestamps them accurately (see the
  417.    discussion of 'wire time' below).  The resulting trace can then be
  418.    analyzed to assess the test traffic, minimizing the effect of
  419.    measurement host delays, or at least allowing those delays to be
  420.    accounted for.  We note that this technique may prove beneficial even
  421.    if the packet filter/sniffer runs on the same machine, because such
  422.    measurements generally provide 'kernel-level' timestamping as opposed
  423.    to less-accurate 'application-level' timestamping.
  424.  
  425.    Finally, we note that derived metrics (defined above) or metrics that
  426.    exhibit spatial or temporal composition (defined below) offer
  427.    particular occasion for the analysis of measurement uncertainties,
  428.    namely how the uncertainties propagate (conceptually) due to the
  429.    derivation or composition.
  430.  
  431.  
  432. 7. Metrics and the Analytical Framework
  433.  
  434.    As the Internet has evolved from the early packet-switching studies
  435.    of the 1960s, the Internet engineering community has evolved a common
  436.    analytical framework of concepts.  This analytical framework, or A-
  437.    frame, used by designers and implementers of protocols, by those
  438.    involved in measurement, and by those who study computer network
  439.    performance using the tools of simulation and analysis, has great
  440.    advantage to our work.  A major objective here is to generate network
  441.    characterizations that are consistent in both analytical and
  442.    practical settings, since this will maximize the chances that non-
  443.    empirical network study can be better correlated with, and used to
  444.    further our understanding of, real network behavior.
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Paxson, et. al.              Informational                      [Page 8]
  451.  
  452. RFC 2330          Framework for IP Performance Metrics          May 1998
  453.  
  454.  
  455.    Whenever possible, therefore, we would like to develop and leverage
  456.    off of the A-frame.  Thus, whenever a metric to be specified is
  457.    understood to be closely related to concepts within the A-frame, we
  458.    will attempt to specify the metric in the A-frame's terms.  In such a
  459.    specification we will develop the A-frame by precisely defining the
  460.    concepts needed for the metric, then leverage off of the A-frame by
  461.    defining the metric in terms of those concepts.
  462.  
  463.    Such a metric will be called an 'analytically specified metric' or,
  464.    more simply, an analytical metric.
  465.  
  466.    {Comment: Examples of such analytical metrics might include:
  467.  
  468. propagation time of a link
  469.      The time, in seconds, required by a single bit to travel from the
  470.      output port on one Internet host across a single link to another
  471.      Internet host.
  472.  
  473. bandwidth of a link for packets of size k
  474.      The capacity, in bits/second, where only those bits of the IP
  475.      packet are counted, for packets of size k bytes.
  476.  
  477. routeThe path, as defined in Section 5, from A to B at a given time.
  478.  
  479. hop count of a route
  480.      The value 'n' of the route path.
  481.      }
  482.  
  483.      Note that we make no a priori list of just what A-frame concepts
  484.      will emerge in these specifications, but we do encourage their use
  485.      and urge that they be carefully specified so that, as our set of
  486.      metrics develops, so will a specified set of A-frame concepts
  487.      technically consistent with each other and consonant with the
  488.      common understanding of those concepts within the general Internet
  489.      community.
  490.  
  491.      These A-frame concepts will be intended to abstract from actual
  492.      Internet components in such a way that:
  493.  
  494.  +    the essential function of the component is retained,
  495.  +    properties of the component relevant to the metrics we aim to
  496.       create are retained,
  497.  +    a subset of these component properties are potentially defined as
  498.       analytical metrics, and
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Paxson, et. al.              Informational                      [Page 9]
  507.  
  508. RFC 2330          Framework for IP Performance Metrics          May 1998
  509.  
  510.  
  511.  +    those properties of actual Internet components not relevant to
  512.       defining the metrics we aim to create are dropped.
  513.  
  514.    For example, when considering a router in the context of packet
  515.    forwarding, we might model the router as a component that receives
  516.    packets on an input link, queues them on a FIFO packet queue of
  517.    finite size, employs tail-drop when the packet queue is full, and
  518.    forwards them on an output link.  The transmission speed (in
  519.    bits/second) of the input and output links, the latency in the router
  520.    (in seconds), and the maximum size of the packet queue (in bits) are
  521.    relevant analytical metrics.
  522.  
  523.    In some cases, such analytical metrics used in relation to a router
  524.    will be very closely related to specific metrics of the performance
  525.    of Internet paths.  For example, an obvious formula (L + P/B)
  526.    involving the latency in the router (L), the packet size (in bits)
  527.    (P), and the transmission speed of the output link (B) might closely
  528.    approximate the increase in packet delay due to the insertion of a
  529.    given router along a path.
  530.  
  531.    We stress, however, that well-chosen and well-specified A-frame
  532.    concepts and their analytical metrics will support more general
  533.    metric creation efforts in less obvious ways.
  534.  
  535.    {Comment: for example, when considering the flow capacity of a path,
  536.    it may be of real value to be able to model each of the routers along
  537.    the path as packet forwarders as above.  Techniques for estimating
  538.    the flow capacity of a path might use the maximum packet queue size
  539.    as a parameter in decidedly non-obvious ways.  For example, as the
  540.    maximum queue size increases, so will the ability of the router to
  541.    continuously move traffic along an output link despite fluctuations
  542.    in traffic from an input link.  Estimating this increase, however,
  543.    remains a research topic.}
  544.  
  545.    Note that, when we specify A-frame concepts and analytical metrics,
  546.    we will inevitably make simplifying assumptions.  The key role of
  547.    these concepts is to abstract the properties of the Internet
  548.    components relevant to given metrics.  Judgement is required to avoid
  549.    making assumptions that bias the modeling and metric effort toward
  550.    one kind of design.
  551.  
  552.    {Comment: for example, routers might not use tail-drop, even though
  553.    tail-drop might be easier to model analytically.}
  554.  
  555.    Finally, note that different elements of the A-frame might well make
  556.    different simplifying assumptions.  For example, the abstraction of a
  557.    router used to further the definition of path delay might treat the
  558.    router's packet queue as a single FIFO queue, but the abstraction of
  559.  
  560.  
  561.  
  562. Paxson, et. al.              Informational                     [Page 10]
  563.  
  564. RFC 2330          Framework for IP Performance Metrics          May 1998
  565.  
  566.  
  567.    a router used to further the definition of the handling of an RSVP-
  568.    enabled packet might treat the router's packet queue as supporting
  569.    bounded delay -- a contradictory assumption.  This is not to say that
  570.    we make contradictory assumptions at the same time, but that two
  571.    different parts of our work might refine the simpler base concept in
  572.    two divergent ways for different purposes.
  573.  
  574.    {Comment: in more mathematical terms, we would say that the A-frame
  575.    taken as a whole need not be consistent; but the set of particular
  576.    A-frame elements used to define a particular metric must be.}
  577.  
  578.  
  579. 8. Empirically Specified Metrics
  580.  
  581.    There are useful performance and reliability metrics that do not fit
  582.    so neatly into the A-frame, usually because the A-frame lacks the
  583.    detail or power for dealing with them.  For example, "the best flow
  584.    capacity achievable along a path using an RFC-2001-compliant TCP"
  585.    would be good to be able to measure, but we have no analytical
  586.    framework of sufficient richness to allow us to cast that flow
  587.    capacity as an analytical metric.
  588.  
  589.    These notions can still be well specified by instead describing a
  590.    reference methodology for measuring them.
  591.  
  592.    Such a metric will be called an 'empirically specified metric', or
  593.    more simply, an empirical metric.
  594.  
  595.    Such empirical metrics should have three properties:
  596.  
  597.  +    we should have a clear definition for each in terms of Internet
  598.       components,
  599.  +    we should have at least one effective means to measure them, and
  600.  +    to the extent possible, we should have an (necessarily incomplete)
  601.       understanding of the metric in terms of the A-frame so that we can
  602.       use our measurements to reason about the performance and
  603.       reliability of A-frame components and of aggregations of A-frame
  604.       components.
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618. Paxson, et. al.              Informational                     [Page 11]
  619.  
  620. RFC 2330          Framework for IP Performance Metrics          May 1998
  621.  
  622.  
  623. 9. Two Forms of Composition
  624.  
  625.  
  626. 9.1. Spatial Composition of Metrics
  627.  
  628.    In some cases, it may be realistic and useful to define metrics in
  629.    such a fashion that they exhibit spatial composition.
  630.  
  631.    By spatial composition, we mean a characteristic of some path
  632.    metrics, in which the metric as applied to a (complete) path can also
  633.    be defined for various subpaths, and in which the appropriate A-frame
  634.    concepts for the metric suggest useful relationships between the
  635.    metric applied to these various subpaths (including the complete
  636.    path, the various cloud subpaths of a given path digest, and even
  637.    single routers along the path).  The effectiveness of spatial
  638.    composition depends:
  639.  
  640.  +    on the usefulness in analysis of these relationships as applied to
  641.       the relevant A-frame components, and
  642.  +    on the practical use of the corresponding relationships as applied
  643.       to metrics and to measurement methodologies.
  644.  
  645.    {Comment: for example, consider some metric for delay of a 100-byte
  646.    packet across a path P, and consider further a path digest <h0, e1,
  647.    C1, ..., en, hn> of P.  The definition of such a metric might include
  648.    a conjecture that the delay across P is very nearly the sum of the
  649.    corresponding metric across the exchanges (ei) and clouds (Ci) of the
  650.    given path digest.  The definition would further include a note on
  651.    how a corresponding relation applies to relevant A-frame components,
  652.    both for the path P and for the exchanges and clouds of the path
  653.    digest.}
  654.  
  655.    When the definition of a metric includes a conjecture that the metric
  656.    across the path is related to the metric across the subpaths of the
  657.    path, that conjecture constitutes a claim that the metric exhibits
  658.    spatial composition.  The definition should then include:
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Paxson, et. al.              Informational                     [Page 12]
  675.  
  676. RFC 2330          Framework for IP Performance Metrics          May 1998
  677.  
  678.  
  679.  +    the specific conjecture applied to the metric,
  680.  +    a justification of the practical utility of the composition in
  681.       terms of making accurate measurements of the metric on the path,
  682.  +    a justification of the usefulness of the composition in terms of
  683.       making analysis of the path using A-frame concepts more effective,
  684.       and
  685.  +    an analysis of how the conjecture could be incorrect.
  686.  
  687.  
  688. 9.2. Temporal Composition of Formal Models and Empirical Metrics
  689.  
  690.    In some cases, it may be realistic and useful to define metrics in
  691.    such a fashion that they exhibit temporal composition.
  692.  
  693.    By temporal composition, we mean a characteristic of some path
  694.    metric, in which the metric as applied to a path at a given time T is
  695.    also defined for various times t0 < t1 < ... < tn < T, and in which
  696.    the appropriate A-frame concepts for the metric suggests useful
  697.    relationships between the metric applied at times t0, ..., tn and the
  698.    metric applied at time T.  The effectiveness of temporal composition
  699.    depends:
  700.  
  701.  +    on the usefulness in analysis of these relationships as applied to
  702.       the relevant A-frame components, and
  703.  +    on the practical use of the corresponding relationships as applied
  704.       to metrics and to measurement methodologies.
  705.  
  706.    {Comment: for example, consider a  metric for the expected flow
  707.    capacity across a path P during the five-minute period surrounding
  708.    the time T, and suppose further that we have the corresponding values
  709.    for each of the four previous five-minute periods t0, t1, t2, and t3.
  710.    The definition of such a metric might include a conjecture that the
  711.    flow capacity at time T can be estimated from a certain kind of
  712.    extrapolation from the values of t0, ..., t3.  The definition would
  713.    further include a note on how a corresponding relation applies to
  714.    relevant A-frame components.
  715.  
  716.    Note: any (spatial or temporal) compositions involving flow capacity
  717.    are likely to be subtle, and temporal compositions are generally more
  718.    subtle than spatial compositions, so the reader should understand
  719.    that the foregoing example is intentionally naive.}
  720.  
  721.    When the definition of a metric includes a conjecture that the metric
  722.    across the path at a given time T is related to the metric across the
  723.    path for a set of other times, that conjecture constitutes a claim
  724.    that the metric exhibits temporal composition.  The definition should
  725.    then include:
  726.  
  727.  
  728.  
  729.  
  730. Paxson, et. al.              Informational                     [Page 13]
  731.  
  732. RFC 2330          Framework for IP Performance Metrics          May 1998
  733.  
  734.  
  735.  +    the specific conjecture applied to the metric,
  736.  +    a justification of the practical utility of the composition in
  737.       terms of making accurate measurements of the metric on the path,
  738.       and
  739.  +    a justification of the usefulness of the composition in terms of
  740.       making analysis of the path using A-frame concepts more effective.
  741.  
  742.  
  743. 10. Issues related to Time
  744.  
  745.  
  746. 10.1. Clock Issues
  747.  
  748.    Measurements of time lie at the heart of many Internet metrics.
  749.    Because of this, it will often be crucial when designing a
  750.    methodology for measuring a metric to understand the different types
  751.    of errors and uncertainties introduced by imperfect clocks.  In this
  752.    section we define terminology for discussing the characteristics of
  753.    clocks and touch upon related measurement issues which need to be
  754.    addressed by any sound methodology.
  755.  
  756.    The Network Time Protocol (NTP; RFC 1305) defines a nomenclature for
  757.    discussing clock characteristics, which we will also use when
  758.    appropriate [Mi92].  The main goal of NTP is to provide accurate
  759.    timekeeping over fairly long time scales, such as minutes to days,
  760.    while for measurement purposes often what is more important is
  761.    short-term accuracy, between the beginning of the measurement and the
  762.    end, or over the course of gathering a body of measurements (a
  763.    sample).  This difference in goals sometimes leads to different
  764.    definitions of terminology as well, as discussed below.
  765.  
  766.    To begin, we define a clock's "offset" at a particular moment as the
  767.    difference between the time reported by the clock and the "true" time
  768.    as defined by UTC.  If the clock reports a time Tc and the true time
  769.    is Tt, then the clock's offset is Tc - Tt.
  770.  
  771.    We will refer to a clock as "accurate" at a particular moment if the
  772.    clock's offset is zero, and more generally a clock's "accuracy" is
  773.    how close the absolute value of the offset is to zero.  For NTP,
  774.    accuracy also includes a notion of the frequency of the clock; for
  775.    our purposes, we instead incorporate this notion into that of "skew",
  776.    because we define accuracy in terms of a single moment in time rather
  777.    than over an interval of time.
  778.  
  779.    A clock's "skew" at a particular moment is the frequency difference
  780.    (first derivative of its offset with respect to true time) between
  781.    the clock and true time.
  782.  
  783.  
  784.  
  785.  
  786. Paxson, et. al.              Informational                     [Page 14]
  787.  
  788. RFC 2330          Framework for IP Performance Metrics          May 1998
  789.  
  790.  
  791.    As noted in RFC 1305, real clocks exhibit some variation in skew.
  792.    That is, the second derivative of the clock's offset with respect to
  793.    true time is generally non-zero.  In keeping with RFC 1305, we define
  794.    this quantity as the clock's "drift".
  795.  
  796.    A clock's "resolution" is the smallest unit by which the clock's time
  797.    is updated.  It gives a lower bound on the clock's uncertainty.
  798.    (Note that clocks can have very fine resolutions and yet be wildly
  799.    inaccurate.)  Resolution is defined in terms of seconds.  However,
  800.    resolution is relative to the clock's reported time and not to true
  801.    time, so for example a resolution of 10 ms only means that the clock
  802.    updates its notion of time in 0.01 second increments, not that this
  803.    is the true amount of time between updates.
  804.  
  805.    {Comment: Systems differ on how an application interface to the clock
  806.    reports the time on subsequent calls during which the clock has not
  807.    advanced.  Some systems simply return the same unchanged time as
  808.    given for previous calls.  Others may add a small increment to the
  809.    reported time to maintain monotone-increasing timestamps.  For
  810.    systems that do the latter, we do *not* consider these small
  811.    increments when defining the clock's resolution.  They are instead an
  812.    impediment to assessing the clock's resolution, since a natural
  813.    method for doing so is to repeatedly query the clock to determine the
  814.    smallest non-zero difference in reported times.}
  815.  
  816.    It is expected that a clock's resolution changes only rarely (for
  817.    example, due to a hardware upgrade).
  818.  
  819.    There are a number of interesting metrics for which some natural
  820.    measurement methodologies involve comparing times reported by two
  821.    different clocks.  An example is one-way packet delay [AK97].  Here,
  822.    the time required for a packet to travel through the network is
  823.    measured by comparing the time reported by a clock at one end of the
  824.    packet's path, corresponding to when the packet first entered the
  825.    network, with the time reported by a clock at the other end of the
  826.    path, corresponding to when the packet finished traversing the
  827.    network.
  828.  
  829.    We are thus also interested in terminology for describing how two
  830.    clocks C1 and C2 compare.  To do so, we introduce terms related to
  831.    those above in which the notion of "true time" is replaced by the
  832.    time as reported by clock C1.  For example, clock C2's offset
  833.    relative to C1 at a particular moment is Tc2 - Tc1, the instantaneous
  834.    difference in time reported by C2 and C1.  To disambiguate between
  835.    the use of the terms to compare two clocks versus the use of the
  836.    terms to compare to true time, we will in the former case use the
  837.    phrase "relative".  So the offset defined earlier in this paragraph
  838.    is the "relative offset" between C2 and C1.
  839.  
  840.  
  841.  
  842. Paxson, et. al.              Informational                     [Page 15]
  843.  
  844. RFC 2330          Framework for IP Performance Metrics          May 1998
  845.  
  846.  
  847.    When comparing clocks, the analog of "resolution" is not "relative
  848.    resolution", but instead "joint resolution", which is the sum of the
  849.    resolutions of C1 and C2.  The joint resolution then indicates a
  850.    conservative lower bound on the accuracy of any time intervals
  851.    computed by subtracting timestamps generated by one clock from those
  852.    generated by the other.
  853.  
  854.    If two clocks are "accurate" with respect to one another (their
  855.    relative offset is zero), we will refer to the pair of clocks as
  856.    "synchronized".  Note that clocks can be highly synchronized yet
  857.    arbitrarily inaccurate in terms of how well they tell true time.
  858.    This point is important because for many Internet measurements,
  859.    synchronization between two clocks is more important than the
  860.    accuracy of the clocks.  The is somewhat true of skew, too: as long
  861.    as the absolute skew is not too great, then minimal relative skew is
  862.    more important, as it can induce systematic trends in packet transit
  863.    times measured by comparing timestamps produced by the two clocks.
  864.  
  865.    These distinctions arise because for Internet measurement what is
  866.    often most important are differences in time as computed by comparing
  867.    the output of two clocks.  The process of computing the difference
  868.    removes any error due to clock inaccuracies with respect to true
  869.    time; but it is crucial that the differences themselves accurately
  870.    reflect differences in true time.
  871.  
  872.    Measurement methodologies will often begin with the step of assuring
  873.    that two clocks are synchronized and have minimal skew and drift.
  874.    {Comment: An effective way to assure these conditions (and also clock
  875.    accuracy) is by using clocks that derive their notion of time from an
  876.    external source, rather than only the host computer's clock.  (These
  877.    latter are often subject to large errors.) It is further preferable
  878.    that the clocks directly derive their time, for example by having
  879.    immediate access to a GPS (Global Positioning System) unit.}
  880.  
  881.    Two important concerns arise if the clocks indirectly derive their
  882.    time using a network time synchronization protocol such as NTP:
  883.  
  884.  +    First, NTP's accuracy depends in part on the properties
  885.       (particularly delay) of the Internet paths used by the NTP peers,
  886.       and these might be exactly the properties that we wish to measure,
  887.       so it would be unsound to use NTP to calibrate such measurements.
  888.  +    Second, NTP focuses on clock accuracy, which can come at the
  889.       expense of short-term clock skew and drift.  For example, when a
  890.       host's clock is indirectly synchronized to a time source, if the
  891.       synchronization intervals occur infrequently, then the host will
  892.       sometimes be faced with the problem of how to adjust its current,
  893.       incorrect time, Ti, with a considerably different, more accurate
  894.       time it has just learned, Ta.  Two general ways in which this is
  895.  
  896.  
  897.  
  898. Paxson, et. al.              Informational                     [Page 16]
  899.  
  900. RFC 2330          Framework for IP Performance Metrics          May 1998
  901.  
  902.  
  903.       done are to either immediately set the current time to Ta, or to
  904.       adjust the local clock's update frequency (hence, its skew) so
  905.       that at some point in the future the local time Ti' will agree
  906.       with the more accurate time Ta'.  The first mechanism introduces
  907.       discontinuities and can also violate common assumptions that
  908.       timestamps are monotone increasing.  If the host's clock is set
  909.       backward in time, sometimes this can be easily detected.  If the
  910.       clock is set forward in time, this can be harder to detect.  The
  911.       skew induced by the second mechanism can lead to considerable
  912.       inaccuracies when computing differences in time, as discussed
  913.       above.
  914.  
  915.    To illustrate why skew is a crucial concern, consider samples of
  916.    one-way delays between two Internet hosts made at one minute
  917.    intervals.  The true transmission delay between the hosts might
  918.    plausibly be on the order of 50 ms for a transcontinental path.  If
  919.    the skew between the two clocks is 0.01%, that is, 1 part in 10,000,
  920.    then after 10 minutes of observation the error introduced into the
  921.    measurement is 60 ms.  Unless corrected, this error is enough to
  922.    completely wipe out any accuracy in the transmission delay
  923.    measurement.  Finally, we note that assessing skew errors between
  924.    unsynchronized network clocks is an open research area.  (See [Pa97]
  925.    for a discussion of detecting and compensating for these sorts of
  926.    errors.) This shortcoming makes use of a solid, independent clock
  927.    source such as GPS especially desirable.
  928.  
  929.  
  930. 10.2. The Notion of "Wire Time"
  931.  
  932.    Internet measurement is often complicated by the use of Internet
  933.    hosts themselves to perform the measurement.  These hosts can
  934.    introduce delays, bottlenecks, and the like that are due to hardware
  935.    or operating system effects and have nothing to do with the network
  936.    behavior we would like to measure.  This problem is particularly
  937.    acute when timestamping of network events occurs at the application
  938.    level.
  939.  
  940.    In order to provide a general way of talking about these effects, we
  941.    introduce two notions of "wire time".  These notions are only defined
  942.    in terms of an Internet host H observing an Internet link L at a
  943.    particular location:
  944.  
  945.  +    For a given packet P, the 'wire arrival time' of P at H on L is
  946.       the first time T at which any bit of P has appeared at H's
  947.       observational position on L.
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Paxson, et. al.              Informational                     [Page 17]
  955.  
  956. RFC 2330          Framework for IP Performance Metrics          May 1998
  957.  
  958.  
  959.  +    For a given packet P, the 'wire exit time' of P at H on L is the
  960.       first time T at which all the bits of P have appeared at H's
  961.       observational position on L.
  962.  
  963.    Note that intrinsic to the definition is the notion of where on the
  964.    link we are observing.  This distinction is important because for
  965.    large-latency links, we may obtain very different times depending on
  966.    exactly where we are observing the link.  We could allow the
  967.    observational position to be an arbitrary location along the link;
  968.    however, we define it to be in terms of an Internet host because we
  969.    anticipate in practice that, for IPPM metrics, all such timing will
  970.    be constrained to be performed by Internet hosts, rather than
  971.    specialized hardware devices that might be able to monitor a link at
  972.    locations where a host cannot.  This definition also takes care of
  973.    the problem of links that are comprised of multiple physical
  974.    channels.  Because these multiple channels are not visible at the IP
  975.    layer, they cannot be individually observed in terms of the above
  976.    definitions.
  977.  
  978.    It is possible, though one hopes uncommon, that a packet P might make
  979.    multiple trips over a particular link L, due to a forwarding loop.
  980.    These trips might even overlap, depending on the link technology.
  981.    Whenever this occurs, we define a separate wire time associated with
  982.    each instance of P seen at H's position on the link.  This definition
  983.    is worth making because it serves as a reminder that notions like
  984.    *the* unique time a packet passes a point in the Internet are
  985.    inherently slippery.
  986.  
  987.    The term wire time has historically been used to loosely denote the
  988.    time at which a packet appeared on a link, without exactly specifying
  989.    whether this refers to the first bit, the last bit, or some other
  990.    consideration.  This informal definition is generally already very
  991.    useful, as it is usually used to make a distinction between when the
  992.    packet's propagation delays begin and cease to be due to the network
  993.    rather than the endpoint hosts.
  994.  
  995.    When appropriate, metrics should be defined in terms of wire times
  996.    rather than host endpoint times, so that the metric's definition
  997.    highlights the issue of separating delays due to the host from those
  998.    due to the network.
  999.  
  1000.    We note that one potential difficulty when dealing with wire times
  1001.    concerns IP fragments.  It may be the case that, due to
  1002.    fragmentation, only a portion of a particular packet passes by H's
  1003.    location.  Such fragments are themselves legitimate packets and have
  1004.    well-defined wire times associated with them; but the larger IP
  1005.    packet corresponding to their aggregate may not.
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Paxson, et. al.              Informational                     [Page 18]
  1011.  
  1012. RFC 2330          Framework for IP Performance Metrics          May 1998
  1013.  
  1014.  
  1015.    We also note that these notions have not, to our knowledge, been
  1016.    previously defined in exact terms for Internet traffic.
  1017.    Consequently, we may find with experience that these definitions
  1018.    require some adjustment in the future.
  1019.  
  1020.    {Comment: It can sometimes be difficult to measure wire times.  One
  1021.    technique is to use a packet filter to monitor traffic on a link.
  1022.    The architecture of these filters often attempts to associate with
  1023.    each packet a timestamp as close to the wire time as possible.  We
  1024.    note however that one common source of error is to run the packet
  1025.    filter on one of the endpoint hosts.  In this case, it has been
  1026.    observed that some packet filters receive for some packets timestamps
  1027.    corresponding to when the packet was *scheduled* to be injected into
  1028.    the network, rather than when it actually was *sent* out onto the
  1029.    network (wire time).  There can be a substantial difference between
  1030.    these two times.  A technique for dealing with this problem is to run
  1031.    the packet filter on a separate host that passively monitors the
  1032.    given link.  This can be problematic however for some link
  1033.    technologies.  See [Pa97] for a discussion of the sorts of errors
  1034.    packet filters can exhibit.  Finally, we note that packet filters
  1035.    will often only capture the first fragment of a fragmented IP packet,
  1036.    due to the use of filtering on fields in the IP and transport
  1037.    protocol headers.  As we generally desire our measurement
  1038.    methodologies to avoid the complexity of creating fragmented traffic,
  1039.    one strategy for dealing with their presence as detected by a packet
  1040.    filter is to flag that the measured traffic has an unusual form and
  1041.    abandon further analysis of the packet timing.}
  1042.  
  1043.  
  1044. 11. Singletons, Samples, and Statistics
  1045.  
  1046.    With experience we have found it useful to introduce a separation
  1047.    between three distinct -- yet related -- notions:
  1048.  
  1049.  +    By a 'singleton' metric, we refer to metrics that are, in a sense,
  1050.       atomic.  For example, a single instance of "bulk throughput
  1051.       capacity" from one host to another might be defined as a singleton
  1052.       metric, even though the instance involves measuring the timing of
  1053.       a number of Internet packets.
  1054.  +    By a 'sample' metric, we refer to metrics derived from a given
  1055.       singleton metric by taking a number of distinct instances
  1056.       together.  For example, we might define a sample metric of one-way
  1057.       delays from one host to another as an hour's worth of
  1058.       measurements, each made at Poisson intervals with a mean spacing
  1059.       of one second.
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Paxson, et. al.              Informational                     [Page 19]
  1067.  
  1068. RFC 2330          Framework for IP Performance Metrics          May 1998
  1069.  
  1070.  
  1071.  +    By a 'statistical' metric, we refer to metrics derived from a
  1072.       given sample metric by computing some statistic of the values
  1073.       defined by the singleton metric on the sample.  For example, the
  1074.       mean of all the one-way delay values on the sample given above
  1075.       might be defined as a statistical metric.
  1076.  
  1077.    By applying these notions of singleton, sample, and statistic in a
  1078.    consistent way, we will be able to reuse lessons learned about how to
  1079.    define samples and statistics on various metrics.  The orthogonality
  1080.    among these three notions will thus make all our work more effective
  1081.    and more intelligible by the community.
  1082.  
  1083.    In the remainder of this section, we will cover some topics in
  1084.    sampling and statistics that we believe will be important to a
  1085.    variety of metric definitions and measurement efforts.
  1086.  
  1087.  
  1088. 11.1. Methods of Collecting Samples
  1089.  
  1090.    The main reason for collecting samples is to see what sort of
  1091.    variations and consistencies are present in the metric being
  1092.    measured.  These variations might be with respect to different points
  1093.    in the Internet, or different measurement times.  When assessing
  1094.    variations based on a sample, one generally makes an assumption that
  1095.    the sample is "unbiased", meaning that the process of collecting the
  1096.    measurements in the sample did not skew the sample so that it no
  1097.    longer accurately reflects the metric's variations and consistencies.
  1098.  
  1099.    One common way of collecting samples is to make measurements
  1100.    separated by fixed amounts of time: periodic sampling.  Periodic
  1101.    sampling is particularly attractive because of its simplicity, but it
  1102.    suffers from two potential problems:
  1103.  
  1104.  +    If the metric being measured itself exhibits periodic behavior,
  1105.       then there is a possibility that the sampling will observe only
  1106.       part of the periodic behavior if the periods happen to agree
  1107.       (either directly, or if one is a multiple of the other).  Related
  1108.       to this problem is the notion that periodic sampling can be easily
  1109.       anticipated.  Predictable sampling is susceptible to manipulation
  1110.       if there are mechanisms by which a network component's behavior
  1111.       can be temporarily changed such that the sampling only sees the
  1112.       modified behavior.
  1113.  +    The act of measurement can perturb what is being measured (for
  1114.       example, injecting measurement traffic into a network alters the
  1115.       congestion level of the network), and repeated periodic
  1116.       perturbations can drive a network into a state of synchronization
  1117.       (cf. [FJ94]), greatly magnifying what might individually be minor
  1118.       effects.
  1119.  
  1120.  
  1121.  
  1122. Paxson, et. al.              Informational                     [Page 20]
  1123.  
  1124. RFC 2330          Framework for IP Performance Metrics          May 1998
  1125.  
  1126.  
  1127.    A more sound approach is based on "random additive sampling": samples
  1128.    are separated by independent, randomly generated intervals that have
  1129.    a common statistical distribution G(t) [BM92].  The quality of this
  1130.    sampling depends on the distribution G(t).  For example, if G(t)
  1131.    generates a constant value g with probability one, then the sampling
  1132.    reduces to periodic sampling with a period of g.
  1133.  
  1134.    Random additive sampling gains significant advantages.  In general,
  1135.    it avoids synchronization effects and yields an unbiased estimate of
  1136.    the property being sampled.  The only significant drawbacks with it
  1137.    are:
  1138.  
  1139.  +    it complicates frequency-domain analysis, because the samples do
  1140.       not occur at fixed intervals such as assumed by Fourier-transform
  1141.       techniques; and
  1142.  +    unless G(t) is the exponential distribution (see below), sampling
  1143.       still remains somewhat predictable, as discussed for periodic
  1144.       sampling above.
  1145.  
  1146.  
  1147. 11.1.1. Poisson Sampling
  1148.  
  1149.    It can be proved that if G(t) is an exponential distribution with
  1150.    rate lambda, that is
  1151.  
  1152.        G(t) = 1 - exp(-lambda * t)
  1153.  
  1154.    then the arrival of new samples *cannot* be predicted (and, again,
  1155.    the sampling is unbiased).  Furthermore, the sampling is
  1156.    asymptotically unbiased even if the act of sampling affects the
  1157.    network's state.  Such sampling is referred to as "Poisson sampling".
  1158.    It is not prone to inducing synchronization, it can be used to
  1159.    accurately collect measurements of periodic behavior, and it is not
  1160.    prone to manipulation by anticipating when new samples will occur.
  1161.  
  1162.    Because of these valuable properties, we in general prefer that
  1163.    samples of Internet measurements are gathered using Poisson sampling.
  1164.    {Comment: We note, however, that there may be circumstances that
  1165.    favor use of a different G(t).  For example, the exponential
  1166.    distribution is unbounded, so its use will on occasion generate
  1167.    lengthy spaces between sampling times.  We might instead desire to
  1168.    bound the longest such interval to a maximum value dT, to speed the
  1169.    convergence of the estimation derived from the sampling.  This could
  1170.    be done by using
  1171.  
  1172.        G(t) = Unif(0, dT)
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Paxson, et. al.              Informational                     [Page 21]
  1179.  
  1180. RFC 2330          Framework for IP Performance Metrics          May 1998
  1181.  
  1182.  
  1183.    that is, the uniform distribution between 0 and dT.  This sampling,
  1184.    of course, becomes highly predictable if an interval of nearly length
  1185.    dT has elapsed without a sample occurring.}
  1186.  
  1187.    In its purest form, Poisson sampling is done by generating
  1188.    independent, exponentially distributed intervals and gathering a
  1189.    single measurement after each interval has elapsed.  It can be shown
  1190.    that if starting at time T one performs Poisson sampling over an
  1191.    interval dT, during which a total of N measurements happen to be
  1192.    made, then those measurements will be uniformly distributed over the
  1193.    interval [T, T+dT].  So another way of conducting Poisson sampling is
  1194.    to pick dT and N and generate N random sampling times uniformly over
  1195.    the interval [T, T+dT].  The two approaches are equivalent, except if
  1196.    N and dT are externally known.  In that case, the property of not
  1197.    being able to predict measurement times is weakened (the other
  1198.    properties still hold).  The N/dT approach has an advantage that
  1199.    dealing with fixed values of N and dT can be simpler than dealing
  1200.    with a fixed lambda but variable numbers of measurements over
  1201.    variably-sized intervals.
  1202.  
  1203.  
  1204. 11.1.2. Geometric Sampling
  1205.  
  1206.    Closely related to Poisson sampling is "geometric sampling", in which
  1207.    external events are measured with a fixed probability p.  For
  1208.    example, one might capture all the packets over a link but only
  1209.    record the packet to a trace file if a randomly generated number
  1210.    uniformly distributed between 0 and 1 is less than a given p.
  1211.    Geometric sampling has the same properties of being unbiased and not
  1212.    predictable in advance as Poisson sampling, so if it fits a
  1213.    particular Internet measurement task, it too is sound.  See [CPB93]
  1214.    for more discussion.
  1215.  
  1216.  
  1217. 11.1.3. Generating Poisson Sampling Intervals
  1218.  
  1219.    To generate Poisson sampling intervals, one first determines the rate
  1220.    lambda at which the singleton measurements will on average be made
  1221.    (e.g., for an average sampling interval of 30 seconds, we have lambda
  1222.    = 1/30, if the units of time are seconds).  One then generates a
  1223.    series of exponentially-distributed (pseudo) random numbers E1, E2,
  1224.    ..., En.  The first measurement is made at time E1, the next at time
  1225.    E1+E2, and so on.
  1226.  
  1227.    One technique for generating exponentially-distributed (pseudo)
  1228.    random numbers is based on the ability to generate U1, U2, ..., Un,
  1229.    (pseudo) random numbers that are uniformly distributed between 0 and
  1230.    1.  Many computers provide libraries that can do this.  Given such
  1231.  
  1232.  
  1233.  
  1234. Paxson, et. al.              Informational                     [Page 22]
  1235.  
  1236. RFC 2330          Framework for IP Performance Metrics          May 1998
  1237.  
  1238.  
  1239.    Ui, to generate Ei one uses:
  1240.  
  1241.        Ei = -log(Ui) / lambda
  1242.  
  1243.    where log(Ui) is the natural logarithm of Ui.  {Comment: This
  1244.    technique is an instance of the more general "inverse transform"
  1245.    method for generating random numbers with a given distribution.}
  1246.  
  1247.    Implementation details:
  1248.  
  1249.    There are at least three different methods for approximating Poisson
  1250.    sampling, which we describe here as Methods 1 through 3.  Method 1 is
  1251.    the easiest to implement and has the most error, and method 3 is the
  1252.    most difficult to implement and has the least error (potentially
  1253.    none).
  1254.  
  1255.    Method 1 is to proceed as follows:
  1256.  
  1257.    1.  Generate E1 and wait that long.
  1258.    2.  Perform a measurement.
  1259.    3.  Generate E2 and wait that long.
  1260.    4.  Perform a measurement.
  1261.    5.  Generate E3 and wait that long.
  1262.    6.  Perform a measurement ...
  1263.  
  1264.    The problem with this approach is that the "Perform a measurement"
  1265.    steps themselves take time, so the sampling is not done at times E1,
  1266.    E1+E2, etc., but rather at E1, E1+M1+E2, etc., where Mi is the amount
  1267.    of time required for the i'th measurement.  If Mi is very small
  1268.    compared to 1/lambda then the potential error introduced by this
  1269.    technique is likewise small.  As Mi becomes a non-negligible fraction
  1270.    of 1/lambda, the potential error increases.
  1271.  
  1272.    Method 2 attempts to correct this error by taking into account the
  1273.    amount of time required by the measurements (i.e., the Mi's) and
  1274.    adjusting the waiting intervals accordingly:
  1275.  
  1276.    1.  Generate E1 and wait that long.
  1277.    2.  Perform a measurement and measure M1, the time it took to do so.
  1278.    3.  Generate E2 and wait for a time E2-M1.
  1279.    4.  Perform a measurement and measure M2 ..
  1280.  
  1281.    This approach works fine as long as E{i+1} >= Mi.  But if E{i+1} < Mi
  1282.    then it is impossible to wait the proper amount of time.  (Note that
  1283.    this case corresponds to needing to perform two measurements
  1284.    simultaneously.)
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Paxson, et. al.              Informational                     [Page 23]
  1291.  
  1292. RFC 2330          Framework for IP Performance Metrics          May 1998
  1293.  
  1294.  
  1295.    Method 3 is generating a schedule of measurement times E1, E1+E2,
  1296.    etc., and then sticking to it:
  1297.  
  1298.    1.  Generate E1, E2, ..., En.
  1299.    2.  Compute measurement times T1, T2, ..., Tn, as Ti = E1 + ... + Ei.
  1300.    3.  Arrange that at times T1, T2, ..., Tn, a measurement is made.
  1301.  
  1302.    By allowing simultaneous measurements, Method 3 avoids the
  1303.    shortcomings of Methods 1 and 2.  If, however, simultaneous
  1304.    measurements interfere with one another, then Method 3 does not gain
  1305.    any benefit and may actually prove worse than Methods 1 or 2.
  1306.  
  1307.    For Internet phenomena, it is not known to what degree the
  1308.    inaccuracies of these methods are significant.  If the Mi's are much
  1309.    less than 1/lambda, then any of the three should suffice.  If the
  1310.    Mi's are less than 1/lambda but perhaps not greatly less, then Method
  1311.    2 is preferred to Method 1.  If simultaneous measurements do not
  1312.    interfere with one another, then Method 3 is preferred, though it can
  1313.    be considerably harder to implement.
  1314.  
  1315.  
  1316. 11.2. Self-Consistency
  1317.  
  1318.    A fundamental requirement for a sound measurement methodology is that
  1319.    measurement be made using as few unconfirmed assumptions as possible.
  1320.    Experience has painfully shown how easy it is to make an (often
  1321.    implicit) assumption that turns out to be incorrect.  An example is
  1322.    incorporating into a measurement the reading of a clock synchronized
  1323.    to a highly accurate source.  It is easy to assume that the clock is
  1324.    therefore accurate; but due to software bugs, a loss of power in the
  1325.    source, or a loss of communication between the source and the clock,
  1326.    the clock could actually be quite inaccurate.
  1327.  
  1328.    This is not to argue that one must not make *any* assumptions when
  1329.    measuring, but rather that, to the extent which is practical,
  1330.    assumptions should be tested.  One powerful way for doing so involves
  1331.    checking for self-consistency.  Such checking applies both to the
  1332.    observed value(s) of the measurement *and the values used by the
  1333.    measurement process itself*.  A simple example of the former is that
  1334.    when computing a round trip time, one should check to see if it is
  1335.    negative.  Since negative time intervals are non-physical, if it ever
  1336.    is negative that finding immediately flags an error.  *These sorts of
  1337.    errors should then be investigated!* It is crucial to determine where
  1338.    the error lies, because only by doing so diligently can we build up
  1339.    faith in a methodology's fundamental soundness.  For example, it
  1340.    could be that the round trip time is negative because during the
  1341.    measurement the clock was set backward in the process of
  1342.    synchronizing it with another source.  But it could also be that the
  1343.  
  1344.  
  1345.  
  1346. Paxson, et. al.              Informational                     [Page 24]
  1347.  
  1348. RFC 2330          Framework for IP Performance Metrics          May 1998
  1349.  
  1350.  
  1351.    measurement program accesses uninitialized memory in one of its
  1352.    computations and, only very rarely, that leads to a bogus
  1353.    computation.  This second error is more serious, if the same program
  1354.    is used by others to perform the same measurement, since then they
  1355.    too will suffer from incorrect results.  Furthermore, once uncovered
  1356.    it can be completely fixed.
  1357.  
  1358.    A more subtle example of testing for self-consistency comes from
  1359.    gathering samples of one-way Internet delays.  If one has a large
  1360.    sample of such delays, it may well be highly telling to, for example,
  1361.    fit a line to the pairs of (time of measurement, measured delay), to
  1362.    see if the resulting line has a clearly non-zero slope.  If so, a
  1363.    possible interpretation is that one of the clocks used in the
  1364.    measurements is skewed relative to the other.  Another interpretation
  1365.    is that the slope is actually due to genuine network effects.
  1366.    Determining which is indeed the case will often be highly
  1367.    illuminating.  (See [Pa97] for a discussion of distinguishing between
  1368.    relative clock skew and genuine network effects.) Furthermore, if
  1369.    making this check is part of the methodology, then a finding that the
  1370.    long-term slope is very near zero is positive evidence that the
  1371.    measurements are probably not biased by a difference in skew.
  1372.  
  1373.    A final example illustrates checking the measurement process itself
  1374.    for self-consistency.  Above we outline Poisson sampling techniques,
  1375.    based on generating exponentially-distributed intervals.  A sound
  1376.    measurement methodology would include testing the generated intervals
  1377.    to see whether they are indeed exponentially distributed (and also to
  1378.    see if they suffer from correlation).  In the appendix we discuss and
  1379.    give C code for one such technique, a general-purpose, well-regarded
  1380.    goodness-of-fit test called the Anderson-Darling test.
  1381.  
  1382.    Finally, we note that what is truly relevant for Poisson sampling of
  1383.    Internet metrics is often not when the measurements began but the
  1384.    wire times corresponding to the measurement process.  These could
  1385.    well be different, due to complications on the hosts used to perform
  1386.    the measurement.  Thus, even those with complete faith in their
  1387.    pseudo-random number generators and subsequent algorithms are
  1388.    encouraged to consider how they might test the assumptions of each
  1389.    measurement procedure as much as possible.
  1390.  
  1391.  
  1392. 11.3. Defining Statistical Distributions
  1393.  
  1394.    One way of describing a collection of measurements (a sample) is as a
  1395.    statistical distribution -- informally, as percentiles.  There are
  1396.    several slightly different ways of doing so.  In this section we
  1397.    define a standard definition to give uniformity to these
  1398.    descriptions.
  1399.  
  1400.  
  1401.  
  1402. Paxson, et. al.              Informational                     [Page 25]
  1403.  
  1404. RFC 2330          Framework for IP Performance Metrics          May 1998
  1405.  
  1406.  
  1407.    The "empirical distribution function" (EDF) of a set of scalar
  1408.    measurements is a function F(x) which for any x gives the fractional
  1409.    proportion of the total measurements that were <= x.  If x is less
  1410.    than the minimum value observed, then F(x) is 0.  If it is greater or
  1411.    equal to the maximum value observed, then F(x) is 1.
  1412.  
  1413.    For example, given the 6 measurements:
  1414.  
  1415.    -2, 7, 7, 4, 18, -5
  1416.  
  1417.    Then F(-8) = 0, F(-5) = 1/6, F(-5.0001) = 0, F(-4.999) = 1/6, F(7) =
  1418.    5/6, F(18) = 1, F(239) = 1.
  1419.  
  1420.    Note that we can recover the different measured values and how many
  1421.    times each occurred from F(x) -- no information regarding the range
  1422.    in values is lost.  Summarizing measurements using histograms, on the
  1423.    other hand, in general loses information about the different values
  1424.    observed, so the EDF is preferred.
  1425.  
  1426.    Using either the EDF or a histogram, however, we do lose information
  1427.    regarding the order in which the values were observed.  Whether this
  1428.    loss is potentially significant will depend on the metric being
  1429.    measured.
  1430.  
  1431.    We will use the term "percentile" to refer to the smallest value of x
  1432.    for which F(x) >= a given percentage.  So the 50th percentile of the
  1433.    example above is 4, since F(4) = 3/6 = 50%; the 25th percentile is
  1434.    -2, since F(-5) = 1/6 < 25%, and F(-2) = 2/6 >= 25%; the 100th
  1435.    percentile is 18; and the 0th percentile is -infinity, as is the 15th
  1436.    percentile.
  1437.  
  1438.    Care must be taken when using percentiles to summarize a sample,
  1439.    because they can lend an unwarranted appearance of more precision
  1440.    than is really available.  Any such summary must include the sample
  1441.    size N, because any percentile difference finer than 1/N is below the
  1442.    resolution of the sample.
  1443.  
  1444.    See [DS86] for more details regarding EDF's.
  1445.  
  1446.    We close with a note on the common (and important!) notion of median.
  1447.    In statistics, the median of a distribution is defined to be the
  1448.    point X for which the probability of observing a value <= X is equal
  1449.    to the probability of observing a value > X.  When estimating the
  1450.    median of a set of observations, the estimate depends on whether the
  1451.    number of observations, N, is odd or even:
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458. Paxson, et. al.              Informational                     [Page 26]
  1459.  
  1460. RFC 2330          Framework for IP Performance Metrics          May 1998
  1461.  
  1462.  
  1463.  +    If N is odd, then the 50th percentile as defined above is used as
  1464.       the estimated median.
  1465.  +    If N is even, then the estimated median is the average of the
  1466.       central two observations; that is, if the observations are sorted
  1467.       in ascending order and numbered from 1 to N, where N = 2*K, then
  1468.       the estimated median is the average of the (K)'th and (K+1)'th
  1469.       observations.
  1470.  
  1471.    Usually the term "estimated" is dropped from the phrase "estimated
  1472.    median" and this value is simply referred to as the "median".
  1473.  
  1474.  
  1475. 11.4. Testing For Goodness-of-Fit
  1476.  
  1477.    For some forms of measurement calibration we need to test whether a
  1478.    set of numbers is consistent with those numbers having been drawn
  1479.    from a particular distribution.  An example is that to apply a self-
  1480.    consistency check to measurements made using a Poisson process, one
  1481.    test is to see whether the spacing between the sampling times does
  1482.    indeed reflect an exponential distribution; or if the dT/N approach
  1483.    discussed above was used, whether the times are uniformly distributed
  1484.    across [T, dT].
  1485.  
  1486.    {Comment: There are at least three possible sets of values we could
  1487.    test: the scheduled packet transmission times, as determined by use
  1488.    of a pseudo-random number generator; user-level timestamps made just
  1489.    before or after the system call for transmitting the packet; and wire
  1490.    times for the packets as recorded using a packet filter.  All three
  1491.    of these are potentially informative: failures for the scheduled
  1492.    times to match an exponential distribution indicate inaccuracies in
  1493.    the random number generation; failures for the user-level times
  1494.    indicate inaccuracies in the timers used to schedule transmission;
  1495.    and failures for the wire times indicate inaccuracies in actually
  1496.    transmitting the packets, perhaps due to contention for a shared
  1497.    resource.}
  1498.  
  1499.    There are a large number of statistical goodness-of-fit techniques
  1500.    for performing such tests.  See [DS86] for a thorough discussion.
  1501.    That reference recommends the Anderson-Darling EDF test as being a
  1502.    good all-purpose test, as well as one that is especially good at
  1503.    detecting deviations from a given distribution in the lower and upper
  1504.    tails of the EDF.
  1505.  
  1506.    It is important to understand that the nature of goodness-of-fit
  1507.    tests is that one first selects a "significance level", which is the
  1508.    probability that the test will erroneously declare that the EDF of a
  1509.    given set of measurements fails to match a particular distribution
  1510.    when in fact the measurements do indeed reflect that distribution.
  1511.  
  1512.  
  1513.  
  1514. Paxson, et. al.              Informational                     [Page 27]
  1515.  
  1516. RFC 2330          Framework for IP Performance Metrics          May 1998
  1517.  
  1518.  
  1519.    Unless otherwise stated, IPPM goodness-of-fit tests are done using 5%
  1520.    significance.  This means that if the test is applied to 100 samples
  1521.    and 5 of those samples are deemed to have failed the test, then the
  1522.    samples are all consistent with the distribution being tested.  If
  1523.    significantly more of the samples fail the test, then the assumption
  1524.    that the samples are consistent with the distribution being tested
  1525.    must be rejected.  If significantly fewer of the samples fail the
  1526.    test, then the samples have potentially been doctored too well to fit
  1527.    the distribution.  Similarly, some goodness-of-fit tests (including
  1528.    Anderson-Darling) can detect whether it is likely that a given sample
  1529.    was doctored.  We also use a significance of 5% for this case; that
  1530.    is, the test will report that a given honest sample is "too good to
  1531.    be true" 5% of the time, so if the test reports this finding
  1532.    significantly more often than one time out of twenty, it is an
  1533.    indication that something unusual is occurring.
  1534.  
  1535.    The appendix gives sample C code for implementing the Anderson-
  1536.    Darling test, as well as further discussing its use.
  1537.  
  1538.    See [Pa94] for a discussion of goodness-of-fit and closeness-of-fit
  1539.    tests in the context of network measurement.
  1540.  
  1541.  
  1542. 12. Avoiding Stochastic Metrics
  1543.  
  1544.    When defining metrics applying to a path, subpath, cloud, or other
  1545.    network element, we in general do not define them in stochastic terms
  1546.    (probabilities).  We instead prefer a deterministic definition.  So,
  1547.    for example, rather than defining a metric about a "packet loss
  1548.    probability between A and B", we would define a metric about a
  1549.    "packet loss rate between A and B".  (A measurement given by the
  1550.    first definition might be "0.73", and by the second "73 packets out
  1551.    of 100".)
  1552.  
  1553.    We emphasize that the above distinction concerns the *definitions* of
  1554.    *metrics*.  It is not intended to apply to what sort of techniques we
  1555.    might use to analyze the results of measurements.
  1556.  
  1557.    The reason for this distinction is as follows.  When definitions are
  1558.    made in terms of probabilities, there are often hidden assumptions in
  1559.    the definition about a stochastic model of the behavior being
  1560.    measured.  The fundamental goal with avoiding probabilities in our
  1561.    metric definitions is to avoid biasing our definitions by these
  1562.    hidden assumptions.
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Paxson, et. al.              Informational                     [Page 28]
  1571.  
  1572. RFC 2330          Framework for IP Performance Metrics          May 1998
  1573.  
  1574.  
  1575.    For example, an easy hidden assumption to make is that packet loss in
  1576.    a network component due to queueing overflows can be described as
  1577.    something that happens to any given packet with a particular
  1578.    probability.  In today's Internet, however, queueing drops are
  1579.    actually usually *deterministic*, and assuming that they should be
  1580.    described probabilistically can obscure crucial correlations between
  1581.    queueing drops among a set of packets.  So it's better to explicitly
  1582.    note stochastic assumptions, rather than have them sneak into our
  1583.    definitions implicitly.
  1584.  
  1585.    This does *not* mean that we abandon stochastic models for
  1586.    *understanding* network performance! It only means that when defining
  1587.    IP metrics we avoid terms such as "probability" for terms like
  1588.    "proportion" or "rate".  We will still use, for example, random
  1589.    sampling in order to estimate probabilities used by stochastic models
  1590.    related to the IP metrics.  We also do not rule out the possibility
  1591.    of stochastic metrics when they are truly appropriate (for example,
  1592.    perhaps to model transmission errors caused by certain types of line
  1593.    noise).
  1594.  
  1595.  
  1596. 13. Packets of Type P
  1597.  
  1598.    A fundamental property of many Internet metrics is that the value of
  1599.    the metric depends on the type of IP packet(s) used to make the
  1600.    measurement.  Consider an IP-connectivity metric: one obtains
  1601.    different results depending on whether one is interested in
  1602.    connectivity for packets destined for well-known TCP ports or
  1603.    unreserved UDP ports, or those with invalid IP checksums, or those
  1604.    with TTL's of 16, for example.  In some circumstances these
  1605.    distinctions will be highly interesting (for example, in the presence
  1606.    of firewalls, or RSVP reservations).
  1607.  
  1608.    Because of this distinction, we introduce the generic notion of a
  1609.    "packet of type P", where in some contexts P will be explicitly
  1610.    defined (i.e., exactly what type of packet we mean), partially
  1611.    defined (e.g., "with a payload of B octets"), or left generic.  Thus
  1612.    we may talk about generic IP-type-P-connectivity or more specific
  1613.    IP-port-HTTP-connectivity.  Some metrics and methodologies may be
  1614.    fruitfully defined using generic type P definitions which are then
  1615.    made specific when performing actual measurements.
  1616.  
  1617.    Whenever a metric's value depends on the type of the packets involved
  1618.    in the metric, the metric's name will include either a specific type
  1619.    or a phrase such as "type-P".  Thus we will not define an "IP-
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626. Paxson, et. al.              Informational                     [Page 29]
  1627.  
  1628. RFC 2330          Framework for IP Performance Metrics          May 1998
  1629.  
  1630.  
  1631.    connectivity" metric but instead an "IP-type-P-connectivity" metric
  1632.    and/or perhaps an "IP-port-HTTP-connectivity" metric.  This naming
  1633.    convention serves as an important reminder that one must be conscious
  1634.    of the exact type of traffic being measured.
  1635.  
  1636.    A closely related note: it would be very useful to know if a given
  1637.    Internet component treats equally a class C of different types of
  1638.    packets.  If so, then any one of those types of packets can be used
  1639.    for subsequent measurement of the component.  This suggests we devise
  1640.    a metric or suite of metrics that attempt to determine C.
  1641.  
  1642.  
  1643. 14. Internet Addresses vs. Hosts
  1644.  
  1645.    When considering a metric for some path through the Internet, it is
  1646.    often natural to think about it as being for the path from Internet
  1647.    host H1 to host H2.  A definition in these terms, though, can be
  1648.    ambiguous, because Internet hosts can be attached to more than one
  1649.    network.  In this case, the result of the metric will depend on which
  1650.    of these networks is actually used.
  1651.  
  1652.    Because of this ambiguity, usually such definitions should instead be
  1653.    defined in terms of Internet IP addresses.  For the common case of a
  1654.    unidirectional path through the Internet, we will use the term "Src"
  1655.    to denote the IP address of the beginning of the path, and "Dst" to
  1656.    denote the IP address of the end.
  1657.  
  1658.  
  1659. 15. Standard-Formed Packets
  1660.  
  1661.    Unless otherwise stated, all metric definitions that concern IP
  1662.    packets include an implicit assumption that the packet is *standard
  1663.    formed*.  A packet is standard formed if it meets all of the
  1664.    following criteria:
  1665.  
  1666.  +    Its length as given in the IP header corresponds to the size of
  1667.       the IP header plus the size of the payload.
  1668.  +    It includes a valid IP header: the version field is 4 (later, we
  1669.       will expand this to include 6); the header length is >= 5; the
  1670.       checksum is correct.
  1671.  +    It is not an IP fragment.
  1672.  +    The source and destination addresses correspond to the hosts in
  1673.       question.
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682. Paxson, et. al.              Informational                     [Page 30]
  1683.  
  1684. RFC 2330          Framework for IP Performance Metrics          May 1998
  1685.  
  1686.  
  1687.  +    Either the packet possesses sufficient TTL to travel from the
  1688.       source to the destination if the TTL is decremented by one at each
  1689.       hop, or it possesses the maximum TTL of 255.
  1690.  +    It does not contain IP options unless explicitly noted.
  1691.  +    If a transport header is present, it too contains a valid checksum
  1692.       and other valid fields.
  1693.  
  1694.    We further require that if a packet is described as having a "length
  1695.    of B octets", then 0 <= B <= 65535; and if B is the payload length in
  1696.    octets, then B <= (65535-IP header size in octets).
  1697.  
  1698.    So, for example, one might imagine defining an IP connectivity metric
  1699.    as "IP-type-P-connectivity for standard-formed packets with the IP
  1700.    TOS field set to 0", or, more succinctly, "IP-type-P-connectivity
  1701.    with the IP TOS field set to 0", since standard-formed is already
  1702.    implied by convention.
  1703.  
  1704.    A particular type of standard-formed packet often useful to consider
  1705.    is the "minimal IP packet from A to B" - this is an IP packet with
  1706.    the following properties:
  1707.  
  1708.  +    It is standard-formed.
  1709.  +    Its data payload is 0 octets.
  1710.  +    It contains no options.
  1711.  
  1712.    (Note that we do not define its protocol field, as different values
  1713.    may lead to different treatment by the network.)
  1714.  
  1715.    When defining IP metrics we keep in mind that no packet smaller or
  1716.    simpler than this can be transmitted over a correctly operating IP
  1717.    network.
  1718.  
  1719.  
  1720. 16. Acknowledgements
  1721.  
  1722.    The comments of Brian Carpenter, Bill Cerveny, Padma Krishnaswamy
  1723.    Jeff Sedayao and Howard Stanislevic are appreciated.
  1724.  
  1725.  
  1726. 17. Security Considerations
  1727.  
  1728.    This document concerns definitions and concepts related to Internet
  1729.    measurement.  We discuss measurement procedures only in high-level
  1730.    terms, regarding principles that lend themselves to sound
  1731.    measurement.  As such, the topics discussed do not affect the
  1732.    security of the Internet or of applications which run on it.
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738. Paxson, et. al.              Informational                     [Page 31]
  1739.  
  1740. RFC 2330          Framework for IP Performance Metrics          May 1998
  1741.  
  1742.  
  1743.    That said, it should be recognized that conducting Internet
  1744.    measurements can raise both security and privacy concerns.  Active
  1745.    techniques, in which traffic is injected into the network, can be
  1746.    abused for denial-of-service attacks disguised as legitimate
  1747.    measurement activity.  Passive techniques, in which existing traffic
  1748.    is recorded and analyzed, can expose the contents of Internet traffic
  1749.    to unintended recipients.  Consequently, the definition of each
  1750.    metric and methodology must include a corresponding discussion of
  1751.    security considerations.
  1752.  
  1753.  
  1754. 18. Appendix
  1755.  
  1756.    Below we give routines written in C for computing the Anderson-
  1757.    Darling test statistic (A2) for determining whether a set of values
  1758.    is consistent with a given statistical distribution.  Externally, the
  1759.    two main routines of interest are:
  1760.  
  1761.        double exp_A2_known_mean(double x[], int n, double mean)
  1762.        double unif_A2_known_range(double x[], int n,
  1763.                                   double min_val, double max_val)
  1764.  
  1765.    Both take as their first argument, x, the array of n values to be
  1766.    tested.  (Upon return, the elements of x are sorted.)  The remaining
  1767.    parameters characterize the distribution to be used: either the mean
  1768.    (1/lambda), for an exponential distribution, or the lower and upper
  1769.    bounds, for a uniform distribution.  The names of the routines stress
  1770.    that these values must be known in advance, and *not* estimated from
  1771.    the data (for example, by computing its sample mean).  Estimating the
  1772.    parameters from the data *changes* the significance level of the test
  1773.    statistic.  While [DS86] gives alternate significance tables for some
  1774.    instances in which the parameters are estimated from the data, for
  1775.    our purposes we expect that we should indeed know the parameters in
  1776.    advance, since what we will be testing are generally values such as
  1777.    packet sending times that we wish to verify follow a known
  1778.    distribution.
  1779.  
  1780.    Both routines return a significance level, as described earlier. This
  1781.    is a value between 0 and 1.  The correct use of the routines is to
  1782.    pick in advance the threshold for the significance level to test;
  1783.    generally, this will be 0.05, corresponding to 5%, as also described
  1784.    above.  Subsequently, if the routines return a value strictly less
  1785.    than this threshold, then the data are deemed to be inconsistent with
  1786.    the presumed distribution, *subject to an error corresponding to the
  1787.    significance level*.  That is, for a significance level of 5%, 5% of
  1788.    the time data that is indeed drawn from the presumed distribution
  1789.    will be erroneously deemed inconsistent.
  1790.  
  1791.  
  1792.  
  1793.  
  1794. Paxson, et. al.              Informational                     [Page 32]
  1795.  
  1796. RFC 2330          Framework for IP Performance Metrics          May 1998
  1797.  
  1798.  
  1799.    Thus, it is important to bear in mind that if these routines are used
  1800.    frequently, then one will indeed encounter occasional failures, even
  1801.    if the data is unblemished.
  1802.  
  1803.    Another important point concerning significance levels is that it is
  1804.    unsound to compare them in order to determine which of two sets of
  1805.    values is a "better" fit to a presumed distribution.  Such testing
  1806.    should instead be done using "closeness-of-fit metrics" such as the
  1807.    lambda^2 metric described in [Pa94].
  1808.  
  1809.    While the routines provided are for exponential and uniform
  1810.    distributions with known parameters, it is generally straight-forward
  1811.    to write comparable routines for any distribution with known
  1812.    parameters.  The heart of the A2 tests lies in a statistic computed
  1813.    for testing whether a set of values is consistent with a uniform
  1814.    distribution between 0 and 1, which we term Unif(0, 1).  If we wish
  1815.    to test whether a set of values, X, is consistent with a given
  1816.    distribution G(x), we first compute
  1817.        Y = G_inverse(X)
  1818.    If X is indeed distributed according to G(x), then Y will be
  1819.    distributed according to Unif(0, 1); so by testing Y for consistency
  1820.    with Unif(0, 1), we also test X for consistency with G(x).
  1821.  
  1822.    We note, however, that the process of computing Y above might yield
  1823.    values of Y outside the range (0..1).  Such values should not occur
  1824.    if X is indeed distributed according to G(x), but easily can occur if
  1825.    it is not.  In the latter case, we need to avoid computing the
  1826.    central A2 statistic, since floating-point exceptions may occur if
  1827.    any of the values lie outside (0..1).  Accordingly, the routines
  1828.    check for this possibility, and if encountered, return a raw A2
  1829.    statistic of -1.  The routine that converts the raw A2 statistic to a
  1830.    significance level likewise propagates this value, returning a
  1831.    significance level of -1.  So, any use of these routines must be
  1832.    prepared for a possible negative significance level.
  1833.  
  1834.    The last important point regarding use of A2 statistic concerns n,
  1835.    the number of values being tested.  If n < 5 then the test is not
  1836.    meaningful, and in this case a significance level of -1 is returned.
  1837.  
  1838.    On the other hand, for "real" data the test *gains* power as n
  1839.    becomes larger.  It is well known in the statistics community that
  1840.    real data almost never exactly matches a theoretical distribution,
  1841.    even in cases such as rolling dice a great many times (see [Pa94] for
  1842.    a brief discussion and references).  The A2 test is sensitive enough
  1843.    that, for sufficiently large sets of real data, the test will almost
  1844.    always fail, because it will manage to detect slight imperfections in
  1845.    the fit of the data to the distribution.
  1846.  
  1847.  
  1848.  
  1849.  
  1850. Paxson, et. al.              Informational                     [Page 33]
  1851.  
  1852. RFC 2330          Framework for IP Performance Metrics          May 1998
  1853.  
  1854.  
  1855.    For example, we have found that when testing 8,192 measured wire
  1856.    times for packets sent at Poisson intervals, the measurements almost
  1857.    always fail the A2 test.  On the other hand, testing 128 measurements
  1858.    failed at 5% significance only about 5% of the time, as expected.
  1859.    Thus, in general, when the test fails, care must be taken to
  1860.    understand why it failed.
  1861.  
  1862.    The remainder of this appendix gives C code for the routines
  1863.    mentioned above.
  1864.  
  1865.    /* Routines for computing the Anderson-Darling A2 test statistic.
  1866.     *
  1867.     * Implemented based on the description in "Goodness-of-Fit
  1868.     * Techniques," R. D'Agostino and M. Stephens, editors,
  1869.     * Marcel Dekker, Inc., 1986.
  1870.     */
  1871.  
  1872.    #include <stdio.h>
  1873.    #include <stdlib.h>
  1874.    #include <math.h>
  1875.  
  1876.    /* Returns the raw A^2 test statistic for n sorted samples
  1877.     * z[0] .. z[n-1], for z ~ Unif(0,1).
  1878.     */
  1879.    extern double compute_A2(double z[], int n);
  1880.  
  1881.    /* Returns the significance level associated with a A^2 test
  1882.     * statistic value of A2, assuming no parameters of the tested
  1883.     * distribution were estimated from the data.
  1884.     */
  1885.    extern double A2_significance(double A2);
  1886.  
  1887.    /* Returns the A^2 significance level for testing n observations
  1888.     * x[0] .. x[n-1] against an exponential distribution with the
  1889.     * given mean.
  1890.     *
  1891.     * SIDE EFFECT: the x[0..n-1] are sorted upon return.
  1892.     */
  1893.    extern double exp_A2_known_mean(double x[], int n, double mean);
  1894.  
  1895.    /* Returns the A^2 significance level for testing n observations
  1896.     * x[0] .. x[n-1] against the uniform distribution [min_val, max_val].
  1897.     *
  1898.     * SIDE EFFECT: the x[0..n-1] are sorted upon return.
  1899.     */
  1900.    extern double unif_A2_known_range(double x[], int n,
  1901.                        double min_val, double max_val);
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Paxson, et. al.              Informational                     [Page 34]
  1907.  
  1908. RFC 2330          Framework for IP Performance Metrics          May 1998
  1909.  
  1910.  
  1911.    /* Returns a pseudo-random number distributed according to an
  1912.     * exponential distribution with the given mean.
  1913.     */
  1914.    extern double random_exponential(double mean);
  1915.  
  1916.  
  1917.    /* Helper function used by qsort() to sort double-precision
  1918.     * floating-point values.
  1919.     */
  1920.    static int
  1921.    compare_double(const void *v1, const void *v2)
  1922.    {
  1923.        double d1 = *(double *) v1;
  1924.        double d2 = *(double *) v2;
  1925.  
  1926.        if (d1 < d2)
  1927.            return -1;
  1928.        else if (d1 > d2)
  1929.            return 1;
  1930.        else
  1931.            return 0;
  1932.    }
  1933.  
  1934.    double
  1935.    compute_A2(double z[], int n)
  1936.    {
  1937.        int i;
  1938.        double sum = 0.0;
  1939.  
  1940.        if ( n < 5 )
  1941.            /* Too few values. */
  1942.            return -1.0;
  1943.  
  1944.        /* If any of the values are outside the range (0, 1) then
  1945.         * fail immediately (and avoid a possible floating point
  1946.         * exception in the code below).
  1947.         */
  1948.        for (i = 0; i < n; ++i)
  1949.            if ( z[i] <= 0.0 || z[i] >= 1.0 )
  1950.                return -1.0;
  1951.  
  1952.        /* Page 101 of D'Agostino and Stephens. */
  1953.        for (i = 1; i <= n; ++i) {
  1954.            sum += (2 * i - 1) * log(z[i-1]);
  1955.            sum += (2 * n + 1 - 2 * i) * log(1.0 - z[i-1]);
  1956.        }
  1957.        return -n - (1.0 / n) * sum;
  1958.    }
  1959.  
  1960.  
  1961.  
  1962. Paxson, et. al.              Informational                     [Page 35]
  1963.  
  1964. RFC 2330          Framework for IP Performance Metrics          May 1998
  1965.  
  1966.  
  1967.    double
  1968.    A2_significance(double A2)
  1969.    {
  1970.        /* Page 105 of D'Agostino and Stephens. */
  1971.        if (A2 < 0.0)
  1972.            return A2;    /* Bogus A2 value - propagate it. */
  1973.  
  1974.        /* Check for possibly doctored values. */
  1975.        if (A2 <= 0.201)
  1976.            return 0.99;
  1977.        else if (A2 <= 0.240)
  1978.            return 0.975;
  1979.        else if (A2 <= 0.283)
  1980.            return 0.95;
  1981.        else if (A2 <= 0.346)
  1982.            return 0.90;
  1983.        else if (A2 <= 0.399)
  1984.            return 0.85;
  1985.  
  1986.        /* Now check for possible inconsistency. */
  1987.        if (A2 <= 1.248)
  1988.            return 0.25;
  1989.        else if (A2 <= 1.610)
  1990.            return 0.15;
  1991.        else if (A2 <= 1.933)
  1992.            return 0.10;
  1993.        else if (A2 <= 2.492)
  1994.            return 0.05;
  1995.        else if (A2 <= 3.070)
  1996.            return 0.025;
  1997.        else if (A2 <= 3.880)
  1998.            return 0.01;
  1999.        else if (A2 <= 4.500)
  2000.            return 0.005;
  2001.        else if (A2 <= 6.000)
  2002.            return 0.001;
  2003.        else
  2004.            return 0.0;
  2005.    }
  2006.  
  2007.    double
  2008.    exp_A2_known_mean(double x[], int n, double mean)
  2009.    {
  2010.        int i;
  2011.        double A2;
  2012.  
  2013.        /* Sort the first n values. */
  2014.        qsort(x, n, sizeof(x[0]), compare_double);
  2015.  
  2016.  
  2017.  
  2018. Paxson, et. al.              Informational                     [Page 36]
  2019.  
  2020. RFC 2330          Framework for IP Performance Metrics          May 1998
  2021.  
  2022.  
  2023.        /* Assuming they match an exponential distribution, transform
  2024.         * them to Unif(0,1).
  2025.         */
  2026.        for (i = 0; i < n; ++i) {
  2027.            x[i] = 1.0 - exp(-x[i] / mean);
  2028.        }
  2029.  
  2030.        /* Now make the A^2 test to see if they're truly uniform. */
  2031.        A2 = compute_A2(x, n);
  2032.        return A2_significance(A2);
  2033.    }
  2034.  
  2035.    double
  2036.    unif_A2_known_range(double x[], int n, double min_val, double max_val)
  2037.    {
  2038.        int i;
  2039.        double A2;
  2040.        double range = max_val - min_val;
  2041.  
  2042.        /* Sort the first n values. */
  2043.        qsort(x, n, sizeof(x[0]), compare_double);
  2044.  
  2045.        /* Transform Unif(min_val, max_val) to Unif(0,1). */
  2046.        for (i = 0; i < n; ++i)
  2047.            x[i] = (x[i] - min_val) / range;
  2048.  
  2049.        /* Now make the A^2 test to see if they're truly uniform. */
  2050.        A2 = compute_A2(x, n);
  2051.        return A2_significance(A2);
  2052.    }
  2053.  
  2054.    double
  2055.    random_exponential(double mean)
  2056.    {
  2057.        return -mean * log1p(-drand48());
  2058.    }
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074. Paxson, et. al.              Informational                     [Page 37]
  2075.  
  2076. RFC 2330          Framework for IP Performance Metrics          May 1998
  2077.  
  2078.  
  2079. 19. References
  2080.  
  2081.    [AK97] G. Almes and S. Kalidindi, "A One-way Delay Metric for IPPM",
  2082.    Work in Progress, November 1997.
  2083.  
  2084.    [BM92] I. Bilinskis and A. Mikelsons, Randomized Signal Processing,
  2085.    Prentice Hall International, 1992.
  2086.  
  2087.    [DS86] R. D'Agostino and M. Stephens, editors, Goodness-of-Fit
  2088.    Techniques, Marcel Dekker, Inc., 1986.
  2089.  
  2090.    [CPB93] K. Claffy, G. Polyzos, and H-W. Braun, "Application of
  2091.    Sampling Methodologies to Network Traffic Characterization," Proc.
  2092.    SIGCOMM '93, pp. 194-203, San Francisco, September 1993.
  2093.  
  2094.    [FJ94] S. Floyd and V. Jacobson, "The Synchronization of Periodic
  2095.    Routing Messages," IEEE/ACM Transactions on Networking, 2(2), pp.
  2096.    122-136, April 1994.
  2097.  
  2098.    [Mi92] Mills, D., "Network Time Protocol (Version 3) Specification,
  2099.    Implementation and Analysis", RFC 1305, March 1992.
  2100.  
  2101.    [Pa94] V. Paxson, "Empirically-Derived Analytic Models of Wide-Area
  2102.    TCP Connections," IEEE/ACM Transactions on Networking, 2(4), pp.
  2103.    316-336, August 1994.
  2104.  
  2105.    [Pa96] V. Paxson, "Towards a Framework for Defining Internet
  2106.    Performance Metrics," Proceedings of INET '96,
  2107.    ftp://ftp.ee.lbl.gov/papers/metrics-framework-INET96.ps.Z
  2108.  
  2109.    [Pa97] V. Paxson, "Measurements and Analysis of End-to-End Internet
  2110.    Dynamics," Ph.D. dissertation, U.C. Berkeley, 1997,
  2111.    ftp://ftp.ee.lbl.gov/papers/vp-thesis/dis.ps.gz.
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130. Paxson, et. al.              Informational                     [Page 38]
  2131.  
  2132. RFC 2330          Framework for IP Performance Metrics          May 1998
  2133.  
  2134.  
  2135. 20. Authors' Addresses
  2136.  
  2137.    Vern Paxson
  2138.    MS 50B/2239
  2139.    Lawrence Berkeley National Laboratory
  2140.    University of California
  2141.    Berkeley, CA  94720
  2142.    USA
  2143.  
  2144.    Phone: +1 510/486-7504
  2145.    EMail: vern@ee.lbl.gov
  2146.  
  2147.  
  2148.    Guy Almes
  2149.    Advanced Network & Services, Inc.
  2150.    200 Business Park Drive
  2151.    Armonk, NY  10504
  2152.    USA
  2153.  
  2154.    Phone: +1 914/765-1120
  2155.    EMail: almes@advanced.org
  2156.  
  2157.  
  2158.    Jamshid Mahdavi
  2159.    Pittsburgh Supercomputing Center
  2160.    4400 5th Avenue
  2161.    Pittsburgh, PA  15213
  2162.    USA
  2163.  
  2164.    Phone: +1 412/268-6282
  2165.    EMail: mahdavi@psc.edu
  2166.  
  2167.  
  2168.    Matt Mathis
  2169.    Pittsburgh Supercomputing Center
  2170.    4400 5th Avenue
  2171.    Pittsburgh, PA  15213
  2172.    USA
  2173.  
  2174.    Phone: +1 412/268-3319
  2175.    EMail: mathis@psc.edu
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186. Paxson, et. al.              Informational                     [Page 39]
  2187.  
  2188. RFC 2330          Framework for IP Performance Metrics          May 1998
  2189.  
  2190.  
  2191. 21. Full Copyright Statement
  2192.  
  2193.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  2194.  
  2195.    This document and translations of it may be copied and furnished to
  2196.    others, and derivative works that comment on or otherwise explain it
  2197.    or assist in its implementation may be prepared, copied, published
  2198.    and distributed, in whole or in part, without restriction of any
  2199.    kind, provided that the above copyright notice and this paragraph are
  2200.    included on all such copies and derivative works.  However, this
  2201.    document itself may not be modified in any way, such as by removing
  2202.    the copyright notice or references to the Internet Society or other
  2203.    Internet organizations, except as needed for the purpose of
  2204.    developing Internet standards in which case the procedures for
  2205.    copyrights defined in the Internet Standards process must be
  2206.    followed, or as required to translate it into languages other than
  2207.    English.
  2208.  
  2209.    The limited permissions granted above are perpetual and will not be
  2210.    revoked by the Internet Society or its successors or assigns.
  2211.  
  2212.    This document and the information contained herein is provided on an
  2213.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  2214.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  2215.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  2216.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  2217.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242. Paxson, et. al.              Informational                     [Page 40]
  2243.  
  2244.