Query regarding ARP request on a multi-homed system
Hi, Have a doubt regarding ARP behavior in case of a multi-homed linux box. Assume there are two interfaces eth0 and eth1 each configured with IPs belonging to differrent subnets. Say IP1 is assigned to eth0 and IP2 to eth1. Now if an ARP request comes on eth0 for IP2, what is the behavior on Linux? Thanks in advance for your answers. Thanks, Chaitra
In my guess the eth0 interface will not do anything and drop the packet. On Thu, Jun 26, 2014 at 11:43 AM, Chaitra Ramaiah <linux.delve@gmail.com> wrote:
Hi,
Have a doubt regarding ARP behavior in case of a multi-homed linux box.
Assume there are two interfaces eth0 and eth1 each configured with IPs belonging to differrent subnets. Say IP1 is assigned to eth0 and IP2 to eth1. Now if an ARP request comes on eth0 for IP2, what is the behavior on Linux?
Thanks in advance for your answers.
Thanks, Chaitra
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Thanks Ankur Dwivedi You can follow me on twitter @ankurdwi
On Thu, Jun 26, 2014 at 12:16 PM, ankur dwivedi <ankurengg2003@gmail.com> wrote:
In my guess the eth0 interface will not do anything and drop the packet.
I happen to be the admin of a few server also and one of them is having multiple lan card. In that , one card is configured as 192.168.1.1 (eth1) and the another 192.168.2.1 (eth2) and the other (eth0) for global ip address . Now , i just tried this - from 192.168.1.1 network (from the lan of eth1) , i tried to ping 192.168.2.1 and I received the reply . So the interface is not dropping the packet .
On Thu, Jun 26, 2014 at 11:43 AM, Chaitra Ramaiah <linux.delve@gmail.com> wrote:
Hi,
Have a doubt regarding ARP behavior in case of a multi-homed linux box.
Assume there are two interfaces eth0 and eth1 each configured with IPs belonging to differrent subnets. Say IP1 is assigned to eth0 and IP2 to eth1. Now if an ARP request comes on eth0 for IP2, what is the behavior on Linux?
Thanks in advance for your answers.
Thanks, Chaitra
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Thanks
Ankur Dwivedi
You can follow me on twitter @ankurdwi
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
At 2014-06-26 02:13:30, "Chaitra Ramaiah" <linux.delve@gmail.com> wrote:
Hi,
Have a doubt regarding ARP behavior in case of a multi-homed linux box.
Assume there are two interfaces eth0 and eth1 each configured with IPs belonging to differrent subnets. Say IP1 is assigned to eth0 and IP2 to eth1. Now if an ARP request comes on eth0
for IP2, what is the behavior on Linux?
I'm not familiar with networking, but arp_announce and arp_ignore in Documentation/networking/ip-sysctl.txt maybe the answer!
Thanks in advance for your answers.
Thanks, Chaitra
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
arp_filter may fit better. 0 - (default) The kernel can respond to arp requests with addresses from other interfaces. This may seem wrong but it usually makes sense, because it increases the chance of successful communication. IP addresses are owned by the complete host on Linux, not by particular interfaces. Only for more complex setups like load- balancing, does this behaviour cause problems. -daveti On Jun 26, 2014, at 12:38 AM, wei zhang <asuka.com@163.com> wrote:
At 2014-06-26 02:13:30, "Chaitra Ramaiah" <linux.delve@gmail.com> wrote:
Hi,
Have a doubt regarding ARP behavior in case of a multi-homed linux box.
Assume there are two interfaces eth0 and eth1 each configured with IPs belonging to differrent subnets. Say IP1 is assigned to eth0 and IP2 to eth1. Now if an ARP request comes on eth0 for IP2, what is the behavior on Linux?
I'm not familiar with networking, but arp_announce and arp_ignore in Documentation/networking/ip-sysctl.txt maybe the answer!
Thanks in advance for your answers.
Thanks, Chaitra
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Thanks guys for your reponses. It helped. Taking a cue from your responses, did a bit of digging from resources and this is what it all boils down to: 1) arp_filter works well if the IPs on the interfaces belong to differrent subnets. 2) If the IPs share the same subnet, then arp_announce and arp_ignore does the job. Specifically arp_ignore takes 1 and arp_ignore should take 2 for this situation. Thanks all. Regards, Chaitra On Thu, Jun 26, 2014 at 11:28 PM, Dave Tian <dave.jing.tian@gmail.com> wrote:
arp_filter may fit better.
0 - (default) The kernel can respond to arp requests with addresses from other interfaces. This may seem wrong but it usually makes sense, because it increases the chance of successful communication. IP addresses are owned by the complete host on Linux, not by particular interfaces. Only for more complex setups like load- balancing, does this behaviour cause problems.
-daveti
On Jun 26, 2014, at 12:38 AM, wei zhang <asuka.com@163.com> wrote:
At 2014-06-26 02:13:30, "Chaitra Ramaiah" <linux.delve@gmail.com> wrote:
Hi,
Have a doubt regarding ARP behavior in case of a multi-homed linux box.
Assume there are two interfaces eth0 and eth1 each configured with IPs belonging to differrent subnets. Say IP1 is assigned to eth0 and IP2 to eth1. Now if an ARP request comes on eth0 for IP2, what is the behavior on Linux?
I'm not familiar with networking, but arp_announce and arp_ignore in Documentation/networking/ip-sysctl.txt maybe the answer!
Thanks in advance for your answers.
Thanks, Chaitra
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (5)
-
ankur dwivedi -
Chaitra Ramaiah -
Dave Tian -
Sudip Mukherjee -
wei zhang