跳到主要内容

TCP 的网络测量计划

5.1 用户级诊断​

我们设想有一个程序,用来对给定的 TCP 进行测试,使其循环经历多种状态:在各种连接上打开、关闭和传输。该程序将收集统计数据,并一般地尝试检测偏离 TCP 功能规范的情况。显然,被测试的本地站点和某个拥有经过认证的 TCP 的站点都需要有这个程序的一份副本。因此我们还必须为这个用户级诊断程序制定规范。

这一切需要有主端和从端,这样主端可以告诉从端测试中出了什么问题。

5.2 单连接测量​

Round trip delay times

   Time from moment the packet is sent by the TCP to the time that
   the ACK is received by the TCP.

   Time from the moment the USER issues the SEND to the time that the
   USER gets the successful return code.

      Note: packet size should be used to distinguish from one set of
      round trip times and another.

      Network destination, and current configuration and traffic load
      may also be issues of importance that must be taken into
      account.

      What if the destination TCP decides to queue up ACKs and send a
      single ACK after a while? How does this affect round trip
      statistics?

      What about out of order arrivals and the bunched ACK for all of
      them?

      The histogram of round trip times include retransmission times
      and these must be taken into account in the analysis and
      evaluation of the collected data.

      Packet size statistics

   Histogram of packet length in both directions on the full duplex
   connection.

   Histogram of letter size in both directions.

Measure of disorderly arrival

   Distance from the first octet of arriving packet to the left
   window edge. A histogram of this measure gives an idea of the out
   of order nature of packet arrivals. It will be 0 for packets
   arriving in order.

Retransmission Histogram

Effective throughput

   This is the effective rate at which the left edge of the window
   advances. The time interval over which the measure is made is a
   parameter of the measurement experiment. The shorter the interval,
   the more bursty we would expect the measure to be.

   It is possible to measure effective data throughput in both
   directions from one TCP by observing the rate at which the left
   window edge is moving on ACK sent and received for the two
   windows.

   Since throughput is largely dependent upon buffer allocation and
   window size, we must record these values also. Varying window for
   a fixed file transmission might be a good way to discover the
   sensitivity of throughput to window size.

Output measurement

   The throughput measurement is for data only, but includes
   retransmission. The output rate should include all octets
   transmitted and will give a measure of retransmission overhead.
   Output rate also includes packet format overhead octets as well as
   data.

Utilization

   The effective throughput divided by the output rate gives a
   measure of utilization of the communication connection.

Window and buffer allocation measurements

   Histogram of letters outstanding, measured at the instant of SEND
   receipt by TCP from user or at instant of arrival of a letter for
   a receiving user.

   Buffers in use on the SEND side upon packet departure into the
   net; buffers in use on the RECEIVE side upon delivery of packet
   into a USER Buffer.

5.3 多连接测量​

Statistics on User Commands sent to the local TCP

Statistics of error or success codes returned [histogram of each type
of error or return response]

Statistics of control bit use

Counter for each control bit over all packets emitted by the TCP
and another for packets accepted

Count data carrying packets

Count ACK packets with no data

Error packets distribution by error type code received from the net
and sent out into the net

5.4 测量的实现思路​

我们把测量过程视为发生在 TCP 内部、但可从外部控制的事情。可以用 TCP 所拥有的一个众所周知的套接字来接受控制命令,用以选择要收集的一个或多个测量类别。数据将被定期发送到某个指定的远端套接字,由其吸收以供日后处理,方式与目前 ARPANET 的 IMP 所采用的相同。每个测量类别都有自己的数据分组格式,以便使解析和分析数据的工作更容易。

我们会把对 TCP 测量控制的访问限制在少数指定站点[如 NMC、SU-DSL、BBN]。这很容易做到,只需在部分指定的远端套接字上建立监听控制连接即可。