# Wireshark/Arp

Wireshark is a free and open source packet analyzer used for network troubleshooting and analysis. These activities will show you how to use Wireshark to capture and analyze Address Resolution Protocol (ARP) traffic.

## Readings

* Wikipedia: Address_Resolution_Protocol (ARP)
* Wikipedia: Media Access Control (MAC) Address
* Wikipedia: Broadcast Address
* Wikipedia: Ethertype

## Multimedia

* YouTube: Wireshark 101: Address Resolution Protocol, HakTip 124

## Preparation

To prepare for this activity:
* Start your computer.
* Log in if necessary.
* Install Wireshark.

## Activity 1 - Capture ARP Traffic

To capture ARP traffic:
* Start Wireshark, but do not yet start a capture.
* Open an elevated/administrator command prompt.
* Use ipconfig to display the default gateway address. Note the Default Gateway displayed.
* Start a Wireshark capture.
* Use arp -d to clear the ARP cache.
* Use ping <default gateway address> to ping the default gateway address.
* Use arp -a to view the ARP cache and confirm an entry has been added for the default gateway address.
* Close the command prompt.
* Stop the Wireshark capture.

## Activity 2 - Analyze an ARP Request

To analyze an ARP request:
* Observe the traffic captured in the top Wireshark packet list pane. Look for traffic with ARP listed as the protocol. To view only ARP traffic, type arp (lower case) in the Filter box and press Enter.
* Select the first ARP packet.
* Observe the packet details in the middle Wireshark packet details pane. Notice that it is an Ethernet II / Address Resolution Protocol frame.
* Expand Ethernet II to view Ethernet details.
* Observe the Destination field. Notice that the destination field is the Ethernet broadcast address (FF:FF:FF:FF:FF:FF). All devices on the network will receive the ARP request.
* Observe the Source field. This should contain your MAC address. You can use ipconfig /all, getmac, or ifconfig to confirm.
* Observe the Type field. Notice that the type is 0x0806, indicating ARP.
* Expand Address Resolution Protocol (request) to view ARP details.
* Observe the Sender MAC address. Notice that the sender MAC address is your MAC address.
* Observe the Sender IP address. Notice that the sender IP address is your IP address.
* Observe the Target MAC address. Notice that the target MAC address is all zeros, because the target MAC address is unknown at this point.
* Observe the Target IP address. Notice that the target IP address is the IP address of the default gateway.

## Activity 3 - Analyze an ARP Reply

To analyze an ARP reply:
* Select the second ARP packet.
* Observe the packet details in the middle Wireshark packet details pane. Notice that it is an Ethernet II / Address Resolution Protocol frame. Confirm that in the middle packet details pane that the packet is labeled Address Resolution Protocol (reply).
* Expand Ethernet II to view Ethernet details.
* Observe the Destination field. Notice that the destination field is your MAC address.
* Observe the Source field. This should be the MAC address of the default gateway.
* Observe the Type field. Notice that the type is 0x0806, indicating ARP.
* Expand Address Resolution Protocol (reply) to view ARP details.
* Observe the Sender MAC address. Notice that the sender MAC address is the MAC address of the default gateway.
* Observe the Sender IP address. Notice that the sender IP address is the IP address of the default gateway.
* Observe the Target MAC address. Notice that the destination MAC address is your MAC address.
* Observe the Target IP address. Notice that the destination IP address is your IP address.
* Close Wireshark to complete this activity. Quit without Saving to discard the captured traffic.