I'm using Ubuntu 14.04 (standard server install + OpenSSH, biosdevname=0 during instal to keep the network names simple) in an environment where I have two non-overlapping subnets M and N on different VLANs.
For the purpose of debugging an issue on one of the subnets, I want to configure my server such that it can receive traffic on eth0 from an IP on subnet M, and on eth1 from an IP on subnet N.
I realize I can only have one gateway, so I use the gateway from subnet M. I set up /etc/network/interfaces such that subnet M is fully specified with an IP A.B.C.42 (which works normally) and from subnet N I've chosen an IP address X.Y.Z.88 and provided the appropriate netmask for that subnet (it doesn't overlap with subnet M at all).
I can bring up eth1 via
sudo ip addr flush dev eth1; sudo ifdown eth1; sudo ifup eth1... this appears to work and my routing table is:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 A.B.C.1 0.0.0.0 UG 0 0 0 eth0 A.B.C.0 0.0.0.0 255.255.255.192 U 0 0 0 eth0 X.Y.Z.64 0.0.0.0 255.255.255.224 U 0 0 0 eth1
Note that the adapters are valid and working per
sudo lshw -c network etc.
At this point, assuming there is no blockage on subnet N, should I be able to ping or ssh to this server via subnet N (using IP X.Y.Z.88)? (Subnet M with IP A.B.C.42 definitely works.) If not, what obvious steps / tests am I missing?
(I've seen similar questions around here and elsewhere but so far haven't found one that has this configuration (totally separate subnets for example). I'm really trying t determine if subnet N is blocking traffic or is otherwise acting up.)