1 of 68

Computer Network

  • Error Detection & Correction

  • Hamming Code method (1-bit correction)

  • IP Address /Class
  • Sub netting with an Example
    • Subnet
    • Subnet mask
  • Some Questions

2 of 68

Error Detection�and Correction

  • Types of Errors
  • Detection
  • Correction

3 of 68

Single-bit error

4 of 68

Burst error

5 of 68

6 of 68

Question: If the Bandwidth of the channel is 1GBPS the for how much duration the error should Last?

Answer:

1Gbps = 109bits--------------🡪 1 secs

1 bit ------------------------------🡪 ?

-> 1/109= 1 ns

Question: If an error occurred up to 1/1000 sec duration in above questions then how many bits corrupted?

Answer:

1/1000 * 109= 106bits are corrupted

7 of 68

Error detection

Error detection means to decide whether the received data is correct or not without having a copy of the original message.

Error detection uses the concept of redundancy, which means adding extra bits for detecting errors at the destination.

8 of 68

Redundancy

9 of 68

Four types of redundancy checks are used

in data communications

10 of 68

Vertical Redundancy Check

VRC/ Parity Check

VRC: 1; if odd number of 1’s

VRC: 0; if even number of 1’s

11 of 68

Vertical Redundancy Check

VRC/ Parity Check

Transmitted Received Detected ?

11100001 🡪 1 1100001

11100001 🡪 1 1101001

11100001 🡪 1 1000011

12 of 68

Performance

  • It can detect single bit error

  • It can detect burst errors only if the total number of errors is odd.

13 of 68

Longitudinal Redundancy Check

LRC

14 of 68

Longitudinal Redundancy Check

LRC

15 of 68

Longitudinal Redundancy Check

LRC

16 of 68

Longitudinal Redundancy Check

LRC

17 of 68

Performance

  • LRC increases the likelihood of detecting burst errors.
  • If two bits in one data units are damaged and two bits in exactly the same positions in another data unit are also damaged, the LRC checker will not detect an error.

18 of 68

19 of 68

VRC and LRC

20 of 68

Four types of redundancy checks are used

in data communications

21 of 68

Checksum

22 of 68

Checksum: (Sum, Wrapped Sum, Checksum)

23 of 68

Checksum

1 0 0 0 0 1 0 0

0 0 1 0 0 1 0 0

1 1 1 0 0 0 1 0

1 0 0 1 1 0 0 1

1 1 0 1 1 0 1 0 Checksum

24 of 68

Checksum

1 0 0 0 0 1 0 0

0 0 1 0 0 1 0 0

1 1 1 0 0 0 1 0

1 0 0 1 1 0 0 1

1 1 0 1 1 0 1 0

0 0 0 0 0 0 0 0 Checksum

25 of 68

Checksum at Sender’s Side

26 of 68

Checksum at Receiver’s Side

27 of 68

Checksum

1 0 0 0 0 1 0 0

0 0 1 0 0 1 0 0

1 1 1 0 0 0 1 0

1 0 0 1 1 0 0 1

28 of 68

  • What is checksum? Calculate for given data that the code is accepted or rejected?
  • 466F, 726F, 757A, 616E

Checksum on Hex data

29 of 68

Checksum on Hex data

30 of 68

Checksum on Hex data

31 of 68

Reference Table

32 of 68

Cyclic Redundancy Check

CRC

33 of 68

Cyclic Redundancy Check

CRC

34 of 68

Cyclic Redundancy Check

Data : 1 1 0 0 1 0 0 1

Divisor: 1 0 0 1

1 1 0 0 1 0 0 1

1 0 0 1

0 0 0

Sender side (Generate redundancy)

35 of 68

Cyclic Redundancy Check

Sender side

Codeword : 1 1 0 0 1 0 0 1 0 1 1

36 of 68

Cyclic Redundancy Check

Codeword : 1 1 0 0 1 0 0 1 0 1 1

Divisor: 1 0 0 1

1 1 0 0 1 0 0 1

1 0 0 1

0 1 1

Receiver side (check redundancy)

37 of 68

Cyclic Redundancy Check

Codeword : 1 1 0 0 1 1 0 1 0 1 1

Divisor: 1 0 0 1

1 1 0 0 1 1 0 1

1 0 0 1

0 1 1

Receiver side (check redundancy) detect error

38 of 68

Cyclic Redundancy Check

Receiver side (check redundancy) detect error

39 of 68

Cyclic Redundancy Check

CRC

40 of 68

Binary Division

41 of 68

Polynomial

42 of 68

Polynomial and Divisor

43 of 68

Figure Division in CRC encoder

44 of 68

Figure Division in the CRC decoder for two cases

45 of 68

Figure Division in the CRC decoder for two cases

46 of 68

CRC at sender side and generated codeword

47 of 68

Single-bit error correction

To correct an error, the receiver reverses the value of the altered bit. To do so, it must know which bit is in error.

Number of redundancy bits needed

  • Let data bits = m
  • Redundancy bits = r

∴Total message sent = m+r

The value of r must satisfy the following relation:

2r ≥ m+r+1

48 of 68

Error Correction

49 of 68

Hamming Code

50 of 68

Single-bit error correction

To correct an error, the receiver reverses the value of the altered bit. To do so, it must know which bit is in error.

Number of redundancy bits needed

  • Let data bits = m
  • Redundancy bits = r

∴Total message sent = m+r

The value of r must satisfy the following relation:

2r ≥ m+r+1

51 of 68

Hamming Code

Data : 1 0 0 1 1 0 1 ( 7-bit )

The value of r must satisfy the following relation:

2r ≥ m+r+1

52 of 68

Hamming Code

53 of 68

Hamming Code

54 of 68

Hamming Code

55 of 68

Hamming Code

56 of 68

Hamming Code

Corrected

57 of 68

Error

Detection

58 of 68

Error Correction (1-bit correction)

Summarization

59 of 68

Error Correction

Hamming Code

60 of 68

Hamming Code

61 of 68

Hamming Code

62 of 68

Example of Hamming Code

63 of 68

Single-bit error

64 of 68

Error

Detection

65 of 68

Checking for error:

Receiver does the step 3 operation stated above on codeword C. After this operation, the bit combination represents a binary number which corresponding to a decimal number. If the decimal number is 0 then there is no error. Otherwise, if the decimal number is n then it is concluded that the n-th bit is error-bit.

66 of 68

Computer Network

  • Error Detection & Correction

  • Hamming Code method (1-bit correction)

  • IP Address /Class
  • Subnetting with an Example
    • Subnet
    • Subnet mask
  • Some Questions

67 of 68

IP Address/Class ???

Q-What is the broadcast address of the network 172.31.180.128/25?

Q-What valid host range is the IP address 10.254.201.56/20 a part of?

Q-How many subnets and hosts per subnet can you get from the network 172.28.0.0/23?

Q-What is the last valid host on the subnetwork 172.19.156.0/23?

Q-What valid host range is the IP address 192.168.206.28

 255.255.255.248 a part Of?

68 of 68

IP Address/Class ???

Q-What is the broadcast address of the network 172.31.180.128/25?

ANS: 172.31.180.255

Q-What valid host range is the IP address 10.254.201.56/20 a part of?

ANS: 10.254.192.1 to 10.254.207.254

Q-How many subnets and hosts per subnet can you get from the network 172.28.0.0/23?

ANS: 128 subnets and 510 hosts

Q-What is the last valid host on the subnetwork 172.19.156.0/23?

ANS: 172.19.157.254

Q-What valid host range is the IP address 192.168.206.28 255.255.255.248 a part Of?

ANS: 192.168.206.25 through to 192.168.206.30