Download presentation
Presentation is loading. Please wait.
Published byKaren Long Modified over 9 years ago
1
COMPUTER NETWORKS Ms. Mrinmoyee Mukherjee Assistant Professor St. Francis Institute of Technology, Mount Poinsur, S.V.P Road, Borivli (west), Mumbai- 400103
2
DATA LINK LAYER
3
1.Transfer data from the network layer of one machine to the network layer of another machine 2.Converts the raw bit streams of physical layer into groups of bits called as ‘FRAMES’ MAIN TASK OF DLL
4
??Why do we require any kind of control 1.Frame Synchronization- The beginning and end of data block should be recognizable 2.Flow Control-The sender should not send frames at a rate faster than the receiver can receive and process them 3.Error Control- Any bit error introduced by the transmission system should be corrected 4.Addressing- On a multipoint link, the identity of the sender and receiver must be specified 5.Reliable delivery between adjacent nodes The services can be provided through- a.Unacknowledged Connectionless Service b.Acknowledged Connectionless Service c.Acknowledged Connection-oriented Service SERVICES PROVIDED BY DLL
5
Placement of the data link protocol.
6
FRAMING BY DLL Translates the physical layer raw bit stream into discrete units called frames. ?? How can the receiver detect frame boundary…i.e the start and end of a frame There are basically three methods of framing 1. Length Character Count 2. Bit Stuffing 3. Byte Stuffing (Character Stuffing Protocol)
7
LENGTH COUNT
8
BIT STUFFING.. (FIG1)
9
BIT STUFFING (FIG 2)
10
BYTE STUFFING (FIG 2)
11
TYPES OF ERROR (A)Single bit error (A)Burst Errors ERROR DETECTION AND CORRECTION
12
ERROR DETECTION vs CORRECTION Detection- 1.We are only interested in looking if any error has occurred or not. The simple answer to this question is YES/NO 2.We are not even interested in knowing the number of corrupted bits Correction- 1.We need to know the exact no of bits that are corrupted. 2.The number of errors and size of message are important factors. 3.We also need to know the location of corrupted bits.
13
ERROR DETECTION vs CORRECTION Errors in the received frames are detected by means of – 1. Parity Check and CRC (Cyclic Redundancy Check). 2. In both scenario, few extra bits are sent along with actual data to confirm that bits received at other end are same as they were sent. If the checks at receiver’s end fails, the bits are corrupted. In digital world, error correction can be done in two ways- 1. Backward Error Correction: When the receiver detects an error in the data received, it requests back the sender to retransmit the data unit. 2. Forward Error Correction: When the receiver detects some error in the data received, it uses an error-correcting code, which helps it to auto- recover and correct some kinds of errors.
14
LINEAR BLOCK CODES
15
10. Almost all block codes used today belong to a subset called linear block codes. A linear block code is a code in which the exclusive OR (addition modulo-2) of two valid code-words creates another valid codeword.
16
BLOCK CODES- How can errors be detected using block codes- 1.If the receiver has a list of valid code-words. 2.The original code-word has changed to an invalid one.
17
CENTRAL CONCEPTS-Hamming Distance 1.The HAMMING DISTANCE between the two words (of the same size) is the number of differences between the corresponding bits. 2.The hamming distance between the two words x and y is : d=(x,y)
18
CENTRAL CONCEPTS-Hamming Distance 1. If the hamming distance between the sent and received code-word is not zero, the code-word has been corrupted during transmission. 2. The hamming distance can easily be found if we apply XOR operations on the two words and count the number of 1s in the result
19
CENTRAL CONCEPTS-Minimum Hamming Distance
20
CENTRAL CONCEPTS-Relationships DATAWORDCODEWORD 0000000 0101011 1010101 1111110
21
Type-1:Simple Parity Check Code
22
Simple Parity Check Code
23
Simple Parity Check Code-Encoding and Decoding
24
10. Table 10.3 Simple parity-check code C(5, 4)
25
10. Let us look at some transmission scenarios. Assume the sender sends the dataword 1011. The codeword created from this dataword is 10111, which is sent to the receiver. We examine five cases: 1. No error occurs; the received codeword is 10111. The syndrome is 0. The dataword 1011 is created. 2. One single-bit error changes a 1. The received codeword is 10011. The syndrome is 1. No dataword is created. 3. One single-bit error changes r 0. The received codeword is 10110. The syndrome is 1. No dataword is created. Example
26
10. 4. An error changes r 0 and a second error changes a 3. The received codeword is 00110. The syndrome is 0. The dataword 0011 is created at the receiver. Note that here the dataword is wrongly created due to the syndrome value. 5. Three bits—a 3, a 2, and a 1 —are changed by errors. The received codeword is 01011. The syndrome is 1. The dataword is not created. This shows that the simple parity check, guaranteed to detect one single error, can also find any odd number of errors. Example (continued)
27
Type-2:2-D Parity Check Code
30
CHECKSUM METHOD (SENDER)
31
CYCLIC REDUNDANCY CHECK 1.One of the most powerful and commonly used error detecting codes. 1.Given a m bit block of bit sequence, the sender generates an n bit sequence, known as Frame Check sequence (FCS), so that the resulting frame consisting of m+n bits is exactly divisible by some predetermined number. 1.The receiver divides the incoming frame, by that number and if there is no remainder, assumes that there was no error. (show small example on board)
32
CRC-Performance 1.CRC can detect all single bit errors 2.CRC can detect all double-bit errors (more than 3 ones) 3.CRC can detect any odd number of errors(X+1) 4.CRC can detect all burst errors of less than the degree of polynomial 5.CRC detects most of the larger burst errors with high probability
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.