Académique Documents
Professionnel Documents
Culture Documents
Services provided to network layer Error detection and correction techniques (parity checks, checksumming methods, CRC, Hamming code) Reliable transmission ( stop and wait, sliding window protocol with its variant)
Services Framing
Error
Provide
Unacknowledged connectionless service Acknowledged connectionless service Acknowledged connection oriented service
Character count Flag bytes with byte stuffing Flag bytes with bit stuffing Physical layer coding violations
10
11
(a) A frame delimited by flag bytes. (b) Four examples of byte sequences before and after stuffing.
Pintu R Shah MPSTME SVKM's NMIMS 12
Bit stuffing (a) The original data. (b) The data as they appear on the line. (c) The data as they are stored in receivers memory after destuffing.
Pintu R Shah MPSTME SVKM's NMIMS 13
Error correction
Hamming code
14
15
16
The Hamming distance between two words is the number of differences between corresponding bits.
1. The Hamming distance d(000, 011) is 2 because 2. The Hamming distance d(10101, 11110) is 3 because
17
To guarantee the detection of up to e errors in all cases, the minimum Hamming distance in a block code must be dmin = e + 1. To guarantee correction of up to e errors in all cases, the minimum Hamming distance in a block code must be dmin = 2e + 1.
18
A code scheme has a Hamming distance dmin = 4. What is the error detection and correction capability of this scheme? Solution This code guarantees the detection of up to three errors but it can correct up to one error. In other words, if this code is used for error correction, part of its capability is wasted. Error correction codes need to have an odd minimum distance (3, 5, 7, . . . ).
Pintu R Shah MPSTME SVKM's NMIMS
19
20
21
Note
A simple parity-check code can detect an odd number of errors.
22
23
24
25
Divide the data into segments of n bits Add all segment using ones complement addition to get the sum Complement the sum to get checksum Checksum is sent along with the data At the receiving side, sum is calculated again. If the sum is zero, there is no error.
26
11100010 11001100
27
28
29
30
Data link layer can combine framing, flow control, and error control to achieve the delivery of data from one node to another. The protocols are normally implemented in software by using one of the common programming languages.
31
An
Unrestricted Simplex Protocol A Simplex Stop-and-Wait Protocol A Simplex Protocol for a Noisy Channel
32
Physical layer, DLL and network layer are independent processes that communicate by passing message back and forth. Machine A has a long stream of data to be transmitted to Machine B using reliable connection oriented service.
33
Continued
Some definitions needed in the protocols to follow. These are located in the file protocol.h.
Pintu R Shah MPSTME SVKM's NMIMS 34
35
36
37
38
39
Assume that, in a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20 ms to make a round trip. What is the bandwidth-delay product? If the system data frames are 1000 bits in length, what is the utilization percentage of the link?
40
BW delay product is
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.
41
What is the utilization percentage of the link in Example 1 if we have a protocol that can send up to 15 frames before stopping and worrying about the acknowledgments?
42
The bandwidth-delay product is still 20,000 bits. The system can send up to 15 frames or 15,000 bits during a round trip. This means the utilization is 15,000/20,000, or 75 percent. Of course, if there are damaged frames, the utilization percentage is much less because frames have to be resent.
43
One-Bit Sliding Window Protocol A Protocol Using Go Back N A Protocol Using Selective Repeat
44
A sliding window of size 1, with a 3-bit sequence number. (a) Initially. (b) After the first frame has been sent. (c) After the first frame has been received. (d) After the first acknowledgement has been received.
Pintu R Shah MPSTME SVKM's NMIMS 45
Pipelining and error recovery. Effect on an error when (a) Receivers window size is 1. (b) Receivers window size is large.
Pintu R Shah MPSTME SVKM's NMIMS
46
(a) Initial situation with a window size seven. (b) After seven frames sent and received, but not acknowledged. (c) Initial situation with a window size of four. (d) After four frames sent and received, but not acknowledged.
Pintu R Shah MPSTME SVKM's NMIMS 47