rfc1172.txt

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

TXT
1,758
字号

   Rx

      The Rx process maintains the counters In-Rx-Packets-Ctr and In-
      Rx-Octets-Ctr which are used to measure the amount of data which
      is received by the inbound link.  When Rx processes a Link-



Perkins & Hobby                                                [Page 17]

RFC 1172                  PPP Initial Options                  July 1990


      Quality-Report packet, it inserts the values of these counters
      into the Counters section of the packet.  Again, the question of
      when to update the counters, before or after they are inserted
      into a Link-Quality-Report packet, is left as an implementation
      decision which MUST be made consistently the same way.

   Demux

      The Demux process demultiplexes packets for the various protocols.
      The Demux process MUST follow the Rx process so that packets are
      counted in the order received from the link.

3.4.  Counters

   In order to fill in the Counters section of a Link-Quality-Report
   packet, Link Quality Monitoring requires the implementation of one
   8-bit unsigned, and four 32-bit unsigned, monotonically increasing
   counters.  These counters may be reset to any initial value before
   the first Link-Quality-Report is transmitted, but MUST NOT be reset
   again until LCP has left the Open state.  Counters wrap to zero when
   their maximum value is reached (for 32 bit counters: 0xffffffff + 1 =
   0).

   Out-Identifier-Ctr

      Out-Identifier-Ctr is an 8-bit counter maintained by the Link-
      Manager process which increases by one for each transmitted Link-
      Quality-Report packet.

   Out-Tx-Packets-Ctr

      Out-Tx-Packets-Ctr is a 32-bit counter maintained by the Tx
      process which increases by one for each transmitted Data Link
      Layer packet.

   Out-Tx-Octets-Ctr

      Out-Tx-Octets-Ctr is a 32-bit counter maintained by the Tx process
      which increases by one for each octet in a transmitted Data Link
      Layer packet.  All octets which are included in the FCS
      calculation MUST be counted, as should the FCS octets themselves.
      All other octets MUST NOT be counted.

   In-Rx-Packets-Ctr

      In-Rx-Packets-Ctr is a 32-bit counter maintained by the Rx process
      which increases by one for each successfully received Data Link
      Layer packet.  Packets with incorrect FCS fields or other problems



Perkins & Hobby                                                [Page 18]

RFC 1172                  PPP Initial Options                  July 1990


      MUST not be counted.

   In-Rx-Octets-Ctr

      In-Rx-Octets-Ctr is a 32-bit counter maintained by the Rx process
      which increases by one for each octet in a successfully received
      Data Link Layer packet.  All octets which are included in an FCS
      calculation MUST be counted, as should the FCS octets themselves.
      All other octets MUST NOT be counted.

3.5.  Measurements, Calculations, State Variables

   In order to fill in the Measurements section of a Link-Quality-Report
   packet, Link Quality Monitoring requires the Link-Manager process to
   make a number of calculations and keep a number of state variables.
   These calculations are made, and these state variables updated, each
   time a Link-Quality-Report packet is received from the inbound link.

   In-Tx-LQRs

      In-Tx-LQRs is an 8-bit state variable which indicates the number
      of Link-Quality-Report packets which the peer had to transmit in
      order for the local end to receive exactly one LQR.  In-Tx-LQRs
      defines the length of the "period" over which In-Tx-Packets, In-
      Tx-Octets, In-Rx-Packets, and In-Rx-Octets were measured.  In-Tx-
      LQRs is calculated by subtracting Last-In-Id from the received
      Identifier.  If more than 255 LQRs in a row are lost, In-Tx-LQRs
      will be ambiguous since the Identifier field and all state
      variables based on it are only 8 bits.  It is assumed that the
      Link Quality Monitoring policy will be robust enough to handle
      this case (it should probably close down the link long before this
      happens).

   Last-In-Id

      Last-In-Id is an 8-bit state variable which stores the value of
      the last received Identifier.  Last-In-Id should be updated after
      In-Tx-LQRs has been calculated.

   In-Tx-Packets

      In-Tx-Packets is a 32-bit state variable which indicates the
      number of packets which were transmitted on the inbound link
      during the last period.  In-Tx-Packets is calculated by
      subtracting Last-Out-Tx-Packets-Ctr from the received Out-Tx-
      Packets-Ctr.





Perkins & Hobby                                                [Page 19]

RFC 1172                  PPP Initial Options                  July 1990


   Last-Out-Tx-Packets-Ctr

      Last-Out-Tx-Packets-Ctr is a 32-bit state variable which stores
      the value of the last received Out-Tx-Packets-Ctr.  Last-Out-Tx-
      Packets-Ctr should be updated after In-Tx-Packets has been
      calculated.

   In-Tx-Octets

      In-Tx-Octets is a 32-bit state variable which indicates the number
      of octets which were transmitted on the inbound link during the
      last period.  In-Tx-Octets is calculated by subtracting Last-Out-
      Tx-Octets-Ctr from the received Out-Tx-Octets-Ctr.

   Last-Out-Tx-Octets-Ctr

      Last-Out-Tx-Octets-Ctr is a 32-bit state variable which stores the
      value of the last received Out-Tx-Octets-Ctr.  Last-Out-Tx-
      Octets-Ctr should be updated after In-Tx-Octets has been
      calculated.

   In-Rx-Packets

      In-Rx-Packets is a 32-bit state variable which indicates the
      number of packets which were received on the inbound link during
      the last period.  In-Rx-Packets is calculated by subtracting
      Last-In-Rx-Packets-Ctr from the received In-Rx-Packets-Ctr.

   Last-In-Rx-Packets-Ctr

      Last-In-Rx-Packets-Ctr is a 32-bit state variable which stores the
      value of the last received In-Rx-Packets-Ctr.  Last-In-Rx-
      Packets-Ctr should be updated after In-Rx-Packets has been
      calculated.

   In-Rx-Octets

      In-Rx-Octets is a 32-bit state variable which indicates the number
      of octets which were received on the inbound link during the last
      period.  In-Rx-Octets is calculated by subtracting Last-In-Rx-
      Octets-Ctr from the received In-Rx-Octets-Ctr.

   Last-In-Rx-Octets-Ctr

      Last-In-Rx-Octets-Ctr is a 32-bit state variable which stores the
      value of the last received In-Rx-Octets-Ctr.  Last-In-Rx-Octets-
      Ctr should be updated after In-Rx-Octets has been calculated.




