Generate ARP traffic on a Windows machine

During a project I had to generate some ARP traffic for research reasons. This page should be a very brief explanation and note about the simple script which I used.

Maybe someone is interested in my keep-it-simple-solution and has some use for it.




Background Information

ARP (Address Resolution Protocol) is used to translate between IP (logical) and MAC (physical) addresses. Communication between OSI layer 2 and 3 is done with this protocol.

RFC 826



Batch script to generate ARP traffic

The idea behind this script is to delete the entry from the local arp table where the MAC-IP address combinations are cached and force a new request by sending a ping packet to a host on the network. With this approach no low level programming is necessary.
 
    -- this ip should exist and respond to pings
    set gw=192.168.1.1

    -- no need to edit below
    :START
    arp -d %gw%
    echo delete arp-table entry.
    ping -n 1 %gw%
    echo pinging host.
    GOTO START

     

    download this script

last updated 02 November 2008