Wednesday, March 9, 2022

Adding a Static ARP Entry

If you can't add a static ARP entry from an elevated command prompt with the ARP command, you can do it with the netsh command instead.  


#Failed

C:\Windows\system32>arp -s 192.168.12.80 08-f1-ea-95-a1-2a

The ARP entry addition failed: Access is denied.

# Find the interface name

C:\Windows\system32>netsh interface show interface

Admin State    State          Type             Interface Name

-------------------------------------------------------------------------

Enabled        Connected      Dedicated        Ethernet


# Add the ARP entry. 

# netsh interface ip add neighbors "InterfaceName" "IPAddress" "MACAddress"

C:\Windows\system32>netsh interface ip add neighbors "Ethernet" "192.168.12.80" "08-f1-ea-95-a1-2a"

C:\Windows\system32>netsh interface ip delete neighbors "Ethernet" "192.168.12.80"

Ok.

C:\Windows\system32>