将 arp 绑定添加到 ARP 表 Linux
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6779054/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Adding arp bindings into ARP table Linux
提问by shaggy
Im trying to add an ARP binding into ARP table in linux, my arp table looks like this:
我试图在 linux 中将 ARP 绑定添加到 ARP 表中,我的 arp 表如下所示:
IP address HW type Flags HW address Mask Device
192.168.3.12 0x1 0x6 00:0c:29:89:c5:cc * eth1
192.168.3.100 0x1 0x6 00:0c:29:89:c5:c8 * eth1
192.168.43.2 0x1 0x2 00:50:56:e1:65:76 * eth0
192.168.3.111 0x1 0x6 00:11:22:33:44:55 * eth1
192.168.43.139 0x1 0x6 00:0c:29:89:c5:cc * eth0
this is what im trying to do, but i get the following error:
这就是我想要做的,但我收到以下错误:
arp -s 192.168.43.138 00:00:22:33:33:33
SIOCSARP: Invalid argument
Any other IP addresses are working fine, just this one is resulting in an error Any ideas what is wrong here? (it is not a problem of mac address probably, ive tried many other addresses)
任何其他 IP 地址都可以正常工作,只是这个 IP 地址会导致错误 知道这里有什么问题吗?(可能不是mac地址的问题,我试过很多其他地址)
采纳答案by Karoly Horvath
Try to specify interface with -i
, if that does not work then you probably trying to add MAC entry for your own IP address.
尝试使用 指定接口-i
,如果这不起作用,那么您可能尝试为自己的 IP 地址添加 MAC 条目。