Вы находитесь на странице: 1из 20

CAN WE TRUST IN HDLC ?

D . Fiorini l , M . Chiani 2 , V . Tra1li 2 , C . Salati t

t Alcatel Telettra - the authors are now with Italtel, via degli Agresti 4, 40123 Bologna, Ital y
2DEIS Universita' di Bologna, viale Risorgimento 2, 40100 Bologna, Ital y

ABSTRACT : in spite of the theoretical error detecting capability of its CRC, the actua l
degree of data integrity provided by HDLC is quite low .
The paper gives a quantitative assessment of HDLC's deficiencies and of their reasons ,
paying particular attention to actual applications of the HDLC family of standards .
Finally, we look at some strategies that have been suggested to allow the use of HDLC i n
the most demanding applications .

1. INTRODUCTIO N
HDLC is probably the most widespread data link protocol [IS089a, IS089b, IS090] : it is used as LAPB-X .2 5
[CCIT85] in packet switched data networks, as LAPD in ISDN and TMN (Telecommunion Management Network )
[CCI88a, CCI88b], and as SDLC it is part of IBM SNA and of Intel Bitbus, a widely used network architecture fo r
industrial applications [IBM79, Inte84] . Through PPP it has also become an Internet standard protocol [Perk89] .
Despite the success, its use in critical applications such as process control and 'decontrol has been so severel y
criticized that ad hoc protocols have been standardized [Funk78, SeRi80, Funk82 . IEC89] : a main reason of criticis m
has been HDLC vulnerability to transmission errors .
It is however hard to think that HDLC may be kept out of critical applications, for instance because they ma y
conveniently use packet switched public data networks (PSPDN) . Therefore it is important to have a clea r
understanding of HDLC deficiencies, and of methods to confront them .
It is also important to understand how protocols and line encoding methods affect the theoretical error detectin g
properties of different frame check sequences when we want to compare them [Flet82, Naka88] .
This paper presents a summary and a pragmatic view of results that are sparse and in some cases may be hardl y
accessible [Funk78, SeRi80, Cole, FiSa92, ChTr93] . It gives also some original results on specific HDLC application s
of high practical interest :
• networks with NRZI line encoding . Unlike NRZ or Manchester, NRZI uses a differential encoding/decodin g
process and therefore is memory based : the signal that represents a bit depends also on the preceeding bit .
NRZI, in conjunction with HDLC, represents the most effective self clocking line encoding, and is therefor e
widely used in bandwidth constrained applications ;
• octet aligned networks, where the number of bits between opening and closing flag of a frame must be multiple o f
eight : this additional constraint to the standard is typical of most implementations, including LAPB and SDLC ,
and is relevant since it increases 'significantly the data integrity characteristics of the protocol ;

ACM SIGCOMM -61 — Computer Communication Review


networks where interframe time fill is implemented by transmitting an HDLC idle sequence (or by no t
transmitting anything if the physical layer provides a steady 1 signal) rather than flags . A frame is closed by 1
flag before the idle sequence, and if this flag is lost the frame is aborted (discarded) : this is typical of networks
with a half-duplex and/or multipoint physical layer, as in most telecontrol and data acquisition applications .
Finally, the paper discusses some strategies that have been suggested to overcome the HDLC fragility, and shows how ,
often and until recently, this fragility has not been taken into account in the design of networks that make use of
HDLC based data links .

1 .1 . Data Integrit y
The noise characteristics of a data transmission link can be described by the average relative number of erroneous bits ,
or Bit Error Rate (BER) of the link . Process and telecontrol applications may work in env ironments where BER> 10 1 4 .
Protocols are introduced to improve the reliability of a link by detecting and recovering (through retransmission )
errors . A measure of the reliability of a protocol is its Residual Error Rate (RER), defined as the number of undetecte d
wrong messages divided by the total number of messages received . Generally RER is an increasing function of BER :
[Fuji85] shows an exception to this rule and some HDLC related exceptions are shown in [Funk82], but in all case s
their practical effect is small since they occur for very high BER (>10- 3) and/or very short frames (<128 bits) .
IEC (the International Electrotechnical Commission) has defined 3 data Integrity Classes (I1, 12, 13) for telecontro l
data transmission, related to the reliability requirements of different types of messages (e .g . commands, measures, . . . )
[IEC89] . Fig . 1 shows the upper limits of RER as a function of BER for these Classes . Since diagrams are logarithmi c
the slope of the curves for sufficiently low BER represents the Hamming Distance (HD) required to protocols : HD> 2
for Class Ii, and HD>4 for Classes 12 and 13 .

Figure 1 : IEC Data Integrity Classes : upper limits of RER as a function of channel errors rate .

-1 5

0
I-1
-2 0

- 25

I3

- 30
-8 -7 -6 -5 -4 -2
Log (BER)

ACM SIGCOMM -62-- Computer Communication Review


1.2. HDLC Dialects


HDLC is a broad-scoped standard, providing "a guideline and a framework in which to develop and design specifi c
protocols" [Ca r180] : not only it allows different procedure elements and classes, but also quite different frame formats .
This has led to the development of several dialects (or derived standards) claiming conformance to HDLC but hearin g
scarce similarities with each other [Calr80] : to name some, CCITT LAP, LAPB and LAPD, ANSI ADCCP, IB M
SDLC, Internet PPP, each with its own subdialects .
The basic frame structure is always the same [IS089a] :

F C [I] FCS F
a F = flag sequence, 8 bits with value 0111111 0
• A = address fiel d
C = control fiel d
a I = information field (not always present )
e FCS = frame checking sequenc e
but several va riants are possible . The address field may be fixed (1 byte) or variable length, the control field (normall y
1 byte) may he extended to accomodate modulo-128 sequence numbers, the FCS, which is of cyclic redundancy chec k
(CRC) type, may be 16 or 32 bits .
Interfrane time till may be implemented either by a continuous sequence of flags, or by an idle sequence (a string of 1
of at least 15 bits : the physical level might also provide a stable 1 in the absence of signal) . Idle interframe is use d
when the physical level is half-duplex, or in case of multipoint links : the closing flag is needed by the receiver t o
detect the end of frame, but following flags are useless, so in this case we assume that the closing flag is followed b y
the address field of a new frame or by an idle sequence .

Some HDLC dialects like SDLC, or most of their implementations (like LAPB of real PSPNDs), require a frame to h e
an integral number of octets : a frame which is not octet aligned is discarded as erroneous, independently of the FCS .
hnplementations of HDLC networks may also differ in the line encoding of bits . Many baseband techniques (such as
NRZ, NRZI, Manchester . etc .) may be used to implement the physical level of HDLC networks . Bandpass technique s
do not introduce anything new, so they will not be considered here .
An encoding method may be with or without memory . In the second case the signal that encodes a bit depends only o n
the hit itself . In the first case it depends also on the previous bit . An example of rnemoryless encoding is NRZ : I and 0
may be typically represented respectively by constant high and low voltage levels . NRZI is a memory based encodin g
method : it represents a 1 as no level change and a 0 as a change . A string of Is is encoded as a constant signal by bot h
NRZ and NRZI, whilst a string of Os is a constant signal with NRZ and an alternating level signal with NRZI .
The choice of the par ticular line encoding method in real networks depends on several practical issues :
a Compatibility or standardization : for PSPDN, X .2 .5 specifies that the physical level must use NRZ [CCIT85] .
® Bandwidth constraints : Manchester must sometimes be avoided because its bandwith requirement are twice a s
high than those of NRZ and NRZI .
e Clock recovery : NRZI may he used to recover clock information from the data stream, avoiding the explici t
transmission of bit synchronization information and the related loss of bandwith . Clock recovery is achieve d
through a phase adjustment of the local clock whenever an edge is detected and HDLC guarantees that inside a
frame no string of contiguous 1-bits is longer than 5 : in NRZI a 0-bit causes a level change, therefore edges in a
data stream cannot he separated by more than 5 bits .
NRZI, in conjunction with HDLC, results in a self-clocking encoding, whilst NRZ is not, since a long string of 0 -
bits may lead to the loss of synchronization : NRZI is the most efficient solution whenever no explicit bi t
synchronization is provided and, at the same time, bandwith constraints are strict .

