same MAC address for different IP addresses in ARP response
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Issue Description: when an ARP broadcast message comes to my machine as "who has 10.23.28.39?"
i took the wireshark trace on port eth1, in the ARP response my machine is sending 10.23.28.39 is at 2C:76:8A:4E:FF:C1
However, when an ARP broadcast message comes to my machine as "who has 10.23.28.40?"
in the ARP response my machine is sending 10.23.28.40 is at 2C:76:8A:4E:FF:C1
From this it clears that; the RHEL machine is replying with same MAC address for different IP addresses in ARP response.
Please help to resolve this issue. Thanks in advance
OK, so you have two different interfaces with IP addresses in the same IP network. That configuration only makes sense if both interfaces are connected to the same physical network, and under those circumstances the behaviour you're seeing is actually expected.
As this article explains, the reason is as follows: When the Linux IP stack receives an ARP request for an IP address assigned to an interface, the ARP reply will be sent from the interface that received the request, using the MAC address of that interface.
This behaviour is perhaps somewhat counter-intuitive, but it seems to be a valid interpretation of the relevant RFCs.
OK, so you have two different interfaces with IP addresses in the same IP network. That configuration only makes sense if both interfaces are connected to the same physical network, and under those circumstances the behaviour you're seeing is actually expected.
As this article explains, the reason is as follows: When the Linux IP stack receives an ARP request for an IP address assigned to an interface, the ARP reply will be sent from the interface that received the request, using the MAC address of that interface.
This behaviour is perhaps somewhat counter-intuitive, but it seems to be a valid interpretation of the relevant RFCs.
I did get your point, and I did explain. Whenever Linux receives an ARP request on whatever interface for an IP address assigned to any interface, it replies using the MAC address of the interface that received the ARP replay, which may or may not be the interface with the relevant IP address.
You get replies from eth0 because eth0 received the ARP request a few microseconds before the request arrived at eth1. It's all in the linked article.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.