I'd like to connect to a server using one of two network routes. How would one do this? I've Googled quite a bit, and the common answer is to fiddle with the routing table, however this won't help as the destination has a single IP address. Most of the examples feature a client with a single net card and a server with multiple NICs, but it's the opposite in this case.
The ForceBindIP app seems to be able to offer this type of functionality, so I guess it must be possible.
+----->-------+
192.168.1.3 | B | 192.168.1.4
+--------+ +--------+ +--------+
| Client | | Switch |-->---| Server |
+--------+ +--------+ +--------+
192.168.1.2 | A |
+----->-------+
I'll most likely be using C++ and winsock to do this. I'll need to be able to open a connection on a given route at will (i.e. must not be statically bound to a particular route). I'll be using plain ol' TCP/IP.
EDIT: Windows 7 client
See Question&Answers more detail:os