DCN Lab 04 - Wireshark
DCN Lab 04 - Wireshark
(EL-2007)
LABORATORY MANUAL
Fall 2024
(LAB# 04)
Packet Capturing and Analysis
Dr. Aamer Hafeez
_______________________________
LAB ENGINEER SIGNATURE & DATE
Objective
Introduction
The basic tool for observing the messages exchanged between executing protocol entities is
called a packet sniffer. As the name suggests, a packet sniffer captures (“sniffs”) messages being
sent/received from/by your computer. A packet sniffer is:
• Passive in nature
• Observes messages being sent and received by applications and protocols
• Never sends packet itself
• Packets are never addressed to the sniffer
• It only receives a copy of packet
To start capturing the packets, you need to select a network connection. Select appropriate
connection on your machine which is currently connected to a network/internet.
Select the active interface and hit the ‘Start” button to start capturing the packets. Once packet
capture is started, you can see the activity going on in the Wireshark window as shown below:
The captured packets on the screen can be filtered based on any component according to your
requirements. For example, if we want to see only the packets with the ICMP protocol, we can
apply filters to that option. All the packets with ICMP as the protocol will only be displayed on
the screen, shown below:
Example Filtering
ip.addr==10.0.10.142
tcp.port==443
tcp contains Facebook
Lab Tasks:
Task 01: ICMP
a. Start Wireshark, and ping any computer. Use filter to search for the ping packets in the
wireshark. If found, paste the snapshot below. Note that the ping uses the ICMP protocol
c. Confirm if the IP addresses are of your computer, and the computer you are pinging to is
same as in the ping packet you have captured.
d. Find the source and destination MAC addresses of these ping packets, and find out whose
MAC addresses are these.
Typically, when two hosts are communicating, they already know each other’s IP address. They
can know each other’s IP address from a variety of methods: sometimes it is manually provided
by a user, sometimes by another protocol (often DNS).
However, what is definitely not known is their MAC addresses. The hosts will use ARP to discover
the appropriate MAC address. To put it another way, ARP will use the known IP address, and
discover the unknown MAC address. The discovered mapping is then added and stored in
an ARP Table, which is a mapping of IP addresses to correlating MAC addresses.
• When a Client is speaking to a host in the same network, it will ARP for the MAC address of
the host
• When a Client is speaking to a host in a different network, it will ARP for the MAC address of
the Default Gateway
•
ARP table:
An ARP table/cache is a collection of Address Resolution Protocol entries that are created when
an IP address is resolved to a MAC address. Every computer maintains this table based on the
communication it does with other computers on its network. To view this table on your
computer, run the following command.
> arp –a
a. Run the above command to find the arp table at your computer. Paste the results over
here.
Task 03: Select any other packet, and see what different information is provided in that packet.
List down that information below
In this list we have ARP protocol packets who source and destination are present below.