Translate

Wednesday, September 28, 2016

Flow and Error Control



Flow and Error Control
Flow control and error control at the X.25 packet layer are virtually identical in
format and procedure to flow control used for HDLC, as described in Lesson 6.
A sliding-window protocol is used. Each data packet includes a send sequence
number, P(S), and a receive sequence number, P(R). As a default, 3-bit sequence
numbers are used. Optionally, a DTE may request, via the user-facility mechanism,
the use of extended 7-bit sequence numbers. As Figure 9.19 indicates, for 3-bit
sequence numbers, the third and fourth bits of all data and control packets are 01;
for 7-bit sequence numbers, the bits are 10.
P(S) is assigned by the DTE on outgoing packets on a virtual circuit basis; that
is, the P(S) of each new outgoing data packet on a virtual circuit is one more than
that of the preceding packet, modulo 8 or modulo 128. P(R) contains the number of
the next packet expected from the other side of a virtual circuit; this provides for
piggybacked acknowledgment. If one side has no data to send, it may acknowledge
incoming packets with the Receive-Ready (RR) and Receive-not-Ready (RNR)
control packets, with the same meaning as for HDLC. The default window size is 2,
but it may be set as high as 7 for 3-bit sequence numbers and as high as 127 for
7-bit sequence numbers.
Acknowledgment (in the form of the P(R) field in the data, RR, or RNR
packet), and hence flow control, may have either local or end-to-end significance,
based on the setting of the D bit. When D = 0, (the usual case), acknowledgment is
exercised between the DTE and the network. This communication is used by the
local DCE and/or the network to acknowledge receipt of packets and to control the
flow from the DTE into the network. When D = 1, acknowledgments come from
the remote DTE.
The basic form of error control is go-back-N ARQ. Negative acknowledgment
is in the form of a Reject (REJ) control packet. If a node receives a negative
acknowledgment, it will retransmit the specified packet and all subsequent packets.
Packet Sequences
X.25 provides the capability, called a complete packet sequence, to identify a contiguous
sequence of data packets. This feature has several uses. One important use
is by internetworking protocols (described in Part IV) to allow longer blocks of data
to be sent across a network with a smaller packet-size restriction without losing the
integrity of the block.
To specify this mechanism, X.25 defines two types of packets: A packets and
B packets. An A packet is one in which the M bit is set to 1, the D bit is set to 0, and
the packet is full (equal to the maximum allowable packet length). A B packet is any
packet that is not an A packet. A complete packet sequence consists of zero or more
A packets followed by a B packet. The network may combine this sequence to
make a larger packet. The network may also segment a B packet into smaller packets
to produce a complete packet sequence.
The way in which the B packet is handled depends on the setting of the M and
D bits. If D = 1, an end-to-end acknowledgment is sent by the receiving DTE to the
sending DTE. This is, in effect, an acknowledgment of the entire complete packet
sequence. If M = 1, there are additional complete packet sequences to follow. This
enables the formation of subsequences as part of a larger sequence, so that end-toend
acknowledgment can occur before the end of the larger sequence.
Figure 9.21 shows examples of these concepts. It is the responsibility of the

No comments:

Post a Comment

silahkan membaca dan berkomentar