0
I can't see to find a way to add an active/dynamic arp entry.
This all started with old Win32 exe that calls the SetIpNetEntry API to create a dynamic/active arp entry as part of a process to setup the IP address on some embedded hardware. the SetIpNetEntry api returns a success code but no entry is created. (This code of course works fine on Win XP.)
I then tried to create one by hand via
netsh interface ip add neighbors interface=10 address="IpAddr" neighbor="MacAddr" store=active
This creates and arp entry but the type created is permenent. It seems to just ignore the store=active.
At this point I can't seem to find a way from a command line or API to create a active/dynamic entry. I don't want a permenent entry since if the setup program has a problem I don't want this assignment left on the system forever. I just need it for about 15 seconds to assign an IP address.
Is it possible to disable arp feature completely after setting a static arp entry on Windows? You can do this in Linux.
ip link set dev eth0 arp off
orifconfig eth0 -arp
. I don't want my windows device to reply to other device's ARP requests because of some reasons. I will just add the gateway's MAC entry manually. So that my internet connection will work. – Sourav Ghosh – 2018-10-29T09:32:50.607@SouravGhosh: Please use the "Ask Question" link to ask new questions, you can always include a link to this question in your new question if you think it will help people understand your new question. – RedGrittyBrick – 2018-10-29T09:48:23.813
@RedGrittyBrick I have already asked the question more than 1 year ago. https://superuser.com/questions/1183548/ I just commented here to see if any windows experts has an answer. :)
– Sourav Ghosh – 2018-10-29T11:29:48.353I'm aware of arp. I'll have to test the reboot part, but it specifically says it adds a static entry that is permanent in the help text you show. – Kevin Gale – 2012-02-17T17:59:39.627
It does appear they do go away on a reboot. That still doesn't really answer my question. Why isn't there any way to create a dynamic/active entry that goes away on it's own? Why does the netsh command have store=active option if it's not going to use it? – Kevin Gale – 2012-02-17T18:08:34.250
I up-voted but didn't accept. Knowing the static address will disappear at reboot is helpful since worst case I can use a static and know it will go away eventually. Also I went back to my code and changed the type to static. Now the SetIpNetEntry api works. I still don't understand why it doesn't work for dynamic. Something changed between XP and Win7 and it doesn't even generate a error just a false success. – Kevin Gale – 2012-02-17T18:35:00.583