Skip to content

3.2 ARP

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

  1. Open Cisco Packet Tracer.
  2. Place two PCs (PC0 and PC1) on the workspace.
  3. Connect them using a straight-through cable (or connect them via a switch if you want to include a switch in the topology).
  4. Assign IP addresses to the PCs:
    • PC0: 192.168.1.10 with subnet mask 255.255.255.0.
    • PC1: 192.168.1.20 with subnet mask 255.255.255.0.

Step 2: Verify Connectivity

  1. Open the Command Prompt on PC0.
  2. 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

  1. 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.
  2. Capture ARP Traffic:

    • Go to Simulation Mode in Packet Tracer.
    • Set the filter to show only ARP and ICMP packets.
    • Start the simulation.
  3. Ping PC1 Again:

    • On PC0, ping PC1:
      Terminal window
      ping 192.168.1.20
    • Observe the packets in the simulation window.

Step 4: Analyze the ARP Process

  1. 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).
  2. 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.
  3. 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

  1. 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:
      192.168.1.20 00-50-0F-XX-XX-XX dynamic
      (Replace XX-XX-XX with the actual MAC address of PC1.)
  2. 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.