home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 2000s / rfc2041.txt < prev    next >
Text File  |  1996-10-27  |  65KB  |  1,516 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                           B. Noble
  8. Request for Comments: 2041                    Carnegie Mellon University
  9. Category: Informational                                        G. Nguyen
  10.                                       University of California, Berkeley
  11.                                                        M. Satyanarayanan
  12.                                               Carnegie Mellon University
  13.                                                                  R. Katz
  14.                                       University of California, Berkeley
  15.                                                             October 1996
  16.  
  17.  
  18.                          Mobile Network Tracing
  19.  
  20. Status of this Memo
  21.  
  22.    This memo provides information for the Internet community.  This memo
  23.    does not specify an Internet standard of any kind.  Distribution of
  24.    this memo is unlimited.
  25.  
  26. Abstract
  27.  
  28.    Mobile networks are both poorly understood and difficult to
  29.    experiment with.  This RFC argues that mobile network tracing
  30.    provides both tools to improve our understanding of wireless
  31.    channels, as well as to build realistic, repeatable testbeds for
  32.    mobile software and systems.  The RFC is a status report on our work
  33.    tracing mobile networks.  Our goal is to begin discussion on a
  34.    standard format for mobile network tracing as well as a testbed for
  35.    mobile systems research.  We present our format for collecting mobile
  36.    network traces, and tools to produce from such traces analytical
  37.    models of mobile network behavior.
  38.  
  39.    We also describe a set of tools to provide network modulation based
  40.    on collected traces.  Modulation allows the emulation of wireless
  41.    channel latency, bandwidth, loss, and error rates on private, wired
  42.    networks.  This allows system designers to test systems in a
  43.    realistic yet repeatable manner.
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Noble, et. al.               Informational                      [Page 1]
  59.  
  60. RFC 2041                 Mobile Network Tracing             October 1996
  61.  
  62.  
  63. 1. Introduction
  64.  
  65.    How does one accurately capture and reproduce the observed behavior
  66.    of a network?  This is an especially challenging problem in mobile
  67.    computing because the network quality experienced by a mobile host
  68.    can vary dramatically over time and space.  Neither long-term average
  69.    measures nor simple analytical models can capture the variations in
  70.    bandwidth, latency, and signal degradation observed by such a host.
  71.    In this RFC, we describe a solution based on network tracing.  Our
  72.    solution consists of two phases:  trace recording and trace
  73.    modulation.
  74.  
  75.    In the trace recording phase, an experimenter with an instrumented
  76.    mobile host physically traverses a path of interest to him.  During
  77.    the traversal, packets from a known workload are generated from a
  78.    static host.  The mobile host records observations of both packets
  79.    received from the known workload as well as the device
  80.    characteristics during the workload.  At the end of the traversal,
  81.    the list of observations represents an accurate trace of the observed
  82.    network behavior for this traversal.  By performing multiple
  83.    traversals of the same path, and by using different workloads, one
  84.    can obtain a trace family that collectively characterizes network
  85.    quality on that path.
  86.  
  87.    In the trace modulation phase, mobile system and application software
  88.    is subjected to the network behavior observed in a recorded trace.
  89.    The mobile software is run on a LAN-attached host whose kernel is
  90.    modified to read a file containing the trace (possibly postprocessed
  91.    for efficiency,) and to delay, drop or otherwise degrade packets in
  92.    accordance with the behavior described by the trace.  The mobile
  93.    software thus experiences network quality indistinguishable from that
  94.    recorded in the trace.  It is important to note that trace modulation
  95.    is fully transparent to mobile software --- no source or binary
  96.    changes have to be made.
  97.  
  98.    Trace-based approaches have proved to be of great value in areas such
  99.    as file system design [2, 10, 11] and computer architecture.  [1, 5,
  100.    13] Similarly, we anticipate that network tracing will prove valuable
  101.    in many aspects of mobile system design and implementation.  For
  102.    example, detailed analyses of traces can provide insights into the
  103.    behavior of mobile networks and validate predictive models.  As
  104.    another example, it can play an important role in stress testing and
  105.    debugging by providing the opportunity to reproduce the network
  106.    conditions under which a bug was originally uncovered.  As a third
  107.    example, it enables a system under development to be subjected to
  108.    network conditions observed in distant real-life environments.  As a
  109.    final example, a set of traces can be used as a benchmark family for
  110.    evaluating and comparing the adaptive capabilities of alternative
  111.  
  112.  
  113.  
  114. Noble, et. al.               Informational                      [Page 2]
  115.  
  116. RFC 2041                 Mobile Network Tracing             October 1996
  117.  
  118.  
  119.    mobile system designs.
  120.  
  121.    Our goal in writing this RFC is to encourage the development of a
  122.    widely-accepted standard format for network traces.  Such
  123.    standardization will allow traces to be easily shared.  It will also
  124.    foster the development and widespread use of trace-based benchmarks.
  125.    While wireless mobile networks are the primary motivation for this
  126.    work, we have made every effort to ensure that our work is applicable
  127.    to other types of networks.  For example, the trace format and some
  128.    of the tools may be valuable in analyzing and modeling ATM networks.
  129.  
  130.    The rest of this RFC is organized as follows.  We begin by examining
  131.    the properties of wireless networks and substantiating the claim that
  132.    it is difficult to model such networks.  Next, in Section 3, we
  133.    describe the factors that should be taken into account in designing a
  134.    trace format.  We present the details of a proposed trace format
  135.    standard in Section 4.  Section 5 presents a set of tools that we
  136.    have built for the collection, analysis and replay of traces.
  137.    Finally, we conclude with a discussion of related and future work.
  138.  
  139. 2. Modeling Wireless Networks
  140.  
  141.    Wireless channels are particularly complex to model, because of their
  142.    inherent dependence on the physical properties of radio waves (such
  143.    as reflections from "hard" surfaces, diffraction around corners, and
  144.    scattering caused by small objects) and the site specific geometries
  145.    in which the channel is formed.  They are usually modeled as a time-
  146.    and distance-varying signal strength, capturing the statistical
  147.    nature of the interaction among reflected radio waves.  The signal
  148.    strength can vary by several orders of magnitude (+ or - 20-30 dB)
  149.    within a short distance.  While there have been many efforts to
  150.    obtain general models of radio propagation inside buildings and over
  151.    the wide area, these efforts have yielded inherently inaccurate
  152.    models that can vary from actual measurements by an order of
  153.    magnitude or more.
  154.  
  155.    Signal-to-noise ratio, or SNR, is a measure of the received signal
  156.    quality.  If the SNR is too low, the received signal will not be
  157.    detected at the receiver, yielding bit errors and packet losses.  But
  158.    SNR is not the only effect that can lead to losses.  Another is
  159.    inter-symbol interference caused by delay spread, that is, the
  160.    delayed arrival of an earlier transmitted symbol that took a
  161.    circuitous propagation path to arrive at the receiver, thereby
  162.    (partially) canceling out the current symbol.  Yet another problem is
  163.    doppler shift, which causes frequency shifts in the arrived signal
  164.    due to relative velocities of the transmitter and the receiver,
  165.    thereby complicating the successful reception of the signal.  If
  166.    coherent reception is being used, receiver synchronization can be
  167.  
  168.  
  169.  
  170. Noble, et. al.               Informational                      [Page 3]
  171.  
  172. RFC 2041                 Mobile Network Tracing             October 1996
  173.  
  174.  
  175.    lost.
  176.  
  177.    More empirically, it has been observed that wireless channels adhere
  178.    to a two state error model.  In other words, channels are usually
  179.    well behaved but occasionally go into a bad state in which many burst
  180.    errors occur within a small time interval.
  181.  
  182.    Developers of network protocols and mobility algorithms must
  183.    experiment with realistic channel parameters.  It is highly desirable
  184.    that the wireless network be modeled in a thoroughly reproducible
  185.    fashion.  This would allow an algorithm and its variations to be
  186.    evaluated in a controlled and repeatable way.  Yet the above
  187.    discussion makes it clear that whether analytical models are used or
  188.    even actual experimentation with the network itself, the results will
  189.    be either inaccurate or unlikely to be reproducible.  A trace-based
  190.    approach alleviates these problems.
  191.  
  192. 3. Desirable Trace Format Properties
  193.  
  194.    In designing our trace format, we have been guided by three
  195.    principles.  First, the format should be extensible.  Second, it
  196.    should be self-describing.  Third, traces should be easy to manage.
  197.    This section describes how each of these principles has affected our
  198.    design.
  199.  
  200.    Although we have found several interesting uses for network traces,
  201.    it is certain that more will evolve over time.  As the traces are
  202.    used in new ways, it may be necessary to add new data to the trace
  203.    format.  Rather than force the trace format to be redesigned, we have
  204.    structured the format to be extensible.  There is a built-in
  205.    mechanism to add to the kinds of data that can be recorded in network
  206.    traces.
  207.  
  208.    This extensibility is of little use if the tool set needs to change
  209.    as the trace format is extended.  Recognizing this, we have made the
  210.    format -- particularly the extensible portions -- self-describing.
  211.    Thus, old versions of tools can continue to work with extended
  212.    traces, if perhaps in a less than optimal way.
  213.  
  214.    In our experience with other tracing systems, management of trace
  215.    files is often difficult at best.  Common problems include the need
  216.    to manage multiple trace files as a unit, not easily being able to
  217.    extract the salient features of large trace files, and having to use
  218.    dedicated trace management tools to perform even the simplest tasks.
  219.    To help cope with file management, we have designed the the traces to
  220.    be split or merged easily.  To reduce dependence on specialized
  221.    tools, we've chosen to store some descriptive information as ASCII
  222.    strings, allowing minimal access to the standard UNIX tool suite.
  223.  
  224.  
  225.  
  226. Noble, et. al.               Informational                      [Page 4]
  227.  
  228. RFC 2041                 Mobile Network Tracing             October 1996
  229.  
  230.  
  231. 4. Trace Format
  232.  
  233.    This section describes the format for network traces.  We begin by
  234.    presenting the basic abstractions that are key to the trace format:
  235.    the record, and the track, a collection of related records.  We then
  236.    describe the records at the beginning and end of a trace, the header
  237.    and footer.  The bulk of the section describes the three kinds of
  238.    record tracks:  packet, device, and general.  These also make up the
  239.    bulk of the actual trace.  We conclude the section with a discussion
  240.    of two special purpose records:  the annotation and the trace data
  241.    loss records.
  242.  
  243. 4.1. Basic Abstractions
  244.  
  245. 4.1.1. Records
  246.  
  247.    A record is the smallest unit of trace data.  There are several
  248.    different types of records, each of which is discussed in Sections
  249.    4.2 through 4.7.  All of the records share several features in
  250.    common; these features are described here.
  251.  
  252.    Records are composed of fields, which are stored in network order.
  253.    Most of the fields in our records are word-sized.  Although this may
  254.    be wasteful in space, we chose to leave room to grow and keep trace
  255.    management simple.
  256.  
  257.    The first field in each record is a magic word, a random 32 bit
  258.    pattern that both identifies the record's type and lends some
  259.    confidence that the record is well formed.  Many record types have
  260.    both required and optional fields; thus they can be of variable size.
  261.    We place every record's size in its second field.  By comparing the
  262.    size of a record to the known constraints for the record's type, we
  263.    can gain further confidence that a record is well-formed.  This basic
  264.    record structure is illustrated in Figure 1.
  265.  
  266.    All records also contain a two-word timestamp.  This timestamp can
  267.    take one of two formats:  timeval or timespec.  Only one of the two
  268.    formats is used in any given trace, and the format is specified at
  269.    the start of a trace file.  The first word in either format is the
  270.    number of seconds that have elapsed since midnight, January 1, 1970.
  271.    The second word is the additional fractions of a second.  In the
  272.    timeval format, these fractions are expressed in microseconds, in the
  273.    same way that many current operating systems express time.  In the
  274.    timespec format, these fractions are expressed in nanoseconds, the
  275.    POSIX time standard.  We've chosen these two values since they are
  276.    convenient, cover most current and anticipated systems' notions of
  277.    time, and offer appropriate granularity for measuring network events.
  278.  
  279.  
  280.  
  281.  
  282. Noble, et. al.               Informational                      [Page 5]
  283.  
  284. RFC 2041                 Mobile Network Tracing             October 1996
  285.  
  286.  
  287.                           +------------------+
  288.                           | Magic Number     |
  289.                           | Size of Record   |
  290.                           +------------------+
  291.                           | Required Fields  |
  292.                           |       ...        |
  293.                           +------------------+
  294.                           | Optional Fields  |
  295.                           |       ...        |
  296.                           +------------------+
  297.  
  298.                         Figure 1: Record format
  299.  
  300. 4.1.2. Tracks
  301.  
  302.    Many of the record types have both fixed, required fields, as well as
  303.    a set of optional fields.  It is these options that provide
  304.    extensibility to our trace format.  However, to provide a self-
  305.    describing trace, we need some compact way of determining which
  306.    optional fields are present in a given record.  To do this, we group
  307.    related sets of packets into tracks.  For example, a set of records
  308.    that captured packet activity for a single protocol between two
  309.    machines might be put together into a track.  A track is a header
  310.    followed by some number of related records; the header completely
  311.    describes the format of the individual records.  Records from
  312.    separate tracks can be interleaved with one another, so long as the
  313.    header for each individual track appears before any of the track's
  314.    records.  Figure 2 shows an example of how records from different
  315.    tracks might be interleaved.
  316.  
  317.    Track headers describe their records' content through property lists.
  318.    An entry in a property list is a two-element tuple consisting of a
  319.    name and a value.  The name is a word which identifies the property
  320.    defined by this entry.  Some of these properties are measured only
  321.    once for a track, for example, the address of a one-hop router in a
  322.    track recording packets from that router.  Others are measured once
  323.    per record in that track, such as the signal strength of a device
  324.    which changes over time.  The former, which we call header-only
  325.    properties, have their most significant name bit set.  The value
  326.    field of a header-only property holds the measured value of the
  327.    property.  Otherwise, the value field holds the number of words used
  328.    in each of the track's records.
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Noble, et. al.               Informational                      [Page 6]
  339.  
  340. RFC 2041                 Mobile Network Tracing             October 1996
  341.  
  342.  
  343.        +----------++----------++----------++----------++----------+
  344.        | Track #1 || Track #1 || Track #2 || Track #1 || Track #2 |
  345.        | Header   || Entry    || Header   || Entry    || Entry    |
  346.        +----------++----------++----------++----------++----------+
  347.  
  348.                   Figure 2: Interleaved track records
  349.  
  350.    Those properties measured in each record in the track are grouped
  351.    together in a value list at the end of each such record.  They appear
  352.    in the same order that was specified in the track header's property
  353.    list so that tools can properly attribute data.  Thus, even if a tool
  354.    doesn't know what property a particular name represents, it can
  355.    identify which parts of a trace record are measuring that property,
  356.    and ignore them.
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Noble, et. al.               Informational                      [Page 7]
  395.  
  396. RFC 2041                 Mobile Network Tracing             October 1996
  397.  
  398.  
  399. 4.2. Trace Headers and Footers
  400.  
  401.    Trace files begin with a trace header, and end with a trace footer.
  402.    The formats of these appear in Figure 3.  The header specifies
  403.    whether this trace was collected on a single machine, or was merged
  404.    from several other traces.  In the former case, the IP address and
  405.    host name of the machine are recorded.  In the latter, the IP address
  406.    is taken from the family of Class E address, which are invalid.  We
  407.    use a family of invalid addresses so that even if we cannot identify
  408.    a number of hosts participating in the trace we can still distinguish
  409.    records from distinct hosts.
  410.  
  411.       #define TR_DATESZ   32
  412.       #define TR_NAMESZ   64
  413.  
  414.       struct tr_header_t {
  415.           u_int32_t        h_magic;
  416.           u_int32_t        h_size;
  417.           u_int32_t        h_time_fmt;         /* usec or nsec */
  418.           struct tr_time_t h_ts;               /* starting time */
  419.           char             h_date[TR_DATESZ];  /* Date collected */
  420.           char             h_agent[TR_NAMESZ]; /* DNS name */
  421.           u_int32_t        h_agent_ip;
  422.           char             h_desc[0];          /* variable size */
  423.       };
  424.  
  425.       struct tr_end_t {
  426.           u_int32_t         e_magic;
  427.           u_int32_t         e_size;
  428.           struct tr_time_t  e_ts;        /* end time */
  429.           char              e_date[32];  /* Date end written */
  430.       };
  431.  
  432.  
  433.                Figure 3: Trace header and footer records
  434.  
  435.    The trace header also specifies which time stamp format is used in
  436.    the trace, and the time at which the trace begins.  There is a
  437.    variable-length description that is a string meant to provide details
  438.    of how the trace was collected.  The trace footer contains only the
  439.    time at which the trace ended; it serves primarily as a marker to
  440.    show the trace is complete.
  441.  
  442.    Unlike other kinds of records in the trace format, the header and
  443.    footer records have several ASCII fields.  This is to allow standard
  444.    utilities some access to the contents of the trace, without resorting
  445.    to specialized tools.
  446.  
  447.  
  448.  
  449.  
  450. Noble, et. al.               Informational                      [Page 8]
  451.  
  452. RFC 2041                 Mobile Network Tracing             October 1996
  453.  
  454.  
  455. 4.3. Packet Tracks
  456.  
  457.    Measuring packet activity is the main focus of the network tracing
  458.    project.  Packet activity is recorded in tracks, with a packet header
  459.    and a set of packet entries.  A single track is meant to capture the
  460.    activity of a single protocol, traffic from a single router, or some
  461.    other subset of the total traffic seen by a machine.  The required
  462.    portions of packet headers and entries are presented in Figure 4.
  463.  
  464.    Packet track headers identify which host generated the trace records
  465.    for that track, as well as the time at which the track began.  It
  466.    records the device on which these packets are received or sent, and
  467.    the protocol used to ship the packet; these allow interpretation of
  468.    device-specific or protocol-specific options.  The header concludes
  469.    with the property list for the track.
  470.  
  471.       struct tr_pkt_hdr_t {
  472.           u_int32_t            ph_magic;
  473.           u_int32_t            ph_size;
  474.           u_int32_t            ph_defines;  /* magic number defined */
  475.           struct tr_time_t     ph_ts;
  476.           u_int32_t            ph_ip;       /* host generating stream */
  477.           u_int32_t            ph_dev_type; /* device collected from */
  478.           u_int32_t            ph_protocol; /* protocol */
  479.           struct tr_prop_lst_t ph_plist[0]; /* variable size */
  480.       };
  481.  
  482.       struct tr_pkt_ent_t {
  483.           u_int32_t        pe_magic;
  484.           u_int32_t        pe_size;
  485.           struct tr_time_t pe_ts;
  486.           u_int32_t        pe_psize;    /* packet size */
  487.           u_int32_t        pe_vlist[0]; /* variable size */
  488.       };
  489.  
  490.  
  491.                Figure 4: Packet header and entry records
  492.  
  493.    A packet entry is generated for every traced packet.  It contains the
  494.    size of the traced packet, the time at which the packet was sent or
  495.    received, and the list of property measurements as specified in the
  496.    track header.
  497.  
  498.    The options we have defined to date are in Table 1.  Several of these
  499.    have played an important role in our early experiments.  ADDR_PEER
  500.    identifies the senders of traffic during the experiment.  We can
  501.    determine network performance using either PKT_SENTTIME for one-way
  502.    traffic between two hosts with closely synchronized clocks, or round
  503.  
  504.  
  505.  
  506. Noble, et. al.               Informational                      [Page 9]
  507.  
  508. RFC 2041                 Mobile Network Tracing             October 1996
  509.  
  510.  
  511.    trip ICMP ECHO traffic and the ICMP_PINGTIME option.  Tracking
  512.    PKT_SEQUENCE numbers sheds light on both loss rates and patterns.
  513.    Section 5 discusses how these measurements are used.
  514.  
  515. 4.4. Device Tracks
  516.  
  517.    Our trace format records details of the devices which carry network
  518.    traffic.  To date, we've found this most useful for correlating lost
  519.    packets with various signal parameters provided by wireless devices.
  520.    The required portions of device header and entry records appear in
  521.    Figure 5, and are quite simple.  Device track headers identify the
  522.    host generating the track's records, the time at which the
  523.    observation starts, and the type of device that is being traced.
  524.    Each entry contains the time of the observation, and the list of
  525.    optional characteristics.
  526.  
  527.    +---------------+-----------------------------------------------+
  528.    | ADDR_PEER     | Address of peer host                          |
  529.    | ADDR_LINK     | Address of one-hop router                     |
  530.    | BS_LOC_X      | One-hop router's X coordinate (header only)   |
  531.    | BS_LOC_Y      | One-hop router's Y coordinate (header only)   |
  532.    | PKT_SEQUENCE  | Sequence number of packet                     |
  533.    | PKT_SENTTIME  | Time packet was sent                          |
  534.    | PKT_HOPS      | Number of hops packet took                    |
  535.    | SOCK_PORTS    | Sending and receiving ports                   |
  536.    | IP_PROTO      | Protocol number of an IP packet               |
  537.    | ICMP_PINGTIME | Roundtrip time of an ICMP ECHO/REPLY pair     |
  538.    | ICMP_KIND     | Type and code of an ICMP packet               |
  539.    | ICMP_ID       | The id field of an ICMP packet                |
  540.    | PROTO_FLAGS   | Protocol-specific flags                       |
  541.    | PROTO_ERRLIST | Protocol-specific status/error words          |
  542.    +---------------+-----------------------------------------------+
  543.           Table 1: Current optional fields for packet entries
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Noble, et. al.               Informational                     [Page 10]
  563.  
  564. RFC 2041                 Mobile Network Tracing             October 1996
  565.  
  566.  
  567.       struct tr_dev_hdr_t {
  568.           u_int32_t            dh_magic;
  569.           u_int32_t            dh_size;
  570.           u_int32_t            dh_defines;  /* Magic number defined */
  571.           struct tr_time_t     dh_ts;
  572.           u_int32_t            dh_ip;       /* host generating stream */
  573.           u_int32_t            dh_dev_type; /* device described */
  574.           struct tr_prop_lst_t dh_plist[0]; /* Variable size */
  575.       };
  576.  
  577.       struct tr_dev_ent_t {
  578.           u_int32_t        de_magic;
  579.           u_int32_t        de_size;
  580.           struct tr_time_t de_ts;
  581.           u_int32_t        de_vlist[0]; /* Variable size */
  582.       };
  583.  
  584.  
  585.                Figure 5: Device header and entry records
  586.  
  587.    These optional characteristics, listed in Table 2, are mostly
  588.    concerned with the signal parameters of the wireless interfaces we
  589.    have available.  Interpreting these parameters is heavily device-
  590.    dependent.  We give examples of how we've used device observations in
  591.    Section 5.
  592.  
  593.   +-----------------+--------------------------------------------------+
  594.   | DEV_ID          | Major and minor number of device (header only)   |
  595.   | DEV_STATUS      | Device specific status registers                 |
  596.   | WVLN_SIGTONOISE | Signal to noise ratio reported by WaveLAN        |
  597.   | WVLN_SIGQUALITY | Signal quality reported by WaveLAN               |
  598.   | WVLN_SILENCELVL | WaveLAN silence level                            |
  599.   +-----------------+--------------------------------------------------+
  600.           Table 2: Current optional fields for packet entries
  601.  
  602. 4.5. Miscellaneous Tracks
  603.  
  604.    We use miscellaneous, or general, tracks to record things that don't
  605.    fit clearly in either the packet or device model.  At the moment,
  606.    physical location of a mobile host is the only attribute tracked in
  607.    general trace records.  The required portion of the general header
  608.    and entry records is shown in Figure 6, the two optional properties
  609.    are in Table 3.  In addition to the property list, general headers
  610.    have only the IP address of the host generating the record and the
  611.    time at which observations began.  General entries have only a
  612.    timestamp, and the optional fields.
  613.  
  614.  
  615.  
  616.  
  617.  
  618. Noble, et. al.               Informational                     [Page 11]
  619.  
  620. RFC 2041                 Mobile Network Tracing             October 1996
  621.  
  622.  
  623. 4.6. Annotations
  624.  
  625.    An experimenter may occasionally want to embed arbitrary descriptive
  626.    text into a trace.  We include annotation records to provide for
  627.    this.  Such records are not part of a track; they stand alone.  The
  628.    structure of an annotation record is shown in Figure 7.  Annotations
  629.    include the time at which the annotation was inserted in the trace,
  630.    the host which inserted the annotation, and the variable-sized text
  631.    of the annotation itself.
  632.  
  633.       struct tr_gen_hdr_t {
  634.           u_int32_t            gh_magic;
  635.           u_int32_t            gh_size;
  636.           u_int32_t            gh_defines;
  637.           struct tr_time_t     gh_ts;
  638.           u_int32_t            gh_ip;
  639.           struct tr_prop_lst_t gh_plist[0]; /* Variable size */
  640.       };
  641.  
  642.       struct tr_gen_ent_t {
  643.           u_int32_t        ge_magic;
  644.           u_int32_t        ge_size;
  645.           struct tr_time_t ge_ts;
  646.           u_int32_t        ge_vlist[0]; /* Variable size */
  647.       };
  648.  
  649.                Figure 6: General header and entry records
  650.  
  651.  
  652.       +------------+--------------------------------------------+
  653.       | MH_LOC_X   | Mobile host's X coordinate (map-relative)  |
  654.       | MH_LOC_Y   | Mobile host's Y coordinate (map-relative)  |
  655.       | MH_LOC_LAT | Mobile host's GPS latitude                 |
  656.       | MH_LOC_LON | Mobile host's GPS longitude                |
  657.       +------------+--------------------------------------------+
  658.           Table 3: Current optional fields for general entries
  659.  
  660.  
  661.       struct tr_annote_t {
  662.           u_int32_t        a_magic;
  663.           u_int32_t        a_size;
  664.           struct tr_time_t a_ts;
  665.           u_int32_t        a_ip;
  666.           char             a_text[0]; /* variable size */
  667.       };
  668.  
  669.  
  670.                       Figure 7: Annotation records
  671.  
  672.  
  673.  
  674. Noble, et. al.               Informational                     [Page 12]
  675.  
  676. RFC 2041                 Mobile Network Tracing             October 1996
  677.  
  678.  
  679. 4.7. Lost Trace Data
  680.  
  681.    It is possible that, during collection, some trace records may be
  682.    lost due to trace buffer overflow or other reasons.  Rather than
  683.    throw such traces away, or worse, ignoring the lost data, we've
  684.    included a loss record to count the types of other records which are
  685.    lost in the course of trace collection.  Loss records are shown in
  686.    Figure 8.
  687.  
  688.       struct tr_loss_t {
  689.           u_int32_t        l_magic;
  690.           u_int32_t        l_size;
  691.           struct tr_time_t l_ts;
  692.           u_int32_t        l_ip;
  693.           u_int32_t        l_pkthdr;
  694.           u_int32_t        l_pktent;
  695.           u_int32_t        l_devhdr;
  696.           u_int32_t        l_devent;
  697.           u_int32_t        l_annote;
  698.       };
  699.  
  700.                          Figure 8: Loss records
  701.  
  702. 5. Software Components
  703.  
  704.    In this section, we describe the set of tools that have been built to
  705.    date for mobile network tracing.  We believe many of these tools are
  706.    widely applicable to network tracing tasks, but some have particular
  707.    application to mobile network tracing.  We begin with an overview of
  708.    the tools, their applicability, and the platforms on which they are
  709.    currently supported, as well as those they are being ported to.  This
  710.    information is summarized in Table 4.
  711.  
  712.    We have made every effort to minimize dependencies of our software on
  713.    anything other than protocol and device specifications.  As a result,
  714.    we expect ports to other BSD-derived systems to be straightforward;
  715.    ports to other UNIX systems may be more complicated, but feasible.
  716.  
  717.    There are three categories into which our tracing tools can be
  718.    placed:  trace collection, trace modulation, and trace analysis.
  719.    Trace collection tools are used for generating new traces.  They
  720.    record information about the general networking facilities, as well
  721.    as data specific to mobile situations:  mobile host location, base
  722.    station location, and wireless device characteristics.  These tools
  723.    are currently supported on BSDI, and are being ported to NetBSD. We
  724.    describe these tools in Section 5.1.
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Noble, et. al.               Informational                     [Page 13]
  731.  
  732. RFC 2041                 Mobile Network Tracing             October 1996
  733.  
  734.  
  735.    Trace modulation tools emulate the performance of a traced wireless
  736.    network on a private wired network.  The trace modulation tools,
  737.    discussed in Section 5.2, are currently supported on NetBSD
  738.    platforms.  They are geared toward replaying low speed/quality
  739.    networks on faster and more reliable ones, and are thus most
  740.    applicable to reproducing mobile environments.
  741.  
  742.    In Section 5.3, we conclude with a set of trace processing and
  743.    analysis tools, which are currently supported on both NetBSD and BSDI
  744.    platforms.  Our analyses to date have focused on properties of
  745.    wireless networks, and are most directly applicable to mobile traces.
  746.    The processing tools, however, are of general utility.
  747.  
  748.                   +--------------+--------------+--------------+
  749.                   | Collection   | Modulation   | Analysis     |
  750.       +-----------+--------------+--------------+--------------+
  751.       | NetBSD    | In Progress  | Supported    | Supported    |
  752.       | BSDI      | Supported    | Planned      | Supported    |
  753.       +-----------+--------------+--------------+--------------+
  754. This table summarizes the currently supported platforms for the tracing
  755. tool suites, and the platforms to which ports are underway.
  756.  
  757.                        Table 4: Tool Availability
  758.  
  759. 5.1. Trace Collection Tools
  760.  
  761.    The network trace collection facility comprises two key components:
  762.    the trace agent and the trace collector.  They are shown in Figure 9.
  763.  
  764.    The trace agent resides in the kernel where it can obtain data that
  765.    is either expensive to obtain or inaccessible from the user level.
  766.    The agent collects and buffers data in kernel memory; the user-level
  767.    trace collector periodically extracts data from this kernel buffer
  768.    and writes it to disk.  The buffer amortizes the fixed costs of data
  769.    transfer across a large number of records, minimizing the impact of
  770.    data transfer on system performance.  The trace collector retrieves
  771.    data through a pseudo-device, ensuring that only a single -- and
  772.    therefore complete -- trace file is being generated from a single
  773.    experiment.  To provide simplicity and efficiency, the collector does
  774.    not interpret extracted data; it is instead processed off-line by the
  775.    post-processing and analysis tools described in Sections 5.2 and 5.3.
  776.  
  777.    There are three sorts of data collected by the tracing tools: network
  778.    traffic, network device characteristics, and mobile host location.
  779.    The first two are collected in much the same way; we describe the
  780.    methodology in Section 5.1.1.  The last is collected in two novel
  781.    ways.  These collection methods are addressed in Section 5.1.2.
  782.  
  783.  
  784.  
  785.  
  786. Noble, et. al.               Informational                     [Page 14]
  787.  
  788. RFC 2041                 Mobile Network Tracing             October 1996
  789.  
  790.  
  791.                                      +-----------+  write to disk
  792.                                      | Trace     | ==============>
  793.                                      | Collector |
  794.                                      +-----------+
  795.                                              A
  796.      ========================================|===== kernel boundary
  797.      +-----------------+                     |
  798.      | Transport Layer |                     |
  799.      |-----------------|             +------------------+
  800.      |  Network Layer  |------------>| Trace   +------+ |
  801.      |-----------------|             | Agent   |buffer| |
  802.      |  NI |  NI |  NI |------------>|         +------+ |
  803.      +-----------------+             +------------------+
  804.  This figure illustrates the components of trace collection.  The NI's
  805.                         are network interfaces.
  806.  
  807.                 Figure 9: Components of trace collection
  808.  
  809. 5.1.1. Traffic and Device Collection
  810.  
  811.    The trace agent exports a set of function calls for traffic and
  812.    device data collection.  Traffic data is collected on a per-packet
  813.    basis.  This is done via a function called from device drivers with
  814.    the packet and a device identifier as arguments.  For each packet,
  815.    the trace record contains the source and destination address options.
  816.    Since our trace format assembles related packets into tracks, common
  817.    information, such as the destination address, is recorded in the
  818.    track header to reduce the record size for each packet entry.  We
  819.    also record the size of each packet.
  820.  
  821.    Information beyond packet size and address information is typically
  822.    protocol-dependent.  For transport protocols such as UDP and TCP, for
  823.    example, we record the source and destination port numbers; TCP
  824.    packet records also contain the sequence number.  For ICMP packets,
  825.    we record their type, code and additional type-dependent data.  As
  826.    explained in Section 5.2.3, we record the identifier, sequence number
  827.    and time stamp for ICMP ECHOREPLY packets.
  828.  
  829.    Before appending the record to the trace buffer, we check to see if
  830.    it is the first record in a track.  If so, we create a new packet
  831.    track header, and write it to the buffer prior the packet entry.
  832.  
  833.    Our trace collection facility provides similar mechanisms to record
  834.    device-specific data such as signal quality, signal level, and noise
  835.    level.  Hooks to these facilities can be easily added to the device
  836.    drivers to invoke these tracing mechanisms.  The extensible and
  837.    self-describing features of our trace format allow us to capture a
  838.    wide variety of data specific to particular network interfaces.
  839.  
  840.  
  841.  
  842. Noble, et. al.               Informational                     [Page 15]
  843.  
  844. RFC 2041                 Mobile Network Tracing             October 1996
  845.  
  846.  
  847.    For wireless network devices, we record several signal quality
  848.    measurements that the interfaces provide.  Although some interfaces,
  849.    such as NCR's WaveLAN, can supply this of information for every
  850.    packet received, most devices average their measurements over a
  851.    longer period of time.  As a result, we only trace these measurements
  852.    periodically.  It is up to the device drivers to determine the
  853.    frequency at which data is reported to the trace agent.
  854.  
  855.    When devices support it, we also trace status and error events.  The
  856.    types of errors, such as CRC or buffer overflow, allow us to
  857.    determine causes for some observed packet losses.  For example, we
  858.    can attribute loss to either the wireless channel or the network
  859.    interface.
  860.  
  861. 5.1.2. Location Tracing
  862.  
  863.    At first thought, recording the position of a mobile host seems
  864.    straightforward.  It can be approximated by recording the base
  865.    station (BS) with which the mobile host is communicating.  However,
  866.    due to the large coverage area provided by most radio interfaces,
  867.    this information provides a loose approximation at best.  In
  868.    commercial deployments, we may not be able to reliably record the
  869.    base station with which a mobile host communicates.  This section
  870.    outlines our collection strategy for location information in both
  871.    outdoor and indoor environments.
  872.  
  873.    The solution that we have considered for wide-area, outdoor
  874.    environments makes use of the Global Positioning System (GPS). The
  875.    longitude and latitude information provided by the GPS device is
  876.    recorded in a general track.
  877.  
  878.    Indoor environments require a different approach because the
  879.    satellite signals cannot reach a GPS device inside a building.  We
  880.    considered deploying an infrared network similar to the Active Badge
  881.    [14] or the ParcTab [12]; however, this significant addition to the
  882.    wireless infrastructure is not an option for most research groups.
  883.  
  884.    As an alternative, we have developed a graphical tool that displays
  885.    the image of a building map and expects the user to "click" their
  886.    location as they move; the coordinates on the map are recorded in one
  887.    or more general tracks.  The header of such tracks can also record
  888.    the coordinates of the base stations if they are known.
  889.  
  890.    An extension can be easily added to this tool to permit multiple
  891.    maps.  As the user requests that a new map be loaded into the
  892.    graphical tracing tool, a new location track is created along with an
  893.    annotation record that captures the file name of that image.
  894.    Locations of new base stations can be recorded in this new track
  895.  
  896.  
  897.  
  898. Noble, et. al.               Informational                     [Page 16]
  899.  
  900. RFC 2041                 Mobile Network Tracing             October 1996
  901.  
  902.  
  903.    header.  Each location track should represent a different physical
  904.    and wireless environment.
  905.  
  906. 5.2. Trace Modulation Tools
  907.  
  908.    A key tool we have built around our trace format is PaM, the Packet
  909.    Modulator.  The idea behind PaM is to take traces that were collected
  910.    by a mobile host and distill them into modulation traces.  These
  911.    modulation traces capture the networking environment seen by the
  912.    traced host, and are used by a PaM kernel to delay, drop, or corrupt
  913.    incoming and outgoing packets.  With PaM, we've built a testbed that
  914.    can repeatably, reliably mimic live systems under certain mobile
  915.    scenarios.
  916.  
  917.    There are three main components to PaM. First, we've built a kernel
  918.    capable of delaying, dropping, and corrupting packets to match the
  919.    characteristics of some observed network.  Second, we've defined a
  920.    modulation trace format to describe how such a kernel should modulate
  921.    packets.  Third, we've built a tool to generate modulation traces
  922.    from certain classes of raw traces collected by mobile hosts.
  923.  
  924. 5.2.1. Packet Modulation
  925.  
  926.    The PaM modulation tool has been placed in the kernel between the IP
  927.    layer and the underlying interfaces.  The tool intercepts incoming
  928.    and outgoing packets, and may choose to drop it, corrupt it, or delay
  929.    it.  Dropping an incoming or outgoing packet is easy, simply don't
  930.    forward it along.  Similarly, we can corrupt a packet by flipping
  931.    some bits in the packet before forwarding it.
  932.  
  933.    Correctly delaying a packet is slightly more complicated.  We model
  934.    the delay a packet experiences as the time it takes the sender to put
  935.    the packet onto the network interface plus the time it takes for the
  936.    last byte to propagate to the receiver.  The former, the transmission
  937.    time, is the size of the packet divided by the available bandwidth;
  938.    the latter is latency.
  939.  
  940.    Our approach at delay modulation is simple -- we assume that the
  941.    actual network over which packets travel is much faster and of better
  942.    quality than the one we are trying to emulate, and can thus ignore
  943.    it.  We delay the packet according to our latency and bandwidth
  944.    targets, and then decide whether to drop or corrupt it.  We take care
  945.    to ensure that packet modulation does not unduly penalize other
  946.    system activity, using the internal system clock to schedule packets.
  947.    Since this clock is at a large granularity compared to delay
  948.    resolution, we try to keep the average error in scheduling to a
  949.    minimum, rather than scheduling each packet at exactly the right
  950.    time.
  951.  
  952.  
  953.  
  954. Noble, et. al.               Informational                     [Page 17]
  955.  
  956. RFC 2041                 Mobile Network Tracing             October 1996
  957.  
  958.  
  959. 5.2.2. Modulation Traces
  960.  
  961.    To tell the PaM kernel how the modulation parameters change over
  962.    time, we provide it with a series of modulation-trace entries.  Each
  963.    of these entries sets loss and corruption percentages, as well as
  964.    network latency and inter-byte time, which is 1/bandwidth.  These
  965.    entries are stored in a trace file, the format of which is much
  966.    simpler than record-format traces, and is designed for efficiency in
  967.    playback.  The format of modulation traces is shown in Figure 10.
  968.  
  969.       struct tr_rep_hdr_t {
  970.           u_int32_t        rh_magic;
  971.           u_int32_t        rh_size;
  972.           u_int32_t        rh_time_fmt;         /* nsec or used */
  973.           struct tr_time_t rh_ts;
  974.           char             rh_date[TR_DATESZ];
  975.           char             rh_agent[TR_NAMESZ];
  976.           u_int32_t        rh_ip;
  977.           u_int32_t        rh_ibt_ticks;        /* units/sec, ibt */
  978.           u_int32_t        rh_lat_ticks;        /* units/sec, lat */
  979.           u_int32_t        rh_loss_max;         /* max loss rate */
  980.           u_int32_t        rh_crpt_max;         /* max corrupt rate */
  981.           char             rh_desc[0];          /* variable size */
  982.       };
  983.  
  984.       struct tr_rep_ent_t {
  985.           u_int32_t         re_magic;
  986.           struct tr_time_t  re_dur;          /* duration of entry */
  987.           u_int32_t         re_lat;          /* latency */
  988.           u_int32_t         re_ibt;          /* inter-byte time */
  989.           u_int32_t         re_loss;         /* loss rate */
  990.           u_int32_t         re_crpt;         /* corrupt rate */
  991.       };
  992.  
  993.  
  994.                    Figure 10: Modulation trace format
  995.  
  996.    Modulation traces begin with a header that is much like that found in
  997.    record-format trace headers.  Modulation headers additionally carry
  998.    the units in which latency and inter-byte time are expressed, and the
  999.    maximum values for loss and corruption rates.  Individual entries
  1000.    contain the length of time for which the entry applies as well as the
  1001.    latency, inter-byte time, loss rate, and corruption rate.
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Noble, et. al.               Informational                     [Page 18]
  1011.  
  1012. RFC 2041                 Mobile Network Tracing             October 1996
  1013.  
  1014.  
  1015. 5.2.3. Trace Transformation
  1016.  
  1017.    How can we generate these descriptive modulation traces from the
  1018.    recorded observational traces described in Section 4?  To ensure a
  1019.    high-quality modulation trace, we limit ourselves to a very narrow
  1020.    set of source traces.  As our experience with modulation traces is
  1021.    limited, we use a simple but tunable algorithm to generate them.
  1022.  
  1023.    Our basic strategy for determining latency and bandwidth is tied
  1024.    closely to our model of packet delays:  delay is equal to
  1025.    transmission time plus latency.  We further assume that packets which
  1026.    traversed the network near one another in time experienced the same
  1027.    latency and bandwidth during transit.  Given this, we look for two
  1028.    packets of different size that were sent close to one another along
  1029.    the same path; from the transit times and sizes of these packets, we
  1030.    can determine the near-instantaneous bandwidth and latency of the
  1031.    end-to-end path covered by those packets.  If traced packet traffic
  1032.    contains sequence numbers, loss rates are fairly easy to calculate.
  1033.    Likewise, if the protocol is capable of marking corrupt packets,
  1034.    corruption information can be stored and then extracted from recorded
  1035.    traces.
  1036.  
  1037.    Using timestamped packet observations to derive network latency and
  1038.    bandwidth requires very accurate timing.  Unfortunately, the laptops
  1039.    we have on hand have clocks that drift non-negligibly.  We have
  1040.    chosen not to use protocols such as NTP [9] for two reasons.  First,
  1041.    they produce network traffic above and beyond that in the known
  1042.    traced workload.  Second, and perhaps more importantly, they can
  1043.    cause the clock to speed up or slow down during adjustment.  Such
  1044.    clock movements can play havoc with careful measurement.
  1045.  
  1046.    As a result, we can only depend on the timestamps of a single machine
  1047.    to determine packet transit times.  So, we use the ICMP ECHO service
  1048.    to provide workloads on traced machines; the ECHO request is
  1049.    timestamped on it's way out, and the corresponding ECHOREPLY is
  1050.    traced.  We have modified the ping program to alternate between small
  1051.    and large packets.  Traces that capture such altered ping traffic can
  1052.    then be subject to our transformation tool.
  1053.  
  1054.    The tool itself uses a simple sliding window scheme to generate
  1055.    modulation entries.  For each window position in the recorded trace,
  1056.    we determine the loss rate, and the average latency and bandwidth
  1057.    experienced by pairs of ICMP ECHO packets.  The size and granularity
  1058.    of the sliding window are parameters of the transformation; as we
  1059.    gain experience both in analysis and modulation of wireless traces,
  1060.    we expect to be able to recommend good window sizes.
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Noble, et. al.               Informational                     [Page 19]
  1067.  
  1068. RFC 2041                 Mobile Network Tracing             October 1996
  1069.  
  1070.  
  1071.    Unfortunately, our wireless devices do not report corrupt packets;
  1072.    they are dropped by the hardware without operating system
  1073.    notification.  However, our modulation system will also coerce any
  1074.    such corruptions to an increased loss rate, duplicating the behavior
  1075.    in the original network.
  1076.  
  1077. 5.3. Trace Analysis Tools
  1078.  
  1079.    A trace is only as useful as its processing tools.  The requirements
  1080.    for such tools tools include robustness, flexibility, and
  1081.    portability.  Having an extensible trace format places additional
  1082.    emphasis on the ability to work with future versions.  To this end,
  1083.    we provide a general processing library as a framework for users to
  1084.    easily develop customized processing tools; this library is designed
  1085.    to provide both high portability and good performance.
  1086.  
  1087.    In this section, we first present the trace library.  We then
  1088.    describe a set of tools for simple post-processing and preparing the
  1089.    trace for further analyses.  We conclude with a brief description of
  1090.    our analysis tools that are applied to this minimally processed data.
  1091.  
  1092. 5.3.1. Trace Library
  1093.  
  1094.    The trace library provides an interface that applications can use to
  1095.    simplify interaction with network traces, including functions to
  1096.    read, write, and print trace records.  The trace reading and writing
  1097.    functions manage byte swapping as well as optional integrity checking
  1098.    of the trace as it is read or written.  The library employs a
  1099.    buffering strategy that is optimized to trace I/O. Trace printing
  1100.    facilities are provided for both debugging and parsing purposes.
  1101.  
  1102. 5.3.2. Processing Tools
  1103.  
  1104.    The processing tools are generally the simplest set of tools we have
  1105.    built around the trace format.  By far the most complicated one is
  1106.    the modulation-trace transformation tool described in Section 5.2.3;
  1107.    the remainder are quite simple in comparison.  The first such tool is
  1108.    a parser that prints the content of an entire trace.  With the trace
  1109.    library, it is less than a single page of C code.  For each record,
  1110.    it prints the known data fields along with their textual names,
  1111.    followed by all the optional properties and values.
  1112.  
  1113.    Since many analysis tasks tend to work with records of the same type,
  1114.    an enhanced version of the parser can split the trace data by tracks
  1115.    into many files, one per track.  Each line of the output text files
  1116.    contains a time stamp followed by the integer values of all the
  1117.    optional data in a track entry; in this form traces are amenable to
  1118.    further analysis be scripts written in an interpreted language such
  1119.  
  1120.  
  1121.  
  1122. Noble, et. al.               Informational                     [Page 20]
  1123.  
  1124. RFC 2041                 Mobile Network Tracing             October 1996
  1125.  
  1126.  
  1127.    as perl.
  1128.  
  1129.    We have developed a small suite of tools providing simple functions
  1130.    such as listing all the track headers and changing the trace
  1131.    description as they have been needed.  With the trace library, each
  1132.    such tool is trivial to construct.
  1133.  
  1134. 5.3.3. Analysis Tools
  1135.  
  1136.    Analysis tools depend greatly on the kind of information an
  1137.    experimenter wants to extract from the trace; our tools show our own
  1138.    biases in experimentation.  Most analyses derive common statistical
  1139.    descriptions of traces, or establish some correlation between the
  1140.    trace data sets.
  1141.  
  1142.    As early users of the trace format and collection tools, we have
  1143.    developed a few analysis tools to study the behavior of the wireless
  1144.    networks at our disposal.  We have been particularly interested in
  1145.    loss characteristics of wireless channels and their relation to
  1146.    signal quality and the position of the mobile host.  In this section,
  1147.    we briefly present some of these tools to hint at the kind of
  1148.    experimentation possible with our trace format.
  1149.  
  1150.    Loss characteristics are among the most interesting aspects of
  1151.    wireless networks, and certainly among the least well understood.  To
  1152.    shed light on this area, we have created tools to extract the loss
  1153.    information from collected traces; in addition to calculating the
  1154.    standard parameters such as the packet loss rate, the tool also
  1155.    derives transitional probabilities for a two-state error model.
  1156.  
  1157.    This has proven to be a simple yet powerful model for capturing the
  1158.    burstiness observed in wireless loss rates due to fading signals.  To
  1159.    help visualize the channel behavior in the presence of mobility, our
  1160.    tool can replay the movement of the mobile host while plotting the
  1161.    loss rate as it changes with time.  It also allows us to zoom in the
  1162.    locations along the path and obtain detailed statistics over
  1163.    arbitrary time intervals.
  1164.  
  1165.    Our traces can be further analyzed to understand the relationship
  1166.    between channel behavior and the signal quality.  For wireless
  1167.    devices like the NCR WaveLAN, we can easily obtain measurements of
  1168.    signal quality, signal strength, and noise level.  We have developed
  1169.    a simple statistical tool to test the correlation between measured
  1170.    signal and the loss characteristics.  Variations of this test are
  1171.    also possible using different combinations of the three signal
  1172.    measurements and the movement of the host.
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Noble, et. al.               Informational                     [Page 21]
  1179.  
  1180. RFC 2041                 Mobile Network Tracing             October 1996
  1181.  
  1182.  
  1183.    The question of just how mobile such mobile hosts are can also be
  1184.    investigated through our traces.  Position data are provided by
  1185.    traces that either involved GPS or user-supplied positions with our
  1186.    trace collection tools.  This data is valuable for comparing and
  1187.    validating various mobility prediction algorithms.  Given adequate
  1188.    network infrastructure and good signal measurements, we can determine
  1189.    the mobile location within a region that is significantly smaller
  1190.    than the cell size.  We are developing a tool to combine position
  1191.    information and signal measurement from many traces to identify the
  1192.    "signal quality" signature for different regions inside a building.
  1193.    Once this signature database is completed and validated, it can be
  1194.    used to generate position information for other traces that contain
  1195.    only the signal quality information.
  1196.  
  1197. 6. Related Work
  1198.  
  1199.    The previous work most relevant to mobile network tracing falls into
  1200.    two camps.  The first, chiefly exemplified by tcpdump [7] and the BSD
  1201.    Packet Filter, or BPF [8], collect network traffic data.  The second,
  1202.    notably Delayline [6], and the later Probe/Fault Injection Tool [4],
  1203.    and the University of Lancaster's netowrk emulator [3], provide
  1204.    network modulation similar to PaM.
  1205.  
  1206.    There are many systems that record network packet traffic; the de
  1207.    facto standard is tcpdump, which works in concert with a packet
  1208.    filter such as BPF. The packet filter is given a small piece of code
  1209.    that describes packets of interest, and the first several bytes of
  1210.    each packet found to be interesting is copied to a buffer for tcpdump
  1211.    to consume.  This architecture is efficient, flexible, and has
  1212.    rightly found great favor with the networking community.
  1213.  
  1214.    However, tcpdump cpatures only traffic data.  It records neither
  1215.    information concerning mobile networking devices nor mobile host
  1216.    location.  Rather than adding seperate software components to a host
  1217.    running tcpdump to capture this additional data, we have chosen to
  1218.    follow an integrative approach to ease trace file administration.  We
  1219.    have kept the lessons of tcpdump and BPF to heart; namely copying
  1220.    only the information necessary, and transferring data up to user
  1221.    level in batches.  It may well pay to investigate either
  1222.    incorporating device and location information directly into BPF, or
  1223.    taking the flexible filtering mechanism of BPF and including it in
  1224.    our trace collection software.  For the moment, we do not know
  1225.    exactly what data we will need to explore the properties of mobile
  1226.    networks, and therefore do not exclude any data.
  1227.  
  1228.    There are three notable systems that provide packet modulation
  1229.    similar to PaM. The earliest such work is Delayline, a system
  1230.    designed to emulate wide-area networks atop local-area ones; a goal
  1231.  
  1232.  
  1233.  
  1234. Noble, et. al.               Informational                     [Page 22]
  1235.  
  1236. RFC 2041                 Mobile Network Tracing             October 1996
  1237.  
  1238.  
  1239.    similar to PaM's.  The most striking difference between Delayline and
  1240.    PaM is that Delayline's emulation takes place entirely at the user-
  1241.    level, and requires applications to be recompiled against a library
  1242.    emulating the BSD socket system and library calls.  While this is a
  1243.    portable approach that works well in the absence of kernel-level
  1244.    source access, it has the disadvantage that not all network traffic
  1245.    passes through the emulation layer; such traffic may have a profound
  1246.    impact on the performance of the final system.  Delayline also
  1247.    differs from PaM in that the emulated network uses a single set of
  1248.    parameters for each emulated connection; performance remains fairly
  1249.    constant, and cannot change much over time.
  1250.  
  1251.    The Lancaster network emulator was designed explicitly to model
  1252.    mobile networks.  Rather than providing per-host modulation, it uses
  1253.    a single, central server through which all network traffic from
  1254.    instrumented applications passes.  While this system also does not
  1255.    capture all traffic into and out of a particular host, it does allow
  1256.    modulation based on multiple hosts sharing a single emulated medium.
  1257.    There is a mechanism to change the parameters of emulation between
  1258.    hosts, though it is fairly cumbersome.  The system uses a
  1259.    configuration file that can be changed and re-read while the system
  1260.    is running.
  1261.  
  1262.    The system closest in spirit to PaM is the Probe/Fault Injection
  1263.    Tool.  This system's design philosophy allows an arbitrary protocol
  1264.    layer -- including device drivers -- to be encapsulated by a layer
  1265.    below to modulate existing traffic, and a layer above to generate
  1266.    test traffic.  The parameters of modulation are provided by a script
  1267.    in an interpreted language, presently Tcl, providing considerable
  1268.    flexibility.  However, there is no mechanism to synthesize such
  1269.    scripts -- they must be explicitly designed.  Furthermore, the use of
  1270.    an interpreted language such as Tcl limits the use of PFI to user-
  1271.    level implementations of network drivers, and may have performance
  1272.    implications.
  1273.  
  1274. 7. Future Work
  1275.  
  1276.    This work is very much in its infancy; we have only begun to explore
  1277.    the possible uses for mobile network traces.  We have uncovered
  1278.    several areas of further work.
  1279.  
  1280.    The trace format as it stands is very IP-centric.  While one could
  1281.    imagine using unknown IP addresses for non-IP hosts, while using
  1282.    header-only properties to encode other addressing schemes, this is
  1283.    cumbersome at best.  We are looking into ways to more conveniently
  1284.    encode other addressing schemes, but are content to focus on IP
  1285.    networks for the moment.
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Noble, et. al.               Informational                     [Page 23]
  1291.  
  1292. RFC 2041                 Mobile Network Tracing             October 1996
  1293.  
  1294.  
  1295.    Two obvious questions concerning wireless media are the following.
  1296.    How does a group of machines perform when sharing the same bandwidth?
  1297.    How asymmetric is the performance of real-world wireless channels?
  1298.    While we do have tools for merging traces taken from multiple hosts
  1299.    into a single trace file, we've not yet begun to examine such
  1300.    multiple-host scenarios in depth.  We are also looking into
  1301.    instrumenting wireless base stations as well as end-point hosts.
  1302.  
  1303.    Much of our planned work involves the PaM testbed.  First and
  1304.    foremost, many wireless channels are known to be asymmetric;
  1305.    splitting the replay trace into incoming and outgoing modulation
  1306.    entries is of paramount importance.  We would like to extend PaM to
  1307.    handle multiple emulated interfaces as well as applying different
  1308.    modulation parameters to packets from or to different destinations.
  1309.    One could also imagine tracing performance from several different
  1310.    networking environments, and switching between such environments
  1311.    under application control.  For example, consider a set of traces
  1312.    showing radio performance at various altitudes; an airplane simulator
  1313.    in a dive would switch from high-altitude modulation traces to low-
  1314.    altitude ones.
  1315.  
  1316.    Finally, we are anxious to begin exploring the properties of real-
  1317.    world mobile networks, and subjecting our own mobile system designs
  1318.    to PaM to see how they perform.  We hope others can make use of our
  1319.    tools to do the same.
  1320.  
  1321. Acknowledgements
  1322.  
  1323.    The authors wish to thank Dave Johnson, who provided early pointers
  1324.    to related work and helped us immeasurably in RFC formatting.  We
  1325.    also wish to thank those who offered comments on early drafts of the
  1326.    document:  Mike Davis, Barbara Denny, Mark Lewis, and Hui Zhang.
  1327.    Finally, we would like to thank Bruce Maggs and Chris Hobbs, our
  1328.    first customers!
  1329.  
  1330.    This research was supported by the Air Force Materiel Command (AFMC)
  1331.    and ARPA under contract numbers F196828-93-C-0193 and DAAB07-95-C-
  1332.    D154, and the State of California MICRO Program.  Additional support
  1333.    was provided by AT&T, Hughes Aircraft, IBM Corp., Intel Corp., and
  1334.    Metricom.  The views and conclusions contained here are those of the
  1335.    authors and should not be interpreted as necessarily representing the
  1336.    official policies or endorsements, either express or implied, of
  1337.    AFMC, ARPA, AT&T, Hughes, IBM, Intel, Metricom, Carnegie Mellon
  1338.    University, the University of California, the State of California, or
  1339.    the U.S. Government.
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Noble, et. al.               Informational                     [Page 24]
  1347.  
  1348. RFC 2041                 Mobile Network Tracing             October 1996
  1349.  
  1350.  
  1351. Security Considerations
  1352.  
  1353.    This RFC raises no security considerations.
  1354.  
  1355. Authors' Addresses
  1356.  
  1357.    Questions about this document can be directed to the authors:
  1358.  
  1359.    Brian D. Noble
  1360.    Computer Science Department
  1361.    Carnegie Mellon University
  1362.    5000 Forbes Avenue
  1363.    Pittsburgh, PA  15213-3891
  1364.  
  1365.    Phone:  +1-412-268-7399
  1366.    Fax:    +1-412-268-5576
  1367.    EMail: bnoble@cs.cmu.edu
  1368.  
  1369.  
  1370.    Giao T. Nguyen
  1371.    Room 473 Soda Hall #1776 (Research Office)
  1372.    University of California, Berkeley
  1373.    Berkeley, CA  94720-1776
  1374.  
  1375.    Phone:  +1-510-642-8919
  1376.    Fax:    +1-510-642-5775
  1377.    EMail: gnguyen@cs.berkeley.edu
  1378.  
  1379.  
  1380.    Mahadev Satyanarayanan
  1381.    Computer Science Department
  1382.    Carnegie Mellon University
  1383.    5000 Forbes Avenue
  1384.    Pittsburgh, PA  15213-3891
  1385.  
  1386.    Phone:  +1-412-268-3743
  1387.    Fax:    +1-412-268-5576
  1388.    EMail: satya@cs.cmu.edu
  1389.  
  1390.  
  1391.    Randy H. Katz
  1392.    Room 231 Soda Hall #1770 (Administrative Office)
  1393.    University of California, Berkeley
  1394.    Berkeley, CA  94720-1770
  1395.  
  1396.    Phone:  +1-510-642-0253
  1397.    Fax:    +1-510-642-2845
  1398.    EMail: randy@cs.berkeley.edu
  1399.  
  1400.  
  1401.  
  1402. Noble, et. al.               Informational                     [Page 25]
  1403.  
  1404. RFC 2041                 Mobile Network Tracing             October 1996
  1405.  
  1406.  
  1407. References
  1408.  
  1409.     [1] Chen, J. B., and Bershad, B. N.  The Impact of Operating System
  1410.         Structure on Memory System Performance.  In Proceedings of the
  1411.         14th ACM Symposium on Operating System Principles (Asheville,
  1412.         NC, December 1993).
  1413.  
  1414.     [2] Dahlin, M., Mather, C., Wang, R., Anderson, T., and Patterson,
  1415.         D.  A Quantitative Analysis of Cache Policies for Scalable
  1416.         Network File Systems.  In Proceedings of the 1994 ACM SIGMETRICS
  1417.         Conference on Measurement and Modeling of Computer Systems
  1418.         (Nashville, TN, May 1994).
  1419.  
  1420.     [3] Davies, N., Blair, G. S., Cheverst, K., and Friday, A.  A
  1421.         Network Emulator to Support the Development of Adaptive
  1422.         Applications.  In Proceedings of the 2nd USENIX Symposium on
  1423.         Mobile and Location Independent Computing (April 10-11 1995).
  1424.  
  1425.     [4] Dawson, S., and Jahanian, F.  Probing and Fault Injection of
  1426.         Dependable Distributed Protocols.  The Computer Jouranl 38, 4
  1427.         (1995).
  1428.  
  1429.     [5] Gloy, N., Young, C., Chen, J. B., and Smith, M. D.  An Analysis
  1430.         of Dynamic Branch Prediction Schemes on System Workloads.  In
  1431.         The Proceedings of the 23rd Annual International Symposium on
  1432.         Computer Architecture (May 1996).
  1433.  
  1434.     [6] Ingham, D. B., and Parrington, G. D.  Delayline:  A Wide-Area
  1435.         Network Emulation Tool.  Computing Systems 7, 3 (1994).
  1436.  
  1437.     [7] Jacobson, V., Leres, C., and McCanne, S.  The Tcpdump Manual
  1438.         Page.  Lawrence Berkeley Laboratory, Berkeley, CA.
  1439.  
  1440.     [8] McCanne, S., and Jacobson, V.  The BSD Packet Filter:  A New
  1441.         Architecture for User-level Packet Capture.  In Proceedings of
  1442.         the 1993 Winter USENIX Technical Conference (San Deigo, CA,
  1443.         January 1993).
  1444.  
  1445.     [9] Mills, D. L.  Improved Algorithms for Synchronizing Computer
  1446.         Network Clocks.  IEEE/ACM Transactions on Networking 3, 3 (June
  1447.         1995).
  1448.  
  1449.    [10] Mummert, L. B., Ebling, M. R., and Satyanarayanan, M.
  1450.         Exploiting Weak Connectivity for Mobile File Access.  In
  1451.         Proceedings of the 15th Symposium on Operating System Prinicples
  1452.         (Copper Mountain, CO, December 1995).
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458. Noble, et. al.               Informational                     [Page 26]
  1459.  
  1460. RFC 2041                 Mobile Network Tracing             October 1996
  1461.  
  1462.  
  1463.    [11] Nelson, M. N., Welch, B. B., and Ousterhout, J. K.  Caching in
  1464.         the Sprite Network File System.  ACM Transactions on Computer
  1465.         Systems 6, 1 (February 1988).
  1466.  
  1467.    [12] Schilit, B., Adams, N., Gold, R., Tso, M., and Want, R.  The
  1468.         PARCTAB Mobile Computing System.  In Proceedings of the 4th IEEE
  1469.         Workshop on Workstation Operating Systems (Napa, CA, October
  1470.         1993), pp. 34--39.
  1471.  
  1472.    [13] Uhlig, R., Nagle, D., Stanley, T., Mudge, T., Sechrest, S., and
  1473.         Brown, R.  Design Tradeoffs for Software-Managed TLBs.  ACM
  1474.         Transactions on Computer Systems 12, 3 (August 1994).
  1475.  
  1476.    [14] Want, R., Hopper, A., Falcao, V., and Gibbons, J.  The Active
  1477.         Badge Location System.  ACM Transactions on Information Systems
  1478.         10, 1 (January 1992), 91--102.
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514. Noble, et. al.               Informational                     [Page 27]
  1515.  
  1516.