Luesley, William wrote:
I have two devices setup as follows:
A --------------- B 192.168.1.1 192.168.1.2
...snip...
Can the route somehow be forced?
Yet another possible solution which should be rather easy to implment is to make sure you have a route to the machines that point to the correct NICs and then use the socket option SO_BINDTODEVICE on all sockets you open to force the packet to go via the route that goes through that device.
Check out this example on how to do it without source changes via the magic of LD_PRELOAD:
http://www.uwsg.iu.edu/hypermail/linux/net/0401.3/0009.html
Cheers, Gilad
-- Gilad Ben-Yossef <gilad@codefidence.com> Codefidence. A name you can trust(TM) Tel: +972.9.8650475 ext. 201, Fax: +972.9.8850643 http://www.codefidence.com
- : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html