arp problem with 2 NIC's

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm still trying to solve an arp problem I have with a host that has 2
NIC's connected to the same network, same subnet.

I need to make sure that arp responses only appear on either of the
interfaces depending on where the arp request originated.

This would require the use of /proc/sys/net/ipv4/conf/all/arp_filter and
source routing

I did find a confirmation of this in the kernel mailing list
http://hypermail.idiosynkrasia.net/linux-kernel/archived/2002/week16/0458.html
but I'm having trouble setting up the routes.I used the following script
to test it but it fails when trying to set the second network route with
an RTNETLINK file exists.

IF1=eth0
IF1=eth1
P1_NET=192.168.1.0/24
P2_NET=192.168.1.0/24
P1=192.168.1.1
P2=192.168.1.1
IP1=192.168.1.95
IP2=192.168.1.99
T1=200
T2=201

ip route add $P1_NET dev $IF1 src $IP1 table $T1
ip route add default via $P1 table $T1
ip route add $P2_NET dev $IF2 src $IP2 table T2
ip route add default via $P2 table $T2

ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2

ip route add default via $P1

Can anyone point out my (probably simple) mistake? I'm assuming it's in
my understanding of how to set this.

Regards
Geoff




_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux