Typical Frame Exchanges
We now consider a number of simple examples to show how the frames that are defined for HDLC can be used to carry out various data link control procedures. We use the following convention to specify the frame types and contents in the following figures. The first entry indicates the contents of the address field; the second entry specifies the type of frame, that is, I for information, RR for receive ready, and so on; the third entry is N(S) in the case of I-frames only, the send sequence number; and the following entry is N(R), the receive sequence number. A P or F at the end of an entry indicates that the Poll or Final bit is set.
Figure 5.37 shows the exchange of frames that occurs for connection establishment and release. Station A sends an SABM frame to indicate that it wishes to set up an ABM mode connection. Station B sends an unnumbered acknowledgment to indicate its readiness to proceed with the connection. A bidirectional flow of information and supervisory frames then takes place. When a station wishes to disconnect, it sends a DISC frame and the other station sends UA.
Figure 5.38 shows a typical exchange of frames, using normal response mode. In this example the primary station A is communicating with the secondary stations B and C. Note that all frames contain the address of the secondary
- FIGURE 5.37 Exchange of frames for connection establishment and release
station. Station A begins by sending a frame to station B with the poll bit set and the sequence numbering N(R) = 0, indicating that the next frame it is expecting from B is frame 0. Station B receives the polling frame and proceeds to transmit three information frames with N(S) = 0, 1, 2. The last frame has the final bit set. Frame 1 from station B incurs transmission errors, and subsequently station A receives an out-of-sequence frame with N(S) = 2. Station A now sends an SREJ frame with N(R) = 1 but without setting the poll bit. This frame indicates to station B that it should be prepared to retransmit frame 1. Station A proceeds to poll station C, which replies that it has no I-frames to transmit. Station A now sends an SREJ with N(R) = 1, and the poll bit set. Station B responds by resending frame 1 and then skipping to frames 3 and 4. In the last frame in the figure, station A sends to station B an information frame with N(S) = 0 and with N(R) = 5, acknowledging receipt of all frames from B up to 4.
Secondaries B, C
FIGURE 5.38 Exchange of frames using normal response mode
Time
Finally, in Figure 5.39 we consider the case of bidirectional flow of information using ABM. The following convention is used for the addressing: The address field always contains the address of the secondary station. Thus if a frame is a command, then the address field contains the address of the receiving station. If a frame is a response, then the address field contains the address of the sending station. Information frames are always commands. RR and RNR frames can be either command or response frame; REJ frames are always response frames.
In the example, station A begins by sending frames 0 and 1 in succession. Station B begins slightly later and transmits frame 0. Shortly thereafter station B receives frame 0 from A. When station B transmits its I-frame with NB(S) = 1, an acknowledgment is piggybacked by setting NB(R) = 1. In the meantime, station A has received frame 0 from station B so when it transmits its frame 2, it piggybacks an acknowledgment by using NA(R) = 1. Now frame 1 from station A has undergone transmission errors, and so when station B receives a frame with Na(S) = 2, it finds that the frame is out of sequence. Station B then sends a negative acknowledgment by transmitting an REJ frame with NB(R) = 1. Meanwhile station A is happily proceeding with the transmission of frames 2, 3, and 4, which carry piggybacked acknowledgments. After receiving the REJ frame, station A goes back and begins retransmitting from frame 1 onward. Note that the value of N(R) is unaffected by retransmission. In the figure we use solid lines to indicate response frames that are sent from B to A. Thus we see that when station B does not have additional I-frames for transmission, it sends acknowledgments by using RR frames in response form.
I, 1, 0 I, 2, 1 I, 3, 2 I, 4, 3 I, 1, 3 I, 2, 4 I, 3, 4
Combined station B FIGURE 5.39 Exchange of frames using A I 0 0 asynchronous balanced mode
Time
Post a comment