Sửa lỗi arp entry addition failed access is denied

\>> "I am writing a batch file that must run under restricted account for arp -s" - this won't work by OS >>design, a user cannot change network settings, be it IP, be it MAC address. Totally, wrong since my batch file is working perfectly in Windows XP, Vista and bash scripts in Linux and MacOS.

Only failing one is Windows 7 even in administrator account.

\>>Access denied: you cannot use "runas" as a solution since it will still run with the lower permissions >>of the target-user, unless you switch off UAC.

I already switched off the UAC.

\>>Also "administrator" is disabled by win 7 by default, >>so you cannot run interactively with this >>account.

I am admin in my machine. I run the cmd prompt as admin.

\>>Also one more hint - are you trying to overwrite an existing dynamic arp-mapping? if yes, what >>happens if you try with a fake IP?

Yes, I try to overwrite an existing mapping. But what kind of fake IP are you talking about?

For info, my first aim is just to set a static IP-MAC with arp -s command. Then, I will be dealing with my batch script to do that. Right now, I even cannot "arp -s ip mac".

Thứ Ba, 31 tháng 3, 2009 vào lúc 12:06 |

Như chúng ta đã biết, trong windows xp thật sự dễ dàng để thêm một static entry đến bảng ARP, nhưng khi thực hiện tương tự với Windows Vista hay Windows 7 bạn sẽ gặp phải thông báo "The ARP entry addition failed: Access is denied." Thông báo có vẻ như bạn không đủ quyền để thực thi câu lệnh, nhưng cho dù bạn thực thi với tài khoản Administrator thì lỗi trên vẫn xuất hiện. Sau đây là cách khắc phục: Start > Run > and type \> netsh -c "interface ipv4" netsh interface ipv4> add neighbors "Local Area Connection" "xx.x.x.x" "mm-mm-mm-mm-mm-mm" Với Local Area Connection là tên của Network Connection của bạn xx.x.x.x là địa chỉ ip mm-mm-mm-mm-mm-mm là mac address tương ứng của ip ở trên

When attempting to add a static ARP entry for a Network Interface Module, using the arp -s command, a message displays saying "The ARP entry failed addition failed: 5" appears in the DOS screen.

This is caused by a windows login that was used on this PC is not part of the administrators group.It is necessary to log into Windows as a user with administrative privileges in order to add a static ARP entry to the ARP table.

I'm on Windows 7 and am trying to assign a static arp entry for my default gateway using the command:

arp -s 172.24.7.254 00-05-01-f9-28-00 172.24.1.20

But I get the following error:

The ARP entry addition failed: Access is denied.

When I don't mention my ip-address at the end, the static ip gets assigned for the virtual interface created automatically for virtualbox. I'm using an elevated prompt. I'll be grateful for suggestions. Thanks.

Dave M

13.2k25 gold badges37 silver badges48 bronze badges

asked Jan 27, 2010 at 16:21

1

Here is what I found and it works great

arp -s : access denied. On the default gateway

Here is what I used :

delete:

netsh interface ip delete neighbors "Network card name here" "Gateway.IP.goes.here"

Add:

netsh interface ip add neighbors "Network card name here" "Gateway.IP.goes.here" "MAC-address-of-gateway-with-dash-here"

good luck

Kevin Panko

7,35622 gold badges44 silver badges53 bronze badges

answered Jan 29, 2010 at 20:42

RigorMRigorM

4565 silver badges3 bronze badges

3

To set arp static in windows 7 64bit you must use netsh comand as follow

enter this command

netsh interface ipv4 add neighbors "Local Area Connection" inetaddr MAC

For Example

netsh interface ipv4 add neighbors "Local Area Connection" 192.168.0.1 00-24-01-d2-3a-bd

[If you are using a wireless rather than a LAN cable connection, use "Wireless Network Connection" instead.]

Chủ Đề