Open In App

ARP in Wireshark

Address resolution protocols are used to dynamically discover mappings between layer 3 (protocol) and layer 2 (hardware) addresses. A common usage is to map an IP address (e.g., 192.168.0.10) to an underlying Ethernet address (e.g., 01:02:03:04:05:06). These addresses are determined via his ARP, so you’ll often see his ARP packets at the start of a conversation.

Working of ARP:

When a host has to find the MAC address of the destination (using the destination’s IP address) the ARP program checks its ARP lookup table to see if IP to MAC address translation is already done.



MAC Address:​ 

MAC Addresses are a unique 48-bit hardware number of a computer, which is embedded into a network card NIC (known as Network Interface Card) during the time of manufacturing. The MAC Address is also known as the Physical Address of a network device.

Note: use arp -d to clear cache in command prompt (run as administrator) and use arp -a to broadcast the ARP packets in the same command prompt.



Sample ARP Capture:

 

 

Preference Settings:

  1. Select ARP/RARP in the Wireshark Preference prompt box
  2. Now, Check ‘Detect duplicate IP address configuration’ inside it 
  3. Check ‘Register network address mappings’ inside it 
  4. Click on ‘OK’

IP Packet:

 

The MAC header will include three fields:

>> For IP Packet
Source address is (28:c6:3f:d1:61:b8) 
and destination address is (fa:38:80:2b:a4:64) 
and the EtherType is IPv4 (0x0800) with Protocol ID 6.
>> For ARP Packet
Source address is (28:c6:3f:d1:61:b8) 
and destination address is (ff:ff:ff:ff:ff:ff) 
and the EtherType is ARP (0x0806) and it has no Protocol ID.

Request Packet : Broadcast:

Since the destination’s MAC address is not known, an ARP Request of the Destination’s IP address is sent in the form of a broadcast to all the devices on the LAN.

 

Reply Packet – unicast:

Since, here, the MAC address is sent to the Router, and we know its IP address and MAC address, and the source is the device, the destination address is unicast.

 

ARP Packet Request-Reply Verification:

The Payload for ARP Packet:

The payload of the packet contains the following:

It also has the other following attributes :

ARP Request Payload:

Hardware (MAC) Source Address: 
 28:c6:3f:d1:61:b8
Hardware (MAC) Destination Address: 
00:00:00:00:00:00 
( Since we don’t know the 
MAC address of destination)
Protocol (IP) Source Address: 
 172.20.10.6
Protocol (IP) Destination Address: 
172.20.10.1 (This is the default 
gateway IP address of the router )
Opcode: 1
Hardware type: Ethernet
Hardware Size: 4
Protocol type: IPv4
Protocol Size: 6

ARP Reply Payload:

Hardware (MAC) Source Address: 
 fa:38:80:2b:a4:64
Hardware (MAC) Destination Address: 
28:c6:3f:d1:61:b8
Protocol (IP) Source Address: 
 172.20.10.1
Protocol (IP) Destination Address: 
 172.20.10.6 (This is the default 
 gateway IP address of the router )
Opcode: 2
Hardware type: Ethernet
Hardware Size: 4
Protocol type: IPv4
Protocol Size: 6

Fields in ARP:

1. arp. probe: 

2. arp. announcement:

3. arp. gratuitous:


Article Tags :