Routing problem for dual network interfaces
John Mok
jmok1 at attglobal.net
Wed Jun 8 14:51:11 UTC 2011
Hi,
I am trying to setup a server on Ubuntu 8.0.4 (kernel 2.6.24) with 2
network interfaces (e.g. eth0 and eth1), each of which runs a network
service. My problem is that the only one interface respond correctly at
any time. I tried to 2 routing tables, such that the return packet
always go out from the interface which receive the incoming request :-
routing table T1 for eth0, and T2 for eth1
in /etc/iproute2/rt_tables
...
200 T1
201 T2
# ip rule add iif eth0 table T1
# ip rule add iif eth1 table T2
# ip route replace default via gw dev eth0 table T1
# ip route replace default via gw dev eth1 table T2
When I ping the 2 IP interfaces eth0 and eth1 in the local subnet, the
Ethernet MAC addresses on the 2 interfaces are the same :-
C:\>arp -a
Interface: 10.144.1.74 --- 0x10003
Internet Address Physical Address Type
10.144.1.51 00-07-e9-19-df-08 dynamic
10.144.1.52 00-07-e9-19-df-08 dynamic
Is there anything I have done wrong? I hope someone could help point me
the mistakes.
Thanks a lot.
John Mok
More information about the ubuntu-users
mailing list