Description
Computer Networks Practical Assignment 4 [Max Marks: 10] Instructions:
Software Required
• OS: Linux (Ubuntu/Fedora)
• Language: C/C++
• Tool: Wireshark
Upload files with comments
Example: RollNo_4_Sender.cpp and RollNo_4_Receiver.cpp, RollNo_4.pcap (Wireshark capture file)
Total No. of files required=4 (2 .cpp files for Sender and Receiver + RollNo_4output.pdf (screen shots of output+wireshark screenshots) + 1 Wireshark capture file)
Assignment Question:
Lab Assignment on Unit V: (Mandatory Assignment) (Use C/C++)
Write a program for error detection and correction for 7/8 bits ASCII codes using Hamming Codes or CRC. Demonstrate the packets captured traces using Wireshark Packet Analyzer Tool for peer to peer mode. (50% students will perform Hamming Code and others will perform CRC) Note:
Use 127.0.0.1 IP address at sender and receiver side. (Because it is Peer to Peer)
Hamming Code: (Batch T1-Roll No. 3301-3311, Batch T2-Roll No. 3323-3333, Batch T3-
Roll No. 3345-3355)
CRC: (Batch T1-Roll No. 3312-3322, Batch T2-Roll No. 3334-3344, Batch T3-Roll No. 3356-3365 )
Hamming Code:
Sender Side: Input is first character of your name (Eg. A), Generate 8 bit binary of char ascii (Eg. binary of ‘A’ =01000001, Calculate Codeword=m+r using hamming code, Send codeword to receiver using TCP socket Receiver Side:
Receive Codeword using TCP Socket
Print Menu: 1. Data received without Error 2. Data received with Error
1. Data received without Error: Calculate syndrome using received codeword, Syndrome will be zero, Extract m from codeword (remove redundancy r), Convert binary of m into character.
2. Data received with Error: Use random function to generate error in received code word, Calculate syndrome using received codeword, Syndrome will be the position of error in codeword (Error Detection), Flip error bit (Error Correction), Extract m from codeword, Convert binary of m into character. m=message or data bits, r=redundancy
CRC:
Sender Side: Input string is your first name (Eg. Ankita), Generate binary of string ascii
(Eg. binary of one char (8bit) ‘A’ =01000001, here Length of string Ankita (6×8) =48bits), Calculate Codeword=m+r using crc, Send codeword to receiver using TCP socket
Dividend: string in binary (m) + append n zero’s where n is degree of divisor polynomial (one less than the number of bits in divisor)
Use divisor CRC32=100000111 (x8+x2+x+1) [here degree is 8] Receiver Side:
Receive Codeword using TCP Socket, Dividend=Codeword
Use divisor CRC32=100000111
Print Menu: 1. Data received without Error 2. Data received with Error
1. Data received without Error: Calculate syndrome (Remainder) using received codeword, Syndrome will be zero, Extract m from codeword (remove redundancy r), and Convert binary of m into string.
2. Data received with Error: Use random function to generate error in received code word,
Calculate syndrome using received codeword, Syndrome will be non-zero (Error Detection), Discard received message and send Error message to sender m=message or data bits, r=redundancy
Rubrics for Evaluation (Example)
Question No. Criteria Best [4] Good [3] Average [2] Poor [1]
Q1
[10 marks] Completeness [4] Perfect Can be better Satisfied Poor
Uniqueness [3] Perfect Can be better Satisfied Poor
Documentation/Comments [3]
Perfect Can be better Satisfied Poor
Prof Nikita Singhal DR SR Dhore
(Subject Incharge) (HoD)




Reviews
There are no reviews yet.