ACM SIGCOMM -63-- Computer Communication Review


We will consider frames with address and control fields of 8 bits and, mainly, a 16-bit FCS since the 32-bit FCS is no t
allowed by the most important HDLC dialects and is not widely supported by HDLC oriented controllers .
Four network configurations will be considered, corresponding to two pairs of options :

1. a network may be octet aligned or not ;


2. the line coding method may be memoryless or not (NRZ and NRZI will be taken as the related paradigms) .
The interframe time fill method will appear to be irrelevant from the standpoint of data integrity .

1 .3 . Error Detection Mechanisms


We assume that error detection is performed only through the FCS and through frame length constraints : for instance ,
it is not considered that error detection may occur because the HDLC procedures reveal an illegal control field (this ,
provides a pessimistic estimate of RER since 34 out of 256 configurations of the control field are illegal) . When thi s
assumption is too pessimistic, the case is treated explicitly .
With these hypotheses the error generation and detection processes are described in Fig . 2 . Here and throughout the
paper N is the frame length, including the FCS, before bit stuffing, while Ns is the frame length after bit stuffing .
Each bit error can be created by adding 1 modulo-2 to an original bit . So, the received frame can be obtained from th e
transmitted frame by adding a bit stream, called error pattern, having the same length of the frame (Ns) .
We assume an equiprobable, memoryless channel error events distribution, which is easy to analyze even if it is not a n
accurate approximation of the behaviour of most real channels (Binary Syrmnetric Channel Model of [HBL75]) .

1 .4 . Properties of HDLC's FC S
The 16-bit FCS is generated using the CCITT V .41 polynomial [1] :

g(x)=x 16 +x 12 +x 5 +1=(x+1) g'(x)= (x+1)•(x 15 +x 14 +x 13 +x 12 +x4 +x 3 +x2 +x+1 )

This CRC type FCS guarantees an HD of 4 for all frames of length less or equal to the so called natural length of th e
polynomial, thus it can detect any erroneous frame of length up to 2 15 bits with up to 3 wrong bits . More precisely ,
each message is a codeword of a shortened, distance-4 cyclic Hamming code generated by g(x) .
Because (x+l) is a factor of the generator polynomial, the HDLC FCS provides a parity check : any odd number o f
erroneous bits will always be detected . An erroneous frame may be undetected only if it contains an even number o f
erroneous bits (so that the parity bit in the FCS is ineffective) and the other 15 FCS bits fail to detect the error .
Moreover, the FCS is able to detect any single burst of errors not longer than 16 bits . In fact no error pattern of th e
form :

E(x) = ak . xk + ak- l . xk-1 + . . . + ak-m . xk-m = xk-m . (a k . x m + . . . + a k-m+ 1 . x + a k-m )


with 0<m<15 is divided by g(x) for any value of the coefficients a l .
The g'(x) polynomial is optimal with respect to the Hamming bound [BBC87] : no CRC of less than 15 bits ca n
provide HD=3 for frames of length up to 2 15 -1 bits, The (x+l) factor adds a bit to the FCS and extends the HD to 4
through an additional parity check .
In case of m erroneous bits (1n even and m>4), the error detecting power of the FCS is, approximately [FiSa92] ,
related only to its length . Therefore the probability that an erroneous frame is not detected is roughly 2- 15 (the parit y
check is obviously satisfied) . Pr{FCS fails} is directly related to the probability of 4 bit errors taking place, since th e
contribution of larger numbers of errors (6, 8, . . .) is negligible for a sufficiently small BER . So, an asymptotica l
approximation of Pr{FCS fails} is :

ACM SIGCOMM -64– Computer Communication Review


N
(1) Pr{FCS fails} = 2- 15 • ( 4 ) BER 4 • (1 - BER) N - 4

If we ignore higher order errors, a better approximation is given by [ChTr93] :

(1') Pr{FCS fails} = A 4 • BER4 (1-BER) N - 4


where A 4 is the number of codewords generated by g(x) having distance 4 from the all-zero codeword (A 4 depends on
N : see Table 1 for some of its values) . The difference with (1) is negligible (order of 1%) and this is true also for th e
corresponding expressions given in [SeRi80, AgIv92, Fuji85] ([Fuji85] takes into account the effects of cod e
shortening, i .e . of using frames of length strictly lower than the natural length of the FCS) .
Because the HDLC FCS relates RER to BER 4 , it seems that we have a good starting point for satisfying even the mos t
demanding IEC requirements .
Unfortunately we will see that the framing and bit stuffing mechanism of HDLC make (1) and (1') not applicable . Bu t
they may also be inapplicable because of line coding techniques : when NRZI is used, independently of HDLC relate d
problems that make these expressions inapplicable for any line encoding . For NRZI, because of memory, every
channel error affects 2 adjacent bits producing a pair of erroneous bits (the term channel error is used here t o
distinguish transmission errors from their interpretation as hit error patterns) . If we neglect some tail effects an d
contiguous channel errors, the error pattern will always present an even number of erroneous bits . This makes the
FCS parity check ineffective : however, although 2 channel errors produce 4 (2 pairs of) bit errors, the corrupted fram e
is always detected [ChTr93] . In fact no error pattern of the form :
E(x) _ (x k+l + x k ) + (xrn+l + x m ) _ x m • (x + 1) (x k-m + 1 )

is divided by g'(x) .
It can be shown [ChTr93] that the code behaves, with respect to channel error events, as a distance-3 Hamming cod e
of length 2 15-1 : FCS may fail with 3 or more channel errors . So, using NRZI, we have :

(1 " ) Pr{FCS fails} ` B 3 • CER 3 (1-CER) N - 3 + B 4 CER4 • (l -CER) N- 4


where CER is the channel er ror rate, B 3 is the number of codewords in the distance-3 Hamming code generated b y
g'(x) having distance 3 from the all-zero codeword (see Table 1 for its value) . The values of B 3 show that more than 3
channel errors are necessary to generate an undetectably erroneous frame for frame lengths up to 182 bits . Th e
contribution of a larger number of channel errors (5, 6, is negligible for a sufficiently small BER .
a .)

Table I : values of coefficients A 4 and B 3 of Table 2: values of coefficients Cl and C 2


P {FCS fails} (expressions (1') and (1")) as a of expression (3) in the different cases .
function of the frame length . It is obviousl y
A4 (N)=B 4 (N+ I) leading subfrane trailing subfrarn e
NRZ 22 816/6 2
frame length A4 B3 B4
NRZI 5782/124 2342/6 2
in bits
32 16 0 15
64 84 0 81
96 259 0 25 2 C2 leading subfrane trailing subfram e
128 574 0 56 0 NRZ 1/31 1/3 1
256 5344 74 528 0
512 83617 651 82949 NRZI_ 9/248 9/248 T
ACM SIGCOMM -65– Computer Communication Revie w

The asymptotic equation BER=2 . CER holds for NRZI whilst, for NRZ, BER=CER . In the remaining of the paper w e
will consistently use the term BER to mean CER .
The intrinsic weakness of the FCS is named in this paper reason E of the failure to detect an erroneous frame . W e
have :

(2) Pr {reason El (1-B ER) 16 • Pr { FCS fails }


where the first factor accounts for the probability of valid opening and closing flags (see next) .

1.5 . Framing and Bit Stuffin g


The RER to BER relationships just established apply if the FCS check is performed on the bit string obtained from th e
original message concatenated with the FCS . Unfortunately this is not always the case in HDLC .
Beginning and end of frames are marked in HDLC by a unique 8-bit pattern (01111110) called flag, without an y
explicit frame length field . To avoid the simulation of a flag within a frame, HDLC provides an escape mechanis m
called bit stuffing : the transmitter inserts a 0 (insertion 0-bit) after any 5 contiguous 1-bits in the frame, and th e
receiver deletes any 0-bit following 5 contiguous 1-bit (if there are more than 5 contiguous 1-bit this will be a flag, a n
abort or an idle sequence) .
A single error that changes any one of 5 contiguous 1-bit causes the hit stuffing mechanism to fail, so the following 0
is not deleted, and a (one bit) longer frame is received . An error can also lead to a 0-bit deletion after an erroneu s
sequence of 5 contiguous 1-bits . If the single error changes an insertion 0-bit into a 1, a flag may be simulated, and a
shortened frame is received ; a flag can be simulated by a single error even without interference with bit stuffing .
Because of framing (frame boundary recognition) and bit stuffing a single bit error may become a landslide : the
received frame is not derived from the original one by any number of bit inversions (the received frame may not b e
obtained from the transmitted one through the addition of an error pattern), and the properties of the FCS may be lost .
Because a single channel error may change a legal frame into another, the actual HD provided by HDLC is only 1
instead of 4 (or 3 with NRZI) [Funk82] .
When computing the RER to BER relationship for HDLC we must consider not only the intrinsic weakness of the FC S
but also its failures due to the combined effects of transmission errors and framing or bit stuffing .
A secondary effect of bit stuffing is that, since it introduces a 0-bit after any string of 5 contiguous 1-bit, a n
equiprobable source becomes non equiprobable . For an equiprobable memoryless source it is Pr{ 01 = 0 .5 and Pr{ l } =
0 .5, where Pr{X} is the probability of event X . Bit stuffing introduces a 0-bit every average 62 bits of the messag e
[Funk82], therefore, after bit stuffing, we have Pr{ 0) = 32/63 and Pr{ 1} = 31/63 and the transmission of a frame o f
length N takes Ns=N . (63/62) bits .
The probabilities of all possible configurations of 8 contiguously transmitted bits are also changed [Funk82] (e .g .
Pr(11111111)=O), and this affects the probability that a single hit error can simulate a flag within a frame ( a
mathematical discussion of all issues appears in [ChTr93, FiSa92], that are available on demand from the authors) .

2. UNDETECTED ERROR S
It has been shown that there are 2 modes in which HDLC fails to detect an erroneous frame :
1. because of the intrinsic limits of the FCS capabilities ,
2. because the combined effects of transmission errors and framing or bit stuffing offset the FCS capabilities .

ACM SIGCOMM -66-- Computer Communication Review


It will be shown that, for all HDLC implementations and for most significant values of BER and of the frame length ,
the first failure mode is less important than the second, and thus that the HDLC error detection mechanism is rathe r
ineffective ,
The second failure mode is related to 3 types of errors, whose relative importance depends on the particular HDL C
implementation :
Simulation of a flag within a frame ;
Loss of an Opening or Closing Flag (OF, CF) ;
Insertion or deletion of a bit within a frame .
All these HDLC specific errors can occur either alone or in combination, with each other or with normal bit errors . I n
the following, as a particularly relevant example of double error, we have examined the case o f
simultaneous insertion and deletion of a 0-bit within a frame .

2.1 . Simulation of a Flag (Reason A )


This event occurs when a flag is simulated inside the frame because of one or more bit errors, and at least one of th e
resulting shortened subframes represents a valid frame [Funk82] . We will consider only the case of a flag simulated b y
a single channel error .
If NRZ is used, a single channel error results in a single bit error . Therefore, the parity of all bits between the original
OF and CF is changed, and because the number of 1-bits in the simulated flag is even, at least one of the 2 derive d
subframes will have a wrong parity, and thus will be detected as erroneous .
If NRZI is used the previous argument doesn't hold, because a single channel error results in a pair of bit errors, an d
thus the global parity, and the parity of both derived subframes is preserved . However, it can be shown that, because o f
the intrinsic properties of the HDLC FCS, at most one of the two derived subframes may appear to be legal [ChTr93] .
In both cases if a single error simulates a flag inside a frame, thus generating 2 derived subframes, at most one of
these may be legal : from now on we will consider only this single subframe .
It has been shown that, for the subframe to be undetected, the lost prolog or epilog of the frame must be longer than 1 6
bits [ChTr93, FiSa92] : because an HDLC frame must be at least 32 bits long, frames not longer than 48 (=32+16) bit s
are immune from this problem .
Moreover, in case of octet aligned transmission there are (N-32-16)/8 possible positions for a simulated flag ,
otherwise the number of possible positions is (N-32-16) .
The probability that a shortened subframe is not detected is given by the following asymptotical, union bound ,
approximation, which holds both for NRZ and NRZI, and for leading and trailing subframes [ChTr93] :

(3) Pr(undetected subframe} = (1-BER) 16 (C l . 2- 23 + C 2 . 2- 16 . (N-56)) • BER (1-BER) Ns - 1

where constants C I and C2 are different in the different cases : their values are shown in Table 2 (a sketch of the proo f
of (3) is shown in the Appendix : other formulae of the paper can be proved along the same lines) .
The first factor is the probability of valid OF and CF (single error hypothesis), and the last two the probability tha t
exactly one channel error affects the frame : these or similar factors are present in all formulae .
The intermediate factor accounts for the probability that a single bit error changes 8 contiguous bits into a flag an d
that the FCS does not reveal this error . It also takes into account the probability to appear in the frame, after hi t
stuffing, of bit patterns that may be transformed by a single error into a flag .
The first term of the intennediate factor accounts for a simulated flag near the original OF (trailing subframe) or C F
(leading subframe), and the second for a simulated flag in the remaining (N-56) possible positions .

ACM SIGCOMM -67– Computer Communication Review


If the octet constraint is introduced C I becomes 0 and the resulting expression must be divided by 8 . (3) becomes :
N-5 6
(3') Pr{undetected subframe} (1-BER) 16 . (C 2 . 2- 16 . ( + 1)) • BER (1-BER) Ns - 1
8

The probability that a single bit error simulates a flag in the middle of a frame, and that one of the two subframes i s
not detected is :

(4) Pr { event Al = Pr { undetected leading subframe } + Pr {undetected trailing subframe }

The first order approximation of (4) shows that Pr{ event Al is directly related to BER and to the frame length .
Although leading and trailing subframes are almost symmetrical from the standpoint of FCS and length checks, they
are very different from the standpoint of the correctness of the logical link control protocol . The leading subframe ha s
address and protocol header equal to those of the original frame, so that they are obviously correct . For the trailin g
frame not to be revealed, beside a correct FCS, it must have a proper address, a proper control field, and an overal l
congruent frame structure (e .g . an RR-frame must be exactly 32 bits long, including the CRC [IS089a]) : address an d
control field are derived from information field bits of the original frame, so that their value is unpredictable .
For instance the address has a probability 1/128 to be valid in a point-to-point configuration, and depends on th e
number of secondary stations in a multipoint configuration . The 8 bits that represent the HDLC control field may
have one of the unused (illegal) 34 configurations [IS089a] ; moreover the sequence numbers or a legal control field
may be inconsistent with the state of the connection .
Therefore we may expect that, due to the implicit error revealing capabilities of the HDLC link control procedures, a n
erroneous trailing subframe has a much lower probability to be undetected than the leading subframe . The fact that w e
have related error detection only to the FCS and to length constraints yields a pessimistic estimate . A more realisti c
probability of undetected erroneous frames due to the simulation of a flag approximately coincides with the probabilit y
that the leading subfrarne remains undetected .

2.2 . Loss of an Opening or Closing Flag (Reason B)


This event occurs when the OF or the CF are lost because of one or more bit errors . We consider only the mos t
significant case in which no additional errors occur beside the loss of the flag (for which a single bit error suffices) .
The frame that is actually received depends on the interframe time fill strategy adopted and on the possible adjacenc y
of another frame, separated only by the lost flag .
In case of idle interframe, with no adjacent frames, if the OF or the CF are lost, then the frame is not received at all .
In case of flag interframe, with no adjacent frames, the received frame is 8 bits longer than the original one . However,
it can be shown that if we extend a legal frame with a prolog or an epilog of up to 11 bits, whatever the value of thes e
bits, the resulting frame is recognized as erroneous [ChTr93, FiSa92] . Therefore the loss of a flag is always revealed .
In case of loss of the flag separating 2 adjacent frames we receive a single frame, union of the two and of the corrupte d
flag . The minimum length bit string that, inserted between 2 legal frames, allows the creation of a joint legal frame i s
15 [ChTr93] : therefore, however corrupted the flag may be, the resulting frame is recognized as erroneous .
In conclusion, no single error that implies the loss of an OF or CF may remain undetected .

2.3. Insertion of a 0 Bit (Reason C')


This event occurs when a 0-bit generated by the bit stuffing mechanism is inserted in the frame (actually no t
discarded) because of at least an error in a sequence of 5 contiguous 1-bit . We consider only the case of a single error .
For octet aligned transmission (both Idle and Flag interframe, and for all line codings) only a simultaneous erroneou s
deletion of a 0-bit may generate an undetectable erroneous frame (see next sections) .

ACM SIGCOMM -68 – Computer Communication Review


If no octect constraint is present, all depends on the line encoding method . A single channel error generates a singl e
bit error in NRZ and a pair of bit errors in NRZI : in the second case the parity of the frame is preserved, in the fi r st i t
is not . Because the HDLC FCS provides a parity check, a single channel error causing the insertion of a 0-bit wil l
always be detected if NRZ is used : the same may not be guaranteed, and in fact is not true, if NRZI is used .
For NRZI and for frames larger than 40 bits, the probability of an undetected 0-insertion is given by [ChTr93] :

(5) Pr{event C' } = ( 1-BER) 16 • (5 .3 . 10- 4 + 2 .9 . 10- 6 • (N-40)) . BER . (1-BER) Ns- 1
where the first factor accounts for valid OF and CF, the last factor for the fact that a single channel error affects th e
frame, and the intermediate factor accounts for the average number of bit stuffing 0-hits present in the frame that ma y
be inserted by the error, and for the probability that the corrupted frame is not detected .
The first order approximation of (5) shows that Pr(event C'} is roughly directly related to BER and to the fram e
length, but that the dependency on the frame length is significant only for frames larger than 256 bits .
An approximate value of Pr(event C') can be computed by counting the probability of an insertion and multiplying i t
by 2- 15 , which is the probability that the modified frame is not revealed by the FCS if CRC properties a re lost :
6.N
(5') Pr(event C') = (1-BER) 16 • BER . (1-BER)Ns-1 . 2-1 5
62

(5 ' ) is an acceptable approximation of (5), especially for long frames (for frames of 1024 hits the difference is abou t
10%, The two expressions are asimptotically identical), and this shows that in fact all properties of the CRC are lost i n
case of insertion of a 0-bit [FiSa92] .

2 .4 . Deletion of a 0 Bit (Reason C" )


This event occurs when a 0-bit is interpreted as an escape bit and deleted from the frame because of a precedin g
erroneously generated sequence of 5 contiguous 1-bits .We consider only the case of a single error .
The ar guments presented in the preceding section hold also in this case . which is complementary to the preceedin g
one : whenever a charnel error may insert a bit in a frame of n bits, the same error may delete a bit in a frame n+ l hits .
Obviously the number of frames of length n+ l is twice as large as that of frames of length n, and therefore th e
probability that a frame with a deleted 0-bit looks legal is half the probability of a frame with an inserted 0-bit .
For non octet aligned transmission using NRZI, and for frames lar ger than 41 bits it is
1
(6) Pr{eventC"} = (1-BER) 16 • (5 .3 . 10- 4 + 2 .9 . 10- 6 • (N-41)) • BER • (1-BER)Ns-1 .
2

2 .5 . Simultaneous Insertion and Deletion of a 0 bit (Reason D )


For octet aligned transmission events C' and C" must occur in equal number in order to simulate a valid frame . Th e
probability of 8 deletions or 8 insertions is negligible, so we consider only the case of one insertion and one deletion .
The exact analysis of this case is very difficult, but a good estimate is easily obtained in the hypotheses that the
insertion and deletion events are unrelated, and that all FCS properties are offset by these errors . The secon d
hypothesis is reasonable for what we said in the preceding sections, and both hypotheses apply better for long frames .
For NRZI we have therefore
6. N 1
(7) Pr{eventD} =(1-BER) 16 ( . BER) 2 . (1-BER)Ns-2 . 2-1 5
62 2

A simila r expression holds also in case of NRZ line encoding, and its value is given in [Funk821 . hl this cas e

ACM SIGCOMM -69-- Computer Communication Review


5 .N 1
(8) Pr{eventD} = (1-BER) 16 ( • BER) 2 — • (1-BER)Ns-2 . 2-1 5
62 2

The first order approximation of (7) and (8) shows that Pr{ event D } is directly related to BER 2 and to the square o f
the frame length .
Simultaneous insertion and deletion of a 0-bit is just an example of the several couple s of errors that may produce an
undetectably erroneous frame [ChTr93] . All these couples of errors relate RER to BER 2 . Another example is a doubl e
insertion with NRZ without octet constraint . Simultaneous insertion and deletion is particularly relevant because i t
makes ineffective any checks based on the frame length (also in higher protocol layers) .

2.6. A Comprehensive Case Analysis


An approximate RER to BER relationship is obtained from the preceding formulae by adding all contributions :

(9) RER = Pr { event A } + Pr { event C } + Pr { eventD } + Pr { reason E }


We have computed relation (9) for four different HDLC architectures (the interframe time fill policy is irrelevant) :
e Al : not octet aligned, NRZ line coding ,
• A2 : not octet aligned, NRZI line coding ,
• A3 : octet aligned, NRZ line coding ,
• A4 : octet aligned, NRZI line coding .
For architectures Al, A3, A4 reason C (insertion or deletion of a 0-bit) is uneffective, while reason D (simultaneou s
insertion and deletion) is always relevant .
Fig . 3 shows that, for all architectures, the effects of the intrinsic weakness of the FCS (reason E) are almost alway s
less relevant than the combined effects of BER, framing and bit stuffing (reasons A, C, D), except for very high BER .
Fig, 3a shows that for architecture Al reason A (flag simulation), related to framing, is dominant, and only fo r
extremely high (practically unrealistic) BER the intrinsic failure of the FCS becomes significant .
Fig, 3h shows that without the octet constraint the use of NRZI line coding is dangerous, since besides the problems o f
framing it introduces as a relevant factor the effects of bit stuffing : reason C (insertion or deletion of a 0-bit) is even
more important than reason A . Although related to BER 3 rather than to BER 4 reason E remains unrelevant .
The octet alignement constraint (architectures A3, A4, Fig . 3c, 3d) makes reasons C disappear also for NRZI lin e
encoding, and makes reason A become less significant because the simulated CF must itself be aligned . Reason D i s
always dominated by reason A . The difference between architectures A3 and A4 is in the relevance of the intrinsi c
weakeness of the FCS : for A3 it is unrelevant except for extremely high value of BER (near BER=10-3 ), whilst for A4 ,
although related only to BER 3 , it overcomes reason D and becomes significant around BER=10 4 .
In any case, for almost all practical cases, reason A is dominant, even if we consider that it may have bee n
overestimated by a factor of 2 (according to the argument presented at the end of section 2 .1) .
Fig . 4 shows that octet aligned architectures are much better than those without this constraint (at least a factor of 8 ,
actually a factor of 30 to 50 for NRZI) . Architecture A2 (NRZI, no octet alignement) performs very bad because it i s
the only one for which a single insertion or deletion of a 0-bit may generate undetectable frames : this shows that the
octet constraint, beside being convenient for implementations, allows much higher data integrity, especially in case o f
NRZI line encoding .
Fig . 4 shows also that architecture A3 (NRZ) is slightly better than architecture A4 (NRZI) : in practice this i s
especially noticeable for BER in the range 5 . 10-5 to 10- 3 , when reason E (intrinsic weakness of the FCS) is effectiv e
for architecture A4 but not for architecture A3 . For higher values of BER reason E becomes more relevant for A3 tha n
for A4, but in practice this is less important because communications would anyway be impossible .

ACM SIGCOMM -70 – Computer Communication Review


The range of BER for which A4 is perceptibly worse than A3 depends on the frame length : for N=128 the behavior o f
the two ar chitecture is the same for all relevant values of BER, but for N=256 the difference is already noticeable fo r
BER=10- 4 (remember that Pr{FCS fails-NRZI} is related to the third power of BER only for frames longer than 18 2
bits) . Unfortunately the range of BER for which A4 is perceptibly worse than A3 is typical of several supervisory an d
telecontrol applications that require the use of NRZI (e .g . the power line carier network of [IST92]) .
Even if HDLC does not achieve HD=2, Fig . 4 shows that it can conform to IBC Integrity Class I1 within a limited bu t
significant range of BER, depending on the HDLC implementation and, to some extent, on the maximum frame size .
Octet aligned architectures A3 and A4 are conformant to Class I1 for BER> 10 -6 even for frames of 1024 bits, and fo r
BER>10- 7 for frames of up to 128 hits . The conformance domain for non octet aligned architectures A l and A2 i s
more restricted by a factor of almost 100, for all frame lengths : fortunately these architectures are not very commo n
nowadays, and are not adopted in PSPDN .
HDLC can conform also to Class I2, but only for overly limited conditions : all architectures have similar performance s
because of the slope of the curve that defines Class I2 . HDLC does not conform to Class I3 for any range of BER .
Fig . 5 shows how the frame length affects different protocol architectures : only octet constrained ar chitectures are
considered . Class I2 is not achieved at BER=10- 4 even for frames of as few as 64 hits . Even if the behavior of 1-DL C
improves by shortening the maximum frame length, this strategy is of no use for BER<l0 -4 (at least from the
standpoint of conformance to LEC standards) .
Fig . 6 provides a better insight of the differences between octet aligned architectures A4 and A3 : they are significan t
only for high values of BER and of frame length, but remain fundamentally irrelevant in most practical cases . The
dependency of RER on the frame length is quite weak except for very high BER : it becomes noticeable only for short
frames (less than 200 bits), but very short frames may he impractical because of the high protocol overhead (32 hits ,
OF and CF for HDLC, but higher level protocols must also be taken into account) .

3. DISCUSSION
There are several ways to deal with the problems of HDLC, but some of them imply that conformance to the standa r d
is abandoned, which is often too expensive a price to pay . In other cases, though, conformance to the generic HDL C
standard may be deceptive .
If an application uses an existing network, this may not be modified : X .25 PSPDN uses LAPB, and al l
implementations are octet aligned . When the reliability provided by the data link layer is not sufficient, it can h e
increased at higher protocol levels .
We have so outlined three different strategies to deal with the fragility of HDLC, although the first two cannot be use d
in systems that a re connected to preexisting or open networks :
1. among the options allowed by the standard . we can select those that provide the highest reliability ;
2. the implementation may he non conformant to the standard ;
3. we can deal with the problem at a higher protocol level (e .g . the user can )

3 .1 . Standards
LAPB does not require octet alignement, but mandates the use of the NRZ line encoding . However, specifi c
implementations may require octet alignment and all X .25 PSPDN do it : this makes them as robust as HDLC can be .
SDLC allows only octet aligned frames (only a rchitectures A3 and A4 are conformant to it) . Since the difference
between the line encoding methods are minimal (in particular for BER<10 -5 ), also SDLC can be considered quit e
good . The octet constraint is important because it minimizes the effects of flag simulation and makes reason C (0-hi t
insertion or deletion) irrelevant when NRZ1 is used .

ACM SIGCOMM -71 — Computer Communication Review


3.2. Limiting the Maximum Frame Siz e


In all architectures the probability of undetected errors grows with the frame length, so the HDLC client can increas e
its confidence by limiting the packets size . Because the dominant failure reason (flag simulation) is directly related t o
the frame length by limiting the maximum size from 1024 to 128 bits the improvement is of an order of magnitude .
This strategy is compatible with existing networks and is especially suitable for control applications, where frames ar e
usually intrinsically short .
However, the increasing use of higher level protocols even in special purpose networks (e .g . [IST92]) makes very short
frames useless . Futhermore, this strategy has a very limited scope since, for instance, it appears effective only to reac h
Integrity Class I1 for values of BER in the range 10- 7 < BER<10 -6 , or to reach Integrity Class I2 for BER>10- 4 .

3 .3 . Increasing the FCS Lengt h


A 32-bit FCS has been adopted in Ethernet and in proposals for a standard fieldbus . HDLC allows the option of a 32 -
bit FCS but because of framing and bit stuffing the actual HD provided by a longer FCS is still 1, so that for BER-a 0
the asymptotic behaviour is of the same order : RER improves by a factor of about 2- 16 , quite significant for a wid e
range of BER.
Unfortunately a 32-bit FCS is not allowed by the most widespread I-IDLC dialects (LAPB and SDLC) . It is also not
generally supported by HDLC oriented components, and this can lead to implementation difficulties and inefficiencies .
Internet PPP, for instance, allows the 32-bit FCS, but indicates as normal the 16-bit FCS : in fact it gives a fas t
example implementation only of the 16-bit FCS algorithm [Perk89] .
Fig . 7 shows that a 32 bit-FCS would make HDLC conform to Integrity Class I2 for BER>10 -5 and for frames of
length up to 1024 bit . Conformance to Class I3 would only be reached for a larger BER and for shorter frames : fo r
instance, for BER=10 -4 conformance would only be reached for frames shorter than 128 bits .
In conclusion, while the move of PSPDNs from CRC-16 to CRC-32 should be encouraged, this solution is nowaday s
of limited applicability . Also, the problem of a better confonnance to IEC Integrity Classes remains unsolved .

3.4 . Introducing a Frame Length Informatio n


It has been suggested that HDLC could be modified so that each frame has a known length [Funk78] : this can be done
by adding redundancy in the frame format, for example a byte-count . This allows to detect errors that change th e
length of the frame, such as all those due to the combined effects of a single bit error and framing or hit stuffing . We
would so achieve HD=2 . The HD is not la rger, because 2 errors can produce a legal frame of the same length (e .g .
through a combined 0-insertion and 0-deletion) .
Because an error can simulate a flag in the middle of a frame, and thus create 2 derived frames, each of these must b e
protected by a byte count (which must therefore be present both at the beginning and at the end of the frame) .
Fig . 8 shows the effects of the introduction of a byte count on the different failure reasons : simulation of a CF become s
negligible, and the dominant reason is the simultaneous insertion/deletion of a 0-bit (except for high BER, whe n
reason E becomes significant, and this occurs first with NRZI) .
The effects of the byte count can be summarized as follows (Fig . 9) : a modified HDLC provides HD=2, and is full y
conformant to IEC Integrity Class I1 . Conformance to Class 12 is subject to BER and length constraints, but fo r
BER>10-4 can be achieved with frames of substantial size . Class I3 is never satisfied .
RER is more sensitive to the frame length than in standard HDLC because the dominant failure reason (simultaneou s
insertion/deletion of a 0-bit) is directly related to the square of the length : it is possible to improve RER by a factor o f
almost 10 -2 by reducing the frame length from 1024 to 128 bits .

ACM SIGCOMM -72- Computer Communication Review


This approach is obviously non HDLC conforrnant, but allows easy implementations through the use of HDL C
procedures, that need only ignore the byte count info, and of HDLC controllers . It may be appealing in proprietar y
networks [MiSa88] or dedicated standards [IEC89], when peculiar characteristics are anyway present (e .g . a no n
standard physical layer) . Unfortunately this strategy has not been adopted in the design of Internet 's PPP [Perk89] .
Another way to strongly delimit a frame is to require that it is closed by a single flag and by a minimum length idl e
period (in [Foxb88] a 4 bytes time) . This allows the detection of a simulated flag, but represents a major change t o
HDLC . Frame recognition is dealt with by HDLC controllers that do not request any particular epilogue, so thi s
change is not at all evolutionary, but yields a complete incompatibility with HDLC .
Improvements to standard HDLC (e .g . using fixed length frames) are discussed also in [Funk78, Funk82] .

3 .4 . Higher Level Protocol s


If there is a problem at the interface of layer k we can ask higher level protocols to deal with it . The presence of a
higher level protocol is an intrinsic safeguar since an undetected error in its header is likely to produce a protocol rese t
(e .g . an unused logical channel number or control field, or a wrong sequence number in the header of an X .25 packet) .
If the Network Layer interface shows an unacceptable error rate, error detection and recovery must be provided by th e
Transport Layer (e .g . ISO class 4 transport protocol [IS086]), At this time, however, applications built on top of a
complete OSI stack are quite uncommon : the normal configuration is that of enhanced performance architectures, a s
in MAP and Bitbus, where the application layer sits directly on top of the data link layer .
It is also common that OSI conformant protocol stack profiles based on X .25 rely only on the error detection capabilit y
provided by LAPB : ISO class 0 or 2 transport protocols, without error detection, are normally adopted [IS086] .
In these cases, the burden of an intolerably error prone data link is placed on the user itself . For instance, use r
messages may use a redundant encoding, so that undetected errors are unlikely to forge critical messages .
In all these cases the lower protocol layers are unaffected, so that these strategies are applicable also in open systems ,
or systems that make use of preexisting (e .g . public) networks .

4. CONCLUSION S
The paper has shown how the combined effects of transmission errors and of framing or bit stuffing preempt the erro r
detecting power of the HDLC FCS : RER decreases linearly with BER rather than with its fourth power, as it should b e
thanks to the properties of the CRC .
Also the absolute value of RER appears quite unsatisfactory if we consider the 16 bits version of the FCS that i s
adopted by the most important HDLC dialects and supported by several available HDLC controllers .
No practical, evolutionary way seems to exist, that can make HDLC implementions more robust while keepin g
conformance to the standard . The 32-bit FCS option is neither adopted, nor largely supported in practice, and all
mechanisms to strongly delimit a frame require substantial changes to the frame format and the protocol procedures .
The most feasible approach, although suitable only in particular cases, is to add length information to the frame .
Unfortunately the problems due to HDLC framing end escape mechanisms have been overlooked even in the design o f
recent protocols such as PPP [Perk89], where nothing has been done to improve data integrity characteristics (e .g .
along the lines discussed in section 3) : the use of the 32 bit-FCS is allowed but, for practical reasons, not mandated .
The most general approach to achieve higher data integrity in systems involving HDLC based (sub-)networks, is to le t
higher level protocols deal with the problem .

ACM SIGCOMM -73-- Computer Communication Review


This could be done by limiting the length of the frames (but this is not very effective), through a redundant encodin g
of user messages, or (and this should be the solution of choice) by explicit error detection and recovery in the Networ k
and/or Transport Layers : the last approach is often taken in internetworks, and is exemplified by the Internet approac h
and by the ISO Class 4 Transport Protocol [IS086] .
The use of ISO Transport Protocols of Classes 0 to 3 on top of X .25 PSPDN is quite general and widely accepted, eve n
if it is not convenient from the standpoint of data integrity, since none of these protocols includes error detection : the
provision of data integrity is thus delegated to the the FCS of the HDLG protocol LAPB . This network architecture
should therefore be discouraged .

5. REFERENCE S
[Aglv92] V .K . Agarwal, A . Ivanov, "Computing the Probability of Undetected Error for Shortened Cyclic Codes, "
IEEE Trans . on Communicatios, Vol . 40, No . 3, Mar 1992 .
[BBC87] S . Benedetto, E . Biglieri, V . Castellani, "Digital Transmission Theory, " Prentice-Hall, 1987 .
[Car180] D .E . Carlson, " Bit-Oriented Data Link Control Procedures," IEEE Trans . on Communications, Vol .
COM-28, No . 4, Apr 1980 .
[CCIT85] CCITT Recommendation X .25, " Interface between data terminal equipment (DIE) and data circuit -
terminating equipment (DCE) for terminals operating in the packet mode and connected to public dat a
networks by dedicated circuit," Red Book, Geneva, 1985 .
[CCI88a] CCITT Recommendation Q .920 (I .440), "ISDN user-network interface data link layer - General aspects, "
Blue Book, Vol . VI(III), Geneva, 1988 .
[CCI88b] CCITT Recommendation Q .921 (I .441), " ISDN user-network interface data link layer specification," Blu e
Book, Vol . VI(III), Geneva, 1988 .
[ChTr93] M . Chiani, V . Tralli, "Analysis of HDLC error detecting properties, " DEIS University of Bologna Tech .
Rep ., Jul 1992 .
[Cole] G .B . Cole, "The Use of Enhanced HDLC for Proway," Fisher Controls Ltd ., Leicester, England, workin g
paper IEC SC65A WG06 (Cole 3) .
[FiSa92] D . Fiorini, C . Salad, "An assessment of data integrity in HDLC," Alcatel Telettra Tech . Rep ., Jul 1992 .
[Flet82] J .G . Fletcher, "An Arithmetic Checksum for Serial Transmission," IEEE Trans . on Communications, Vol .
COM-30, No . 1, Jan 1982 .
[Foxb88] The Foxboro Company, "Foxboro Fieldbus Proposal," to ISA SP-50, Draft 1 .12, Feb 1988 .
[Fuji85] T . Fujiwara, et Al ., "On the Undetected Error Probability for Shortened Hamming Codes," IEEE Trans .
on Communications, Vol . COM-33, No . 6, Jun 1985 .
[Funk78] G . Funk, "Insufficiencies of HDLC-Communication in Process Control Systems," Brown, Bovery & Cie . ,
Baden, working paper IEC TC5, IEC SC65A WG96, Oct 1978 .
[Funk82] G . Funk, "Message Error Detecting Properties of HDLC Protocols, " IEEE Trans . on Conununications ,
Vol . COM-30, No . 1, Jan 1982 .
[HBL75] J .L . Hammond, J .E . Brown, S .S . Liu, " Development of a Transmission Error Model and an Error Contro l
Model," Rome Air Development Center, RADC-TR-75-138, May 1975 .
[IBM79] IBM, "Synchronous Data Link Control - General Information," Mar 1979 ,
[IEC89] IEC 870-5-1, "Telecontrol Equipment and Systems - Part 5 .1 : Transmission Frame Format," 1989 .
[Inte84] Intel, "Distributed Control Modules Databook," Intel Corp ., Santa Clara, Cal ., 1984 .

ACM SIGCOMM -74-- Computer Communication Review


[IS086] ISO IS-8073, "Information Processing Systems - Open Systems Interconnection - Connection Oriente d
Transport Protocol Specification," Jul 1986 .
[ISO89a] ISO IS-3309, "Information Processing Systems - Data Communication - High-Level Data Link Contro l
Procedures - Frame Structure, and ite Addenda", 1989 .
[ISO89b] ISO IS-4335, "Information Processing Systems - Data Communication - High-Level Data Link Contro l
Procedures - Elements of Procedures and its Addenda," 1989 .
[IS090] ISO IS-7809, "Information Processing Systems - Data Communication - High-Level Data Link Contro l
Procedures - Classes of Procedures," 1990 .

[IST92] P . Iaccarino, C . Salati, G . Torresi, "Transmissions and Communications on Distribution Line Carrie r
Systems to Support Automation Applications," 2nd Int . Congr . "Energy, Environment and Technological
Innovation, " Roma, Italy, Oct 1992 .
[MiSa88] G . Micheletti, C . Salati, " A Low-Cost Distributed Architecture for Telecommunication Applications, "
IEFF Micro, Vol . 7, No . 5, Oct 1988 .
[Naka88] A . Nakassis, "Fletcher's Error Detection Algorithm : how to implement it efficiently and how to avoid the
most common pitfalls," Computer Communication Review, Vol . 18, No . 5, Oct 1988 .

[Perk89] D . Perkins, "The Point-to-Point Protocol : A Proposal for Multi-Protocol Transmission of Datagrams Ove r
Point-to-Point Links, " RFC 1134, Nov 1989 .
[SeRi80] J . Selga, J . Rivera, "An analysis of the HDLC Protocol," working paper CIGRE SC35-WG0 1
'1'LLECONTROL, Sep 1980 .

Appendix : derivation of Pr{undetected subframe }


In this appendix the procedure leading to (3) is summarized . We consider the case of leading subframe : the extensio n
to the case of trailing subfrune (which can be dealt with in the same way) and other details can be found in [ChTr93 ,
FiSa92] . The procedure leading to (5) is also quite similar and is reported in [ChTr93] .
By representing each bit sequence containing N bits with a polynomial of degree N-1 or less with coefficients i n
GF(2), the transmitted frame can be thought a s

FLAG fs- t(x) h d-1(x ) FLA G

where the valid message, In N (x), is given b y


xd+c . f
(Al ) mN-1( x ) s-1(x ) + xd oc-1(x) + h d-1(x)
wit h

(A2) s+c+d= N
Because this is a transmitted valid message, it must satisfy the checking formula as defined in [ISO89a], and thu s

(A3) x16 . [xd+c . fs-1( x ) + xd ' oc-I(x ) + h d-l( x )] + xN . 115(x) + r 12 (x) v 0 (mod g( x ) )

where g(x) is the generator polynomial of (1) (x=y (mod z) is read "x is congruent to y modulo z" and means that th e
difference x-y is a multiple of z), and

(A4) 1 15( x ) = x I5 +x 14 + . . . +x+ 1

-75— Computer Communication Review


ACM SIGCOMM

(A5) r 12 (x) = x 12 + x + x 10 + x 8 + x 3 + x2 + x + 1 x 16 . 1 15 (x) (mod g( x ) )


both having (x+l) as a factor .
Due to errors affecting the o c_1 (x) term, the received message become s

FLAG FLAG hd-1( ) FLA G

where the middle flag can also be a longer legal interframe sequence .
If we apply the checking condition to polynomial f s_t (x) (the leading subframe) we have :
(A6) x16
. fs-1(x) + x s . 115(x) + r 12 (x) e 0 (mod(g( x ) )
and therefore :

(A7) x16 . [x d o c-1( x ) + h d-1( x )] + (xc+d +1) . r 12( x ) = 0 ( mod (g( x ) )

This is the condition that must be verified in order to have a legal leading subframe . If both (A7) and (A6) are true ,
then conditions (A3) and (A6) are also true .
The polynomial o c-1 (x), with c=8, is related to all possible bit sequences (pattern) which could produce, because of on e
or more channel errors, a simulated flag . Then, for each pattern, there are 16+c fixed coefficients in the left side o f
(A7) . Through a sequence of non obvious steps it can be shown that this equation has at most I solution (if it exists )
when d<16 or 2 d-16 solutions when d?16 . Equation (A6) has, indeed, at most 1 solution when s<16 or 2 s-16 solution s
when s>- 16 .
A single channel error can be enough to change a suitable sequence o c_1 (x) into a flag . The bit patterns of these
suitable sequences are listed in the Tables 3 and 4, toghether with their probability pk of occurrence within a fram e
evaluated as in [Funk82] (the two values of Pk take into account the fact that the first 0 may be inserted because of th e
bit stuffing mechanism or not), for the cases of NRZ and NRZI line coding techniques . Tables 3 and 4 show also th e
patterns after the bit stuffing .
Now, we have to check, in a exaustive way, for the existance of the single solutions of (A7) when d<16 having th e
patterns listed in tables . No solution of (A7) is found for c+d<_17 and the minimum valid length of a frame is 32 bits ,
i .e . s>_32 .
Bearing in mind the results of this search, the RER can be approximated b y
N-32- 8

(A8) RER p k • 8 kd . 2- d • BER (1-BER)Ns-1 . (1-BER) 1 6


d=9 k

where 8kd is the number of solutions of (A7) of length d+c relative to pattern k : for d<16 it can be at most I ; for d?1 6
it is equal to 2 d-1 6
Finally we obtain, for N>_56 ,
16

(A9) RER = Pk
gk d . 2-d + (N -56) . 2-16 . 1 Pk) • BER (l-BER) Ns - 1 (1-BER) 1 6
d=9 k i
where the two sums can be numerically evaluated, in the NRZ and NRZI cases, yielding coefficients C I and C 2 of (3) .

ACM SIGCOMM -76- Computer Communication Review


Pk P k after bit stuffing p with x=l p k with x=0


x0 1 1 1 1 1 0 0 01 1 1 1 1 0 1/(62 . 128) 1/25 6
x0 1 1 1 1 1 1 0 01 1 1 1 1 0 1/(62 . 128) 1/25 6
x1 01 1 1 1 0 0 10 1 1 1 1 0 1/(62 . 128) 1/25 6
x1 10 1 1 1 0 0 1 1 01 1 1 0 1/(62 . 128) 1/25 6
x1 1 1 01 1 0 0 1 1 10 1 1 0 1/(62 . 128) 1/25 6
x1 1 1 10 1 0 0 11 1 I 0 I 0 1/(62 . 128) 1/25 6
x1 1 I 1 1 00 0 1 1 11100 1/(62 . 128) 1/25 6
x1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 1/(62128) 1/256
Table 3 . Patterns Pk which could generate, after hit-stuffing and with an error, a flag in the NRZ case ;
pk= Pr(P k } are their probabilitie s

P P after bit stuff-mil — _ ; with x= 1 - 9 r , with x= 0


1 x 1 1 1 1 1 0 1 01 1 11 10 1/(31 . 128) 60/(62256 )
1x1 1 1 1 1 1 1 01 1 1 1 10 1/(31 . 128) 60/(62 . 256 )
x001111 0 0 00 1 1 1 10 1/(62 . 128) 1/25 6
x100111 0 0 10 0 1 1 10 1/(62 . 128) 1/25 6
x110011 0 0 1 1 0 01 10 1/(62 . 128) 1/25 6
x1 11001 0 0 11 1 00 10 1/(62 . 128) 1/25 6
x111100 0 0 1 1 1 10 00 1/(62 . 128) 1/25 6
x1 1 1 1 11 0 0 11 1 1 1 01 1/(62 . 128) 1/25 6
x11 1 1 11 1 0 1 1 1 1 1 1 1 1/(62 . 128) 1/25 6
Table 4 . Patterns Pk which could generate, after bit-stuffing and with an error, a flag in the NRZI case ;
p k = Pr{ Pk } are their probabilitie s

ACM SIGCOMM -77-- Computer Communication Revie w


data link protocol data unit generation

HDLC PDU

CRC generation

HDLC PDU CRC N bit s

bit stuffing

L framing J
HDLC PDU CRC Ns bit s

OF HDLC PDU CRC C F

I line encoding ]

noise + error patter n

line decoding

frame recognition
OF HDLC PD U CR C C- d
[HDLC PDU CRC Ns bit s

bit destuffing

HDLC PDU CRC N bit s

length constraints checks

HDLC PDU CRC N bit s

CRC check

LIDLC PD U

data link protocol data unit receptio n

Figure 2: Frame transmission and error generation processes .

ACM SIGCOMM -78- Computer Communication Review


Figure 3 : Contributions to RER of the different failur e Figure 4 : RER as a function of BER for different fram e
reasons, for frame length = 256, and for differen t lengths and HDLC implementations :
HDLC implementations : e Architecture Al, non octet aligned, NRZ, line codin g
• Architecture A2, non octet aligned, NRZI line codin g
® Architecture A3, octet aligned, NRZ line codin g
o Architecture A4, octet aligned, NRZI line codin g

./

15
Log (BmRi l -I I

-1 2
Fig. 3a) Architecture A 1 : non octet aligned, NRZ line coding

-u
Log (BER )

-5
Fig . 4a) frame length = 128 bit s

sI1
Cs
-i 2

Log (BER )
2
3f
Fig. 3b) Architecture A2 : non octet aligned, NRZI line codin g xl '/

24
-l2
A3
/

-6 -5
Log (. BER )

x Fig. 4b) frame length = 512 bit s


is

-25 -6

Log 03'.R

Fig . 3c) Architecture A3 : octet aligned, NRZ line coding


J am

-l 2

-l 4
b 5
Log (BER. )
,
'--- Fig . 4c) frame length = 1024 bit s

,i

(B

Fig . 3d) Architecture A4 : octet aligned, NRZI line codin g

ACM SIGCOMM -79-- Computer Communication Review



Figure 5 : RER as a function of BER, for differen t Figure 7 : RER as a function of BER, for differen t
frame lengths (64, 128, 256, 512, 1024) and fo r frame lengths (128, 256, 512, 1024) and for a standar d
different HDLC implementations : HDLC using CRC-32 and NRZI line coding .

Fig. 5a) Architecture A3 : octet aligned, NRZ line coding

Figure 8 : contributions to RER of the different failur e


reasons, for frame length = 256, for a non standar d
HDLC introducing a byte-count information in th e
frame structure and using NRZ .

–. i.

12 51 2
25 6

-1)
69 ~
~I2
9
6
Log(BER)

Fig . 5b) Architecture A4 : octet aligned, NRZI line codin g

Figure 6 : RER as a function of the frame length, fo r


different values of BER and for different HDL C
implementations : Figure 9 : RER as a function of BER, for differen t
o Architecture A3 : octet aligned, NRZ line codin g frame lengths (128, 256, 512, 1024) and for a no n
e Architecture A4 : octet aligned, NRZI line coding standard HDLC introducing a byte-count informatio n
in the frame structure and using NRZ .

a AA .
u
a 9
Log tBm .

AS
Log IBM 9-9

00,90
6,9

A3
Loy 19ER)=- o

.0 e00 1000 120 0


Framei OLength 600 - lair

ACM SIGCOMM -80— Computer Communication Revie w

Вам также может понравиться