10-05-2012 09:26 AM
I need to create a program to delete an entry in the ARP table in Windows 7 with LabVIEW or TestStand. The test that I am developing communicates with the DUT over Ethernet. Each DUT has the same IP address to start but different MAC addresses. I am noticing that there can be long delays in the test execution when trying to connect and deleting the previous entry in the ARP table seems to help. But currently I have to do this manually through the command line. The command "arp -d" requires elevated privileges. I have been having a tough time getting LabVIEW to elevate the system exec. Does anybody have an ideas? Is there any .NET access to the ARP table?
Thanks,
Paul
Solved! Go to Solution.
10-05-2012 09:59 AM
Well, you can elevate LabVIEW (or your built application) itself.
Close LabVIEW, then Right-click the LabVIEW icon and select "run as administrator".
Running the command "netsh interface ip delete arpcache" returns now an "OK" and clears the ARP table.
(Running the same in plain LabVIEW gives an elevation error).
10-08-2012 08:27 AM
@altenbach wrote:
Well, you can elevate LabVIEW (or your built application) itself.
Close LabVIEW, then Right-click the LabVIEW icon and select "run as administrator".
Running the command "netsh interface ip delete arpcache" returns now an "OK" and clears the ARP table.
(Running the same in plain LabVIEW gives an elevation error).
I've thought about that and this will probably not work too well in my case. This will actualy be a TestStand execution. I would have to elevate the OI and there a multiple shortcuts that could launch it.
Any other ideas?
10-08-2012 08:50 AM - edited 10-08-2012 09:05 AM
I would try looking into tuning the ARP timing parameters in Windows.
We suffered from various TCP performance/connection problems some years ago and our solution was to modify the the default number of TCP sockets and timeouts (we were experiencing port exhaustion). The tweeks eliminated most of our problems, no LV/TS code changes required.
I tried to find info on ARP settings for Windows 7, but it seems that there is much less info available than ther is for XP.
The registry keywords most common for older versions of Windows were "ArpCacheLife" and "ArpCacheMinReferencedLife"
EDIT:
These settings were apparently removed in Vista. I found this on the M$ site; they may apply to later versions as well since M$ is following an RFC for ARP management...
http://support.microsoft.com/kb/949589
10-08-2012 10:24 AM
@PhillipBrooks wrote:
I would try looking into tuning the ARP timing parameters in Windows.
We suffered from various TCP performance/connection problems some years ago and our solution was to modify the the default number of TCP sockets and timeouts (we were experiencing port exhaustion). The tweeks eliminated most of our problems, no LV/TS code changes required.
I tried to find info on ARP settings for Windows 7, but it seems that there is much less info available than ther is for XP.
The registry keywords most common for older versions of Windows were "ArpCacheLife" and "ArpCacheMinReferencedLife"
EDIT:
These settings were apparently removed in Vista. I found this on the M$ site; they may apply to later versions as well since M$ is following an RFC for ARP management...
http://support.microsoft.com/kb/949589
The benifit of describing what I am trying to do has lead me to the solution I didn't know I wanted. Thanks Phillip!
(Question - Should I mark this as solved or not? It solves my problem but not necessarly my question (i.e. Deleting ARP table and/or elevated executions)...
02-24-2014 09:27 AM
Hi Paul, did you find a solution to this, or did you do other things for sixty seconds to let the cache go stale?
I'm having the same issue in that I have a vi, which was written for XP, which changes a DUT MAC address, then clears the ARP cache using system exec. When I deploy this to a Win 7 PC, I get the elevation failure.