Perkins & Hobby                                                [Page 20]

RFC 1172                  PPP Initial Options                  July 1990


   Measurements-Valid

      Measurements-Valid is a 1-bit boolean state variable which
      indicates whether or not the In-Tx-Packets, In-Tx-Octets, In-Rx-
      Packets, and In-Rx-Octets state variables contain valid
      measurements.  These measurements cannot be considered valid until
      two or more Link-Quality-Report packets have been received on the
      inbound link.  This bit should be reset when LCP reaches the Open
      state and should be set after the receipt of exactly two LQRs.

3.6.  Link-Quality-Report Packet Format

   A Summary of the Link-Quality-Report packet format is shown below.
   The fields are transmitted from left to right.  The Code, Identifier,
   Length, and Magic-Number fields make up the normal LCP Link
   Maintenance packet header; the In-Tx-LQRS, Last-In-Id, V, In-Tx-
   Packets, In-Tx-Octets, In-Rx-Packets, In-Rx-Octets fields contain
   digested absolute measurements; and the Out-Tx-Packets-Ctr, Out-Tx-
   Octets-Ctr, In-Rx-Packets-Ctr, and In-Rx-Octets-Ctr fields contain
   raw relative counts.  Note that as transmitted over the link, this
   packet format does not include the In-Rx-Packets-Ctr and In-Rx-
   Octets-Ctr fields which are logically appended to the packet by the
   Rx process after reception on the inbound link.




























Perkins & Hobby                                                [Page 21]

RFC 1172                  PPP Initial Options                  July 1990


    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Magic-Number                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  In-Tx-LQRs   |   Last-In-Id  |           Reserved          |V|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         In-Tx-Packets                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         In-Tx-Octets                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         In-Rx-Packets                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         In-Rx-Octets                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Out-Tx-Packets-Ctr                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Out-Tx-Octets-Ctr                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /
   /
   /
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        In-Rx-Packets-Ctr                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        In-Rx-Octets-Ctr                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Code

      12 for Link-Quality-Report.

   Identifier

      The Identifier field is one octet and indicates the sequence
      number for this Link-Quality-Report. The Identifier field is
      copied from the Out-Identifier-Ctr counter on transmission.  On
      reception, the Identifier field is used to calculate In-Tx-LQRs
      and is then stored in Last-In-Id.

      The Link-Quality-Report Identifier sequence number space MUST be
      separate from that of all other LCP packets; for example,
      transmission of an LCP Echo-Request must not cause the Out-
      Identifier-Ctr counter to be incremented.





Perkins & Hobby                                                [Page 22]

RFC 1172                  PPP Initial Options                  July 1990


   Length

      The Length field is two octets and indicates the length of the LQM
      packet including the Code, Identifier, Length and all defined
      fields. Octets outside the range of the length field should be
      treated as Data Link Layer padding and should be ignored on
      reception.  In order for the correct In-Tx-Octets and In-Rx-Octets
      values to be calculated, Link-Quality-Reports MUST be consistently
      transmitted with the same amount of padding.

   Magic-Number

      The Magic-Number field is four octets and aids in detecting
      looped-back links.  Unless modified by a Configuration Option, the
      Magic-Number MUST always be transmitted as zero and MUST always be
      ignored on reception. If Magic-Numbers have been negotiated,
      incoming LQM packets should be checked to make sure that the local
      end is not seeing its own Magic-Number and thus a looped-back
      link.

   In-Tx-LQRs

      The In-Tx-LQRs field is one octet and indicates the number of
      periods covered by the Measurements section of this Link-Quality-
      Report.  The In-Tx-LQRs field is copied from the In-Tx-LQRs state
      variable on transmission.

   Last-In-Id

      The Prev-In-Id field is one octet and indicates the age of the
      Measurements section of this Link-Quality-Report. The Last-In-Id
      field is copied from the Last-In-Id field on transmission.  On
      reception, the Last-In-Id field may be compared with the Out-
      Identifier-Ctr to determine how many, if any, outbound Link-
      Quality-Reports have been lost.

   V

      The V field is 1 bit and indicates whether or not the Measurements
      section of this Link-Quality-Report is valid.  The V field is
      copied from the Measurements-Valid state variable on transmission.
      If the V field is not set to 1, then the In-Tx-LQRs, Last-In-Id,
      In-Tx-Packets, In-Tx-Octets, In-Rx-Packets and In-Rx-Octets fields
      should be ignored.

   Reserved

      The Reserved field is 15 bits and is intended to pad the remaining



Perkins & Hobby                                                [Page 23]

RFC 1172                  PPP Initial Options                  July 1990


      packet fields to even four-octet boundaries for the convenience of
      hardware implementations. The Reserved field should always be

⌨️ 快捷键说明

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