Programming Assignment 3: ARP Packet Capture and Analysis
CSE 310, Spring 2020
Instructor: Aruna Balasubramanian
Due date: April 27 2020, 9.00pm
The goal of this assignment is to learn how to perform packet capture and analysis on
Wireshark. We are specifically going to look at ARP packets.
Part A Wireshark packet capture (15 points)
Your first task is to capture an ARP exchange from your computer. To do this, open Wireshark
and start recording. It will be easier if you filter for the “arp” packets. You should wait for some
time, browse the Web etc and you will see an ARP message exchange. The message exchange
includes an ARP request and an ARP response. Once you see the exchange, stop the capture and
store the packet as “assignment3_my_arp.pcap”. Read a Wireshark tutorial on the Web if you
are unsure how to do capture messages and store them.
Here is an example ARP message exchange I captured from my computer.
Submit the assignment3_my_arp.pcap and the screenshot of your ARP message exchange
(similar to the example above) for Part A.
Part B Analyze the ARP (85 points)
Your second task is to write a program “analysis_pcap_arp” that analyzes the pcap trace for the
ARP packet. This is similar to your previous assignment, but this time you are not allowed to use
any structure. Perform a byte-level programming to read each byte and convert it to the ARP
header element— the sender MAC address, target MAC address, protocol type, etc. Refer to the
ARP message structure in your book to determine the elements of the ARP message. You can
use existing pcap libraries to get each packet in bytes.
Your program should process the ARP packets. For each packet, you should determine if it is an
ARP packet, and if it is an ARP packet then process it further. Based on your analysis, answer the
following questions:
(i) write a program to count the number of ARP messages in your captured pcap. Your code
should be generic and run on other pcap files with ARP messages.
(i) Print the entire ARP request and response for one ARP packet exchange (preferably the one
you show in the screenshot above).
(ii) Based on the ARP messages, tell us the IP address and MAC address of your router. Explain
how you determined this. You do not need to write code for this.
Submit your well formatted program, answers to (i), (ii), and (iii) and a README that explains
how to run your program including details of your program logic for Part B.
Submission instruction
As before, you should write your program in Python or C/C++. If you want to write in any other
language, please talk to me.
You need to submit your homework in a single zip file as follows:
• The zip file and (the root folder inside) should be named using your last name, first name,
and the assignment number, all separated by a dash (‘-‘) e.g. lastname-firstnameassignment3.zip
• The zip file should contain all submissions for parts A and B.
The post ARP Packet Capture and Analysis appeared first on My Assignment Online.