Linux – Persistent static ARP entries on Windows, is it possible

arplinuxnetworkingwindows-xp

I am currently running coLinux configured in "ndis-bridged" networking mode, on a machine whose wireless networking card or driver seems incapable or unwilling to accept non-broadcast layer 2 traffic, or traffic not destined for the wireless card's primary MAC address.

After figuring out this was the problem, I tried configuring the coLinux interface to have the same MAC address as the host machine. Magically, networking started to function. Unfortunately only a single problem remains: the host machine cannot talk to the coLinux instance, even though the rest of the LAN can.

I figured out that by adding a static ARP entry to the host for the coLinux instance's IP address(es), I could accomplish full connectivity in bridged mode, even though the wireless card/driver didn't want to play along.

Despite the hackishness of this setup, I would like to keep it for a few reasons, primarily of which is IO performance for the coLinux instance. This brings me to a problem: persisting the ARP entries on the host machine.

I have searched the web, but have been unable to find the WinNT equivalent of /etc/arp from UNIX. Does such a file exist? I suspected somewhere in the registry, but alas, my searches thus far have been fruitless.

My only alternative is to run a batch file at startup to recreate the ARP entries using the arp command line tool, but this, ironically, seems hackish. 🙂

Thanks.

Best Answer

netsh interface ipv4 add neighbors "Local Area Connection" 10.1.1.1 12-34-56-78-9a-bc

this will create a static arp entry that survives reboots. be careful adding the entries though, as you may not be able to remove them without a hotfix:

https://support.microsoft.com/en-us/kb/2718830