3.2 ARP
   ARP (Address Resolution Protocol)  Click here to learn the basics!    
 
Example
Example of how ARP (Address Resolution Protocol) works in Cisco Packet Tracer. We’ll create a simple network with two PCs and observe how ARP resolves IP addresses to MAC addresses.
Topology
- Two PCs: PC0 and PC1.
- A single switch: Switch0 (optional, as ARP works in a direct connection as well).
Step 1: Set Up the Network
- Open Cisco Packet Tracer.
- Place two PCs (PC0 and PC1) on the workspace.
- Connect them using a straight-through cable (or connect them via a switch if you want to include a switch in the topology).
- Assign IP addresses to the PCs:
- PC0: 192.168.1.10with subnet mask255.255.255.0.
- PC1: 192.168.1.20with subnet mask255.255.255.0.
 
- PC0: 
Step 2: Verify Connectivity
- Open the Command Prompt on PC0.
- Ping PC1 to test connectivity:
Terminal window ping 192.168.1.20- The first ping may take a little longer because PC0 needs to resolve the MAC address of PC1 using ARP.
- Subsequent pings will be faster because the MAC address is now cached in the ARP table.
 
Step 3: Observe ARP in Action
- 
Clear the ARP Cache: - On PC0, clear the ARP cache to simulate a fresh start:
Terminal window arp -d
- This ensures that PC0 does not already have the MAC address of PC1 cached.
 
- On PC0, clear the ARP cache to simulate a fresh start:
- 
Capture ARP Traffic: - Go to Simulation Mode in Packet Tracer.
- Set the filter to show only ARP and ICMP packets.
- Start the simulation.
 
- 
Ping PC1 Again: - On PC0, ping PC1:
Terminal window ping 192.168.1.20
- Observe the packets in the simulation window.
 
- On PC0, ping PC1:
Step 4: Analyze the ARP Process
- 
ARP Request: - PC0 sends an ARP broadcast request to all devices on the network, asking, “Who has 192.168.1.20?”
- The ARP request is encapsulated in an Ethernet frame with:
- Source MAC: PC0’s MAC address.
- Destination MAC: FFFF.FFFF.FFFF(broadcast address).
 
 
- PC0 sends an ARP broadcast request to all devices on the network, asking, “Who has 
- 
ARP Reply: - PC1 receives the ARP request and responds with an ARP reply, providing its MAC address.
- The ARP reply is encapsulated in an Ethernet frame with:
- Source MAC: PC1’s MAC address.
- Destination MAC: PC0’s MAC address.
 
 
- 
Ping (ICMP): - Once PC0 has the MAC address of PC1, it sends the ICMP echo request (ping) to PC1.
- PC1 responds with an ICMP echo reply.
 
Step 5: Verify the ARP Table
- 
On PC0, check the ARP table to see the IP-to-MAC mapping for PC1: Terminal window arp -a- You should see an entry like:
(Replace192.168.1.20 00-50-0F-XX-XX-XX dynamicXX-XX-XXwith the actual MAC address of PC1.)
 
- You should see an entry like:
- 
On PC1, you can also check its ARP table to see the mapping for PC0: Terminal window arp -a
Step 6: Optional - Use a Switch
If you included a switch in the topology:
- The switch will forward the ARP broadcast request to all connected devices except the sender (PC0).
- The switch will also learn the MAC addresses of PC0 and PC1 and update its MAC address table.
 
 