Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.

Similar presentations


Presentation on theme: "Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad."— Presentation transcript:

1 Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad

2 The Data Link Layer Computer Networks
Chapter 5 The Data Link Layer Computer Networks

3 The Duties of Data Link Layer
The No Monopoly idea and the framing Framing Techniques

4 Framing Technique Framing by flag byte and stuff using byte stuffing
Framing by flag bytes and stuff using bit stuffing Illegal combinations for framing, and Character count with some other mechanisms

5 Flag Byte: Examples “To stop input please enter X and then press a”
“To stop input please enter ~ and then press a” “~To stop input please enter <Esc>~ and then press a~”.

6 Flag Byte: xamples “To stop input please enter <Esc>~ and then press <Esc>a, for main menu press <Esc>” “To stop input please enter <Esc><Esc><Esc>~ and then press <Esc><Esc>a, for main menu press <Esc><Esc>”

7 Bit stuffing > unchanged (8-bit input results in 8‑bit output). > (8-bit input results in 9-bit output). > (8-bit input results in 9-bit output). > (8-bit input results in 9-bit output)  stuffed bit is shown as bold

8 The Error Types of Errors Error handling Using redundancy
Error Detection Checksum CRC Error correction Hamming code

9 Error handling Not handling errors at data link layer
Which is better, detection or correction?

10 Single bit and burst errors

11 Intermediate vs End to End Error handling

12 Modulo-2 Arithmetic

13 Modulo-2 Arithmetic − − − −

14 Modulo-2 division

15 Polynomial Representation
101 -> 22 + 20 -> x2 + x0 > x8 + x5 + x2 + x1 + x0. Sender sends Receiver receives p(x) is x7 + x5 + x3 + x1 q(x) is x7 + x5 + x3 + x2 + x1 + x0 |p(x) - q(x)| is x2 + x0 or 101.

16 Error handling using Polynomial representation
q(x) is exactly divisible by r(x) if p(x) + e(x) is exactly divisible by r(x) (divisor) We have to check the divisibility of e(x) Case 1: one bit e(x) = xi Requirement: more than one term in divisor Case 2: two bit x64 + x1 (i.e. 264 + 21) =2(263 + 1) Requirement: divisor does not divide for xk + 1 Case 3 : odd number of bits in error

17 Error handling using Polynomial representation
Requirement: x+1 as a factor in divisor Assume x+1 as a factor than we have ee(x) such that e(x) = (x + 1) ee  (x);   When x = 1, RHS becomes (1 + 1) ee(x) = 0 × ee(x) = 0 (in modulo 2, is zero) When x = 1, RHS=1+1+1 … (odd no of terms) = 1 Thus LHS <> RHS and thus x+1 cannot be a factor in the error

18 CRC Calculations Generator Polynomial
CRC Calculations Generator Polynomial Remainder, which is to be appended to the polynomial

19 Intermediate vs End to End Error handling

20 Hamming code and Error Redundancy for error handling
m data bits and r redundant bits for m + r bits only one correct value of r for a given m one correct bit pattern requires m + r incorrect patterns m + r + 1 < 2m + r 7 bit data 4 bit redundant bits makes it 11

21 Hamming code calculations

22 R1,R2,R3 and R4 calculations R1 represents the parity of M1, M2, M4, M5, and M7 = M1 + M2 + M4 + M5 + M7 = 1 + 0 + 0 + 1 + 0 + 0 = 0 R2 represents the parity of M1, M3, M4, M6, and M7 = =0 R3 represents the parity of M2, M3, and M4=1 R4 represents the parity of M5, M6, and M7=0

23 Hamming code for burst error

24 The Duties of Data Link Layer
Flow control Interfacing with network and physical layers

25 Interfacing with network and DLL

26 The Duties of Data Link Layer
Local machine level addressing Multiplexing and demultiplexing The Protocols The Sender and Receiver concept The acknowledgement Timers and the time out event

27 Acknowledgements Segment no. ACK in scheme 1 Starting byte Last byte
Sequence no. Length ACK in scheme 2 1 1 (frame no) 999 2500 1000 3500 (next byte expected) 2 2499 3500 1500 5000 3 3499 6000

28 Piggybacking

29 Separate ACK frame sent

30 Sender and receiver windows

31 Sender’s Window and A lost frame

32 Sender’s Window and A lost frame

33 The Duties of Data Link Layer
Sending and Receiving windows Sequence and Acknowledgement Numbers Retransmission Duplicate frames Go Back N Selective Repeat Prerequisites for coding protocols

34 Sliding windows

35 Retransmission

36 Go Back N

37 Go Back N

38 Sequence number issue in GBN

39 Sequence number issue in GBN

40 Sequence number issue in GBN

41 Sequence number issue in GBN

42 Selective Repeat

43 Selective repeat sequence number problem

44 Continue

45 Solution

46 Protocols The Sender and Receiver concept The acknowledgement
Timers and the time out event The Sending and Receiving windows The Sequence and Acknowledgement Numbers Retransmission Duplicate frames

47 Protocol 1

48 Protocol 1

49 Protocol 2

50 Protocol 2

51 Protocol 3

52 Protocol 3

53 Protocol 3

54 Ack and frame lost in Protocol 2

55 Piggybacked cumulative ACK

56 Protocol 5 Go back N

57 Protocol 6 Selective Repeat

58 Prerequisites to coding protocols
Process to process communication Using named pipes Implementing timers


Download ppt "Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad."

Similar presentations


Ads by Google