background image
90 Chapter 3: OSI Reference Model & Layered Communication
means that the acknowledgment number in the header identifies the next data that is to be
received, not the last one received. (In this case, 4 is next to be received.)
In some protocols, such as LLC2, the numbering always starts with zero. In other protocols,
such as TCP, the number is stated during initialization by the sending machine. Also, some
protocols count the frame/packet/segment as 1; others count the number of bytes sent. In any
case, the basic idea is the same.
Of course, error recovery has not been covered yet. Take the case of Fred and Barney again, but
notice Barney's reply in Figure 3-8.
Figure 3-8
Recovery Example
Because Barney is expecting packet number 2 next, what could Fred do? Two choices exist.
Fred could send numbers 2 and 3 again, or Fred could send number 2 and wait, hoping that
Barney's next acknowledgment will say 4, indicating that Barney just got number 2 and already
had number 3 from earlier.
Finally, error recovery typically uses two sets of counters: one to count data in one direction,
and one to count data in the opposite direction. So, when Barney acknowledges packet number
2 with the number acknowledged field in the header, the header would also have a number sent
field that identifies the data in Barney's packet. For instance, assume in Figure 3-8 that the
previous packet Barney had sent was number 5. The packet shown in the figure would be
labeled 6.
Table 3-5 summarizes the concepts behind error recovery and lists the behavior of three popular
error-recovery protocols.
Fred
Barney
Network
S = 1
S = 2
S = 3
S = 2
R = 2
Got #1,
give me
#2 next.
10,000
Bytes
of Data
ch03.fm Page 90 Monday, March 20, 2000 4:58 PM