将 arp 绑定添加到 ARP 表 Linux

发布于 2024-11-25 08:58:58 字数 730 浏览 2 评论 0原文

我试图将 ARP 绑定添加到 Linux 中的 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

这就是我想要做的,但我收到以下错误:

arp -s 192.168.43.138 00:00:22:33:33:33
SIOCSARP: Invalid argument

任何其他 IP 地址都工作正常,只是这个导致了错误 有什么想法吗? (这可能不是mac地址的问题,我尝试了很多其他地址)

Im trying to add an ARP binding into ARP table in linux, my arp table looks like this:

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一场春暖 2024-12-02 08:58:58

尝试使用 -i 指定接口,如果这不起作用,那么您可能正在尝试为自己的 IP 地址添加 MAC 条目。

Try to specify interface with -i, if that does not work then you probably trying to add MAC entry for your own IP address.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文