I faced the following problem. There is server (Ubuntu 12.04) with two NIC that have IPs 192.168.40.147 (eth0) in 192.168.40.128/27 subnet and 192.168.40.165 (eth1) in 192.168.40.160/27 subnet. Now we have the following routing table on server:
Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.40.160 * 255.255.255.224 U 0 0 0 eth1 192.168.40.128 * 255.255.255.224 U 0 0 0 eth0 default 192.168.40.161 0.0.0.0 UG 99 0 0 eth1 default 192.168.40.129 0.0.0.0 UG 100 0 0 eth0
I try to ping both server IPs from 192.168.32.69 in 192.168.32.1/23 subnet and can do it only for 192.168.40.165. The other one reports "Request timed out". And if I try traceroute I can see that there is always one successful hop to the gateway (192.168.42.65) and another one either succeeds (for 192.168.40.165) or fails (for 192.168.40.147).
As I understand all ICMP packets successfully get to the server but when trying to return as soon as return address is from subnet other than 192.168.40.128/27 or 192.168.40.160/27 the resulting route will be the one of defaults. And exactly the one with the lower metric:
default 192.168.40.161 0.0.0.0 UG 99 0 0 eth1. If I will swap metrics than only 192.168.40.147 address will be reachable from 192.168.32.69 host.
My question is if I can configure server in any way to allow both IPs reachable from my client host?