Linux – ny alternative to virtualization for handling two different interfaces, different networks and same IP range

linuxnetworkingroutingvirtualization

I have a Linux box with two different NICs that are connected to two different networks, but they share the same IP range (10.0.0.x). My first idea was to use virtualization for that (i.e., Xen), but it seems to me overkill since I want to use the same programs without conflicts due routing.

I was wandering if there is a way to confine a NIC to something like a shell session, so all programs launched from there use only that NIC, like launching a bash session that only sees eth1 but not eth0.

edit: I guess I'm looking something similar to FreeBSD jails but for Linux

Best Answer

If both the network address and subnet masks for the two separate networks are identical, your network is misconfigured in a way that defeats the basic intent of IP-routing.

I would renumber one of the networks.

Related Question