• Aucun résultat trouvé

HDLC Frame Formats

Dans le document DAVID MCDYSAN DAVE PAW (Page 151-154)

The basic one-octet control field HDLC frame format shown in Figure 7-5 is used for both information exchange and link-level control. Two flag fields always encapsulate a frame;

however, the closing flag for one frame may be reused as the opening flag for the subse-quent frame. The HDLC frame format supports several control field formats. An address field provides the address of the secondary station (but is not needed for point-to-point configurations). The information field contains the data being transmitted, and the frame check sequence (FCS) performs error detection for the entire frame. Also included in this frame is acontrol fieldto identify one of three types of frames available.

The Flag (F) sequence is a zero followed by six ones and another zero. Flags delimit the beginning and end of an HDLC frame. A key function of the data link layer is to encode the occurrence of the flag sequence within user data as a different sequence using bit stuffingas follows: If the link layer detects a sequence of five consecutive ones in the user data, then it inserts a zero immediately after the fifth one in the transmitted bit stream. The receiving link layer removes these inserted zeros by looking for sequences of five ones followed by a “stuffed” zero bit. Thus, if an HDLC flag bit pattern, 01111110, is present in the user data; the link layer transmits this as 011111010. Unfortunately, HDLC’s bit-stuffing mechanism can be fooled by bit errors on the physical medium, as

Figure 7-4. HDLC unbalanced control link operation

Figure 7-5. HDLC frame format

we shall see later in Chapter 23. Therefore, many higher-layer protocols also keep a length count to detect errors caused by bit errors corrupting the HDLC bit-stuffing proce-dure. To determine the boundaries of HDLC frames, the receiver need only check the in-coming bit stream for a zero followed by six ones.

The address field of the LAP-B frame is primarily used on multidrop lines. The address field also indicates the direction of transmission and differentiates between com-mands and responses, as we detail in the next section.

The sender computes the two-octet frame check sequence (FCS), and the receiver uses the FCS to check the received HDLC frame to determine if any bit errors occurred during transmission. The following generator polynomial specifies the FCS:

G(x) = x16+ x12+ x5+ 1

See Chapter 23 for a more detailed description of how generator polynomials are used to generate a cyclical redundancy check (CRC) error-detection field. The FCS of HDLC is capable of detecting up to three random bit errors or a burst of sixteen bit errors.

The HDLC standard supports control field frame formats of length equal to 8-, 16-, 32-, or 64-bit lengths negotiated at link establishment time. The control field of the X.25 LAP-B frame is identical to the corresponding HDLC frame with the one-octet length calledbasic modeor the optional modes for a two-octet length calledextended mode, and the four-octet length calledsuper mode. Figure 7-6 shows the 8-bit versions of the three HDLC control field formats: information, supervisory, and unnumbered frames. The unnumbered frame control field format is only 8 bits long for all control field formats.

Note how the first two bits of the control field uniquely identify the type of frame: infor-mation, supervisory,orunnumbered.

Theinformationframe transports user data between DTE and DCE. Within this frame, the N(S) and N(R) fields designate the sequence number of the last frame sent and the expected sequence number of the next frame received, respectively. HDLC also defines 16-bit versions of the information, supervisory, and unnumbered frames, the difference being in the size of the sequence number fields. Information frames always code the Poll (P) bit to a value of 1, as indicated in Figure 7-6. In supervisory and unnumbered formats, the Poll/Final (P/F) bit indicates commands and responses. For example, the DTE (or DCE) sets the P/F bit to 1 to solicit (i.e., poll) a response from the DCE (or DTE). When the DCE (or DTE) responds, it sets the P/F bit to zero to indicate that its response is complete (i.e., final).

Thesupervisoryframe uses the Supervisory (S) code bits to acknowledge the receipt of frames, request retransmission, or request temporary suspension of information frame transfer. It performs these functions using the P/F bit in the following command and response pairs: Receive Ready (RR), Receive Not Ready (RNR), REJect (REJ), and Selec-tive REJect (SREJ).

Theunnumberedframe uses the Modifier (M) bits of the unnumbered format to pro-vide the means for the DTE and DCE to set upand acknowledge the HDLC mode, and to terminate the data link layer connection. The HDLC standard defines a variety of control

128

ATM & MPLS Theory & Application: Foundations of Multi-Service Networking

messages to set upthe HDLC mode discussed in the preceding section (e.g., NRM, ARM, and ABM). LAP-B uses only the asynchronous balanced mode (ABM).

The basic difference between the one-, two-, four-, and eight-octet control field for-mats is the length of the send and receive sequence number fields, N(S) and N(R)9 respec-tively. The HDLC standard defines the modulus as the maximum decimal value of these sequence number fields, as given in Table 7-1. In other words, HDLC stations increment the sequence number modulo the modulus value given in the table. For example, for a one-octet control field, stations increment the sequence numbers modulo 8; specifically, the stations generate the following pattern of sequence numbers: 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, and so on. The 16-bit control field initially targeted use over long-delay satellite links to increase application throughput. A larger sequence number improves performance be-cause the sender can transmit upto the modulus of the sequence number without receipt of an acknowledgment. The 32- and 64- bit versions of the control field were developed for similar reasons as the bandwidth-delay product increased with higher-speed trans-mission links, such as those used in modern local area and wide area networks.

Point-to-point physical X.25 network access supports either a single link or multiple links. The LAP-B Single Link Procedure (SLP) supports data interchange over a single physical circuit between a DTE with address “A” and a DCE with address “B.” The coding for the one-octet address field for the address “A” is a binary 1100 0000 and the coding for address “B” is a binary 1000 0000. The address field identifies a frame as

Figure 7-6. HDLC frame with 8-bit control field formats

either a command or a response, since command frames contain the address of the other end, while response frames contain the address of the sender. Information frames are always coded as commands in the address field.

The optional Multilink Procedure (MLP) exists as an upper sublayer in the data link layer. Multilink operation uses the single-link procedures independently over each phys-ical circuit, with the multilink procedure providing the appearance of a single data flow over two or more parallel LAP-B data links. MLP has several applications in real-world networks. It allows multiple links to be combined to yield a higher-speed connection; it provides for graceful degradation if any single link should fail; and, finally, it allows a network designer to gracefully increase or decrease capacity without interrupting ser-vice. The X.25 MLP design philosophy appears in inverse multiplexing in the TDM world, the Frame Relay (FRF.15 and FRF.16.1) and PPP multilink standards, as well as In-verse Multiplexing over ATM (IMA), as described in Chapter 12.

Dans le document DAVID MCDYSAN DAVE PAW (Page 151-154)