how-to_‎ > ‎

Generate unsolicited arps in Linux

posted Sep 7, 2011, 7:22 AM by Daniele Albrizio   [ updated Sep 7, 2011, 7:29 AM ]
When you use an ip recently used by another host in the same subnet, usually you have a broken off-subnet connectivity due to arp cache inside your default gateway router. What you have to do is either clear the router cache for the interface you are connected to or let the router overwrite the old entry in its arp cache with your new mac address. To do this last trick you need to send an unsolicited arp saying to the world (broadcast) that your mac address uses the new IP. To do so you need:
  1. Install the arping package
  2. Arp-ping the gateway using your new address as souce
    # arping -S 192.168.1.100  192.168.1.1
    where 192.168.1.100 is your new address and 192.168.1.1 is your gateway
Simple, isn't it?

Comments