Académique Documents
Professionnel Documents
Culture Documents
and Internetworking
Layers
Dippal Israni
Assistant Professor, U and P U Patel Department of Computer
Engineering,
CHARUSAT
• Byte Count
• Flag with Byte Stuffing
• Flag Bits with Bit Stuffing
Framing
Bit stuffing
(a) The original data.
(b) The data as they appear on the line.
(c) The data as they are stored in receiver’s memory after destuffing.
Error and Flow Control
• 11100101
• 11010101
• 00111001
• 10101001
LRC
Performance
101111101
Error-Correcting Codes
• Hamming Codes
• Binary Convolutional Codes
• Reed-Solomon Codes
• Low-Density Parity Check codes
Hamming Codes: Encoding
Localizing error to top or bottom half 1xxx or 0xxx
11.50
Elementary Data Link Protocols
Continued
11.53
Protocol
Definitions
(ctd.)
Some definitions
needed in the
protocols to follow.
These are located in
the file protocol.h.
Unrestricted
Simplex
Protocol
Flow diagram for Example of Simplex
Disadvantage
• No Flow Control
• No Error Control
Stop-and-Wait Protocol
11.58
Stop-and-Wait Protocol
11.59
Simplex
Stop-and-
Wait
Protocol
Simplex Stop and Wait
11.61
Disadvantage
In noisy channels
• A-> B Data
11.63
Note
11.64
Note
11.65
Note
11.66
Figure 11.10 Design of the Stop-and-Wait ARQ Protocol
11.67
Example 11.3
11.68
Figure 11.11 Flow diagram for Example 11.3
11.69
Algorithm 11.5 Sender-site algorithm for Stop-and-Wait ARQ
(continued)
11.70
(continued)
Algorithm 11.5 Sender-site algorithm for Stop-and-Wait ARQ
11.71
Algorithm 11.6 Receiver-site algorithm for Stop-and-Wait ARQ Protocol
11.72
Example 11.4
Solution
The bandwidthdelay product is
11.73
Example 11.4 (continued)
The system can send 20,000 bits during the time it takes for
the data to go from the sender to the receiver and then back
again. However, the system sends only 1000 bits. We can
say that the link utilization is only 1000/20,000, or 5
percent. For this reason, for a link with a high bandwidth
or long delay, the use of Stop-and-Wait ARQ wastes the
capacity of the link.
11.74
Example 11.5
11.76
Figure 11.12 Send window for Go-Back-N ARQ
11.77
Note
11.78
Note
11.79
Figure 11.13 Receive window for Go-Back-N ARQ
11.80
Note
11.81
Figure 11.14 Design of Go-Back-N ARQ
11.82
Note
11.83
Figure 11.15 Window size for Go-Back-N ARQ
11.84
Note
11.85
Example 11.6
11.87
Example 11.7
11.89
Figure 11.17 Flow diagram for Example 11.7
11.90
Algorithm 11.7 Go-Back-N sender algorithm
(continued)
11.91
(continued)
Algorithm 11.7 Go-Back-N sender algorithm
SendFrame(temp);
temp=temp+1;
11.92
Algorithm 11.8 Go-Back-N receiver algorithm
11.93
Figure 11.18 Send window for Selective Repeat ARQ
11.94
Figure 11.19 Receive window for Selective Repeat ARQ
11.95
Figure 11.20 Design of Selective Repeat ARQ
11.96
Figure 11.21 Selective Repeat ARQ, window size
11.97
Note
11.98
Figure 11.22 Delivery of data in Selective Repeat ARQ
11.99
Example 11.8
11.102
Example 11.8 (continued)
The next point is about the ACKs. Notice that only two ACKs
are sent here. The first one acknowledges only the first
frame; the second one acknowledges three frames. In
Selective Repeat, ACKs are sent when data are delivered to
the network layer. If the data belonging to n frames are
delivered in one shot, only one ACK is sent for all of them.
11.103
Figure 11.23 Flow diagram for Example 11.8
11.104
Figure 11.24 Design of piggybacking in Go-Back-N ARQ
11.105
Algorithm 11.9 Sender-site Selective Repeat algorithm
(continued)
11.106
(continued)
Algorithm 11.9 Sender-site Selective Repeat algorithm
11.107 (continued)
(continued)
Algorithm 11.9 Sender-site Selective Repeat algorithm
11.108
Algorithm 11.10 Receiver-site Selective Repeat algorithm
11.109
Algorithm 11.10 Receiver-site Selective Repeat algorithm
11.110
BASIS FOR COMPARISON GO-BACK-N SELECTIVE REPEAT
Window size
Window Size is 2m-1 and Sender and receiver Window
receiver window size is 1 Size is 2m-1
Sorting is neither required at sender side Receiver must be able to sort as it has to
Sorting
nor at receiver side. maintain the sequence of the frames.
Receiver do not store the frames received Receiver stores the frames received after
Storing after the damaged frame until the the damaged frame in the buffer until the
damaged frame is retransmitted. damaged frame is replaced.
No searching of frame is required neither The sender must be able to search and
Searching
on sender side nor on receiver select only the requested frame.
IP IP
PPP PPP
SONET SONET
Optical
Fibre
PPP – Point to Point Protocol
0-IPX
1-PPP
configuration
payload
Control field of
(a) An information frame.
(b) A supervisory frame.
(c) An unnumbered frame.