last updated at 05 Feb, 2004 14:54 (1 times)
well we first have to differ between tcp/ip as it is and tcp/ip as microsoft wants you to believe it is... Actually, a gateway is not bound to an IP adress, as Microsoft shows you.
In the real world (outside of Redmond that is), you have two NICS with an IP each. "Gateways" are not bound to a NIC/IP but are rather part of routes.
Routes on the other hand don't care about anything except packet adresses: Sender, recipient and netmask basically - in your case this means that "route add default" will apply for BOTH NICs as their subnets are identical.
When OS/2 (or TCP/IP actually) wants to send a packet, it looks up the routing table and uses the route that matches first. Because of your subnet/netmask and "route add default", this explains why all data is "routed" through the NIC who was set up first (by "ifconfig"):
NIC1: adress 111.222.333.xxx, netmask 255.255.255.0
NIC2: adress 111.222.333.yyy, netmask 255.255.255.0
If you do a "route add default" her", OS/2 can't differ between the "lines". Or, it doesn't NEED to do, because routes are identical from the viewpoint of the adresses - a packet that needs to be delivered will match the "first" route regardless of where it comes from.
Another problem is, that you can't resolve the situation from the "destination" viewpoint, as from your LAN point of view, the internet equals "all IP adresses execpt the LAN ones" - which again is the same for both NICs.
Now we have multiple ways of solving the problem. My first suggestion would be to look at the windows routing table (as you said it works in windows). Just try to figure out what "route add" was used internally by windows. You can get the routing table by issuing "netstat -r" in a DOS window for example.
Next suggestion would be to NOT use "route add default" but something else like "route add net" but I'm not so good at TCP/IP matters that I can tell you what route command or "magic" parameters to use.
Another thing would be to set up different "gateway" adresses for the workstations attached to your net so that 2 machines use Modem #1 and other two machines use Modem #2. But this is not satisfactory for having a real "balanced" traffic and I don't know the DHCP handling of your ISP or DSL boxes... and I have no idea what LAN infrastructure you're running (bridges you said?)... phew - don't know about that... but anyway - it's just TCP/IP after all, regardless of what devices actually handle the traffic.
Did you try to contact your ISP about the problem? If they say they don't support OS/2 tell them that you need support for TCP/IP. Joke. To be serious: In this case just say that you run Linux - this will result in a "useable" reply.
One more solution comes to mind for me but I'm not sure if the software in question is able to do what I think of: Use one machine as your gateway (if you didn't do that already). This will need three NICs in the same machine: One for the LAN (attached to a switch/hub) and two for plugging into the DSL boxes (one NIC to one DSL box). Then use a software router like ISDN/PM which handles multiple lines and does the "traffic balancing". Next, setup the LAN machines to use the gateway adress of the LAN-NIC in the gateway machine. But... let me see if I can find someone who's better in TCP/IP than me.
Hope this helps in finding a solution - I'll get back to you as soon as I've got an idea.