Skip to main content

Annex A.3 The Power of the Header Error Detection Function

 A.3  The Power of the Header Error Detection Function

  A.3.1  General

   The form of the checksum used for PDU header error detection is such
   that it is easily calculated in software or firmware using only two
   additions per octet of header, yet it has an error detection power
   approaching (but not quite equalling) that of techniques (such as
   cyclic polynomial checks) which involve calculations that are much
   more time- or space-consuming. This annex discusses the power of this
   error detection function.

   The checksum consists of two octets, either of which can assume any
   value except zero. That is, 255 distinct values for each octet are
   possible. The calculation of the two octets is such that the value of
   either is independent of the value of the other, so the checksum has
   a total of 255 x 255 = 65025 values. If one considers all ways in
   which the PDU header might be corrupted as equally likely, then there
   is only one chance in 65025 that the checksum will have the correct
   value for any particular corruption. This corresponds to 0.0015  of
   all possible errors.

   The remainder of this annex considers particular classes of errors
   that are likely to be encountered. The hope is that the error
   detection function will be found to be more powerful, or at least no
   less powerful, against these classes as compared to errors in
   general.

  A.3.2  Bit Alteration Errors

   First considered are classes of errors in which bits are altered, but
   no bits are inserted nor deleted. This section does not consider the
   case where the checksum itself is erroneously set to be all zero;
   this case is discussed in section A.3.4.

   A burst error of length b is a corruption of the header in which all
   of the altered bits (no more than b in number) are within a single
   span of consecutively transmitted bits that is b bits long. Checksums
   are usually expected to do well against burst errors of a length not
   exceeding the number of bits in the header error detection parameter
   (16 for the PDU header). The PDU header error detection parameter in
   fact fails to detect only 0.000019  of all such errors, each distinct
   burst error of length 16 or less being considered to be equally
   likely. In particular,
   it cannot detect an 8-bit burst in which an octet of zero is altered
   to an octet of 255 (all bits = 1) or vice versa. Similarly, it fails
   to detect the swapping of two adjacent octets only if one is zero and
   the other is 255.

   The PDU header error detection, as should be expected, detects all
   errors involving only a single altered bit.

   Undetected errors involving only two altered bits should occur only
   if the two bits are widely separated (and even then only rarely). The
   PDU header error detection detects all double bit errors for which
   the spacing between the two altered bits is less than 2040 bits = 255
   octets. Since this separation exceeds the maximum header length, all
   double bit errors are detected.

   The power to detect double bit errors is an advantage of the checksum
   algorithm used for the protocol, versus a simple modulo 65536
   summation of the header split into 16 bit fields. This simple
   summation would not catch all such double bit errors. In fact, double
   bit errors with a spacing as little as 16 bits apart could go
   undetected.

  A.3.3  Bit Insertion/Deletion Errors

   Although errors involving the insertion or deletion of bits are in
   general neither more nor less likely to go undetected than are all
   other kinds of general errors, at least one class of such errors is
   of special concern. If octets, all equal to either zero or 255, are
   inserted at a point such that the simple sum CO in the running
   calculation (described in Annex C) happens to equal zero, then the
   error will go undetected. This is of concern primarily because there
   are two points in the calculation for which this value for the sum is
   not a rare happenstance, but is expected; namely, at the beginning
   and the end. That is, if the header is preceded or followed by
   inserted octets all equal to zero or 255 then no error is detected.
   Both cases are examined separately.

   Insertion of erroneous octets at the beginning of the header
   completely misaligns the header fields, causing them to be
   misinterpreted. In particular, the first inserted octet is
   interpreted as the network layer protocol identifier, probably
   eliminating any knowledge that the data unit is related to the
   ISO 8473 Protocol, and thereby eliminating any attempt to perform the
   checksum calculation or invoking a different form of checksum
   calculation. An initial octet of zero is reserved for the Inactive
   Network Layer Protocol. This is indeed a problem but not one which
   can be ascribed to the form of checksum being used. Therefore, it is
   not discussed further here.

   Insertion of erroneous octets at the end of the header, in the
   absence of other errors, is impossible because the length field
   unequivocally defines where the header ends. Insertion or deletion of
   octets at the end of the header requires an alteration in the value
   of the octet defining the header length. Such an alteration implies
   that the value of the calculated sum at the end of the header would
   not be expected to have the dangerous value of zero and consequently
   that the error is just as likely to be detected as is any error in
   general.

   Insertion of an erroneous octet in the middle of the header is
   primarily of concern if the inserted octet has either the value zero
   or 255, and if the variable CO happens to have the value zero at this
   point. In most cases, this error will completely destroy the parsing
   of the header, which will cause the data unit to e discarded. In
   addition, in the absence of any other error, the last octet of the
   header will be thought to be data. This in turn will cause the header
   to end in the wrong place. In the case where the header otherwise can
   parse correctly, the last field will be found to be missing. Even in
   the case where necessary, the length field is the padding option, and
   therefore not necessary, the length field for the padding function
   will be inconsistent with the header length field, and therefore the
   error can be detected.

  A.3.4  Checksum Non-calculation Errors

   Use of the header error detection function is optional. The choice of
   not using it is indicated by a checksum parameter value of zero. This
   creates the possibility that the two octets of the checksum parameter
   (neither of which is generated as being zero) could both be altered
   to zero. This would in effect be an error not detected by the
   checksum since the check would not be made. One of three
   possibilities exists:

    1)  A burst error of length sixteen (16) which sets the entire
    checksum to zero. Such an error could not be detected; however, it
        requires a particular positioning of the burst within the
        header. [A calculation of its effect on overall detectability of
        burst errors depends upon the length of the header.]

    2)  All single bit errors are detected. Since both octets of the
        checksum field must be non-zero when the checksum is being used,
        no single bit error can set the checksum to zero.

    3)  Where each of the two octets of the checksum parameter has a
        value that is a power of two, such that only one bit in each
        equals one (1), then a zeroing of the checksum parameter could
        result in an undetected double bit error. Furthermore, the two
        altered bits have a separation of less than sixteen (16), and
        could be consecutive. This is clearly a decline from the
        complete detectability previously described.

   Where a particular administration is highly concerned about the
   possibility of accidental zeroing of the checksum among data units
   within its domain, then the administration may impose the restriction
   that all data units whose source or destination lie within its domain
   must make use of the header error detection function. Any data units
   which do not could be discarded, nor would they be allowed outside
   the domain. This protects against errors that occur within the
   domain, and would protect all data units whose source or destination
   lies within the domain, even where the data path between all such
   pairs crosses other domains (errors outside the protected domain
   notwithstanding).