Home | Gallery | Forum | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com Forum
OS2 World.Com Online Discussion Forum.
Index / OS/2 - General / Networking
author message
    Help! 2 Nics+2 Modems
Post a new topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
WhiteShepherd
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this memberhttp://www.furtopia.org
posts: 5
since: 04 Feb, 2004
1. Help! 2 Nics+2 Modems
Reply to this topic with quote Modify your message
I've posted this question to several groups, message boards, etc, and nobody seems to know how to get this setup working. Basicly how do you issue a route command that binds to the proper lan interface? (lan0, lan1, etc). I am getting pretty desperate to fix this as I have been down a LONG time. I have two DSL modems (static IP's) comming into two nic cards on the OS/2 4 machine (32 bit TCPIP) both modems are in the same 66.93.20.xx IP range. I run windows and OS/2 servers. Under Windows I just set the IP and gateway for each network card and it works. Under OS/2 I don't know how to do this with the route command. All "route add" commands I issue ALL bind to "lan0" leaving no gateway for lan1. Can anyone give me some examples to fix this in my x:\mptn\bin\setup.cmd? Below is an example of what I have so far.

here is my setup.cmd

ifconfig lan0 66.93.20.60 netmask 255.255.255.0 metric 1 mtu 1500
route add default 66.93.20.1 -hopcount 1 -netmask 255.255.255.0
ifconfig lan1 66.93.20.117 netmask 255.255.255.0 metric 1 mtu 1500
ifconfig lo 127.0.0.1
ipgate off

This creates this:

destination router netmask metric flags
intrf

0 66.93.20.1 255.255.255.0 1 UGSP lan0
66.93.20 66.93.20.60 255.255.255.0 0 UC lan0
66.93.20 66.93.20.117 255.255.255.0 0 UC lan1
127.0.0.1 127.0.0.1 255.255.255.255 0 UH lo


Notice the problem that all routing is bound to lan0. I can only do routing for lan0
OR lan1 but not both based as it seems locked into which ifconfig comes first. With
my existing setup all rout add statements are bount to lan0 so only .60 Ip is working.
If I put the IFCONFIG for IP .117 first then all route add statements bind to lan1 and
only IP .117 works and IP.60 cannot pas any net traffic. How do I get "both" cards
working at the same time (ie allow incomming net traffic on both cards)? I don't
know for for sure but what "I think" I need is to know the command that will create a
routing statement bound to lan1?

Example when I add this:
route add 66.93.20.0 66.93.20.1 -hopcount 1

I get this:
66.93.20 66.93.20.1 255.255.255.0 1 USGP lan0

Notice the lan0 where every rout command is binding.

One person kindly suggested I need to split into subnets. But if this is my fix I could really use an example.

I BADLY need this problem solved. So thanks for any info!

Thanks Gene

Date: 04 Feb, 2004 on 17:10
warpcafe
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 350
since: 26 Nov, 2002
2. Re:Help! 2 Nics+2 Modems
Reply to this topic with quote Modify your message
Hi Gene,

first I would like to know what the "idea" behind your network setup is. I mean, you have 2 NICs within the same subnet. Using the same netmask - and THIS might be your basic problem as far as I can see.
Do you have to access different gateways for each NIC or is it for some kind of "traffic balancing" ?

Next : What do you mean by "it works in windows"? What Windows version are you running? Did you check with "start:run:winipcfg" to see if each card is actually assigned a different gateway? (Or don't you even need to check because it apparently works?)

Sorry for putting a lot of questions, but if you tell me why you need that two NICs, I can figure out how to solve the problem.I'm no tcp/ip guru myself, but while at the office, I'm sitting right in front of such a guy... and I could forward the problem.
I know that there are some "tricks" for dealing with routes/gateways but I can't tell exactly how to set them up myself.

Looking forward to help you - greetings.
Thomas

Date: 04 Feb, 2004 on 18:05
WhiteShepherd
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this memberhttp://www.furtopia.org
posts: 5
since: 04 Feb, 2004
3. Re:Help! 2 Nics+2 Modems
Reply to this topic with quote Modify your message
Well here is the situation. I run a web server and have a DSL line from Speakeasy (static IPs). My DSL modem was in bridge mode so it pluged streight into my auto-switch and my computers into my switch.

However my website got to busy for just the one DSL line so I ordered a second DSL line and plugged it into my switch as well. I then used the "alias" command on an IFCONFIG to bind a second IP from the new DSN modem to my adapters in my OS/2 servers and used DNS round robbin to bounce connections between the two lines.

All went perfectly for about 6 months until Speakeasy did an upgrade at my POP. After the upgrade whenever I had both modems pluged into the same switch I would get massive packet loss. If I unpluged one of the modems (either one) traffic would pass on the modem plugged in just fine. My only other alternative was I had to seperate both the modems but still have them accessable to the servers. I have 4 OS/2 servers and 1 win2k server (for a few CGI apps that MUST HAVE wink2 otherwise I'd stick with just OS/2).

I put dual adapters into my OS/2 and win2k server. On the win2k server I put a IP and gateway in the TCPIP setting of each card and it worked right away.

On OS/2 I can put an IP on each lan card. But I can only put a gateway on one card or the other. It it binds to lan0 or lan one depending on what IFCONFIG statement loads first (one with a lan0 or lan1). Both OS/2 nick cards are working. Just one of them (lan1 currently has no routing assigned to it).

I don't know if this woul dbe my fix. But is there a way to use a "route add" to bind to lan1 instead of always lan0?

Date: 04 Feb, 2004 on 20:51
warpcafe
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 350
since: 26 Nov, 2002
4. Re:Help! 2 Nics+2 Modems
Reply to this topic with quote Modify your message
last updated at 05 Feb, 2004 14:54 (1 times)
HI,

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"):

Example:
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.

Greetings
Thomas

Date: 05 Feb, 2004 on 14:28
Kim
Team member
in staff

View this member's profileSearch all posts from this memberSend an email to this memberhttp://www.haverblad.se
posts: 2128
since: 10 Dec, 2000
5. Re:Help! 2 Nics+2 Modems
Reply to this topic with quote Modify your message
This thread has been continued here!
Date: 07 Feb, 2004 on 22:22
    Help! 2 Nics+2 Modems
Post a new topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
All times are CET+1. < Prev. | P. 1 | Next >
Go to:
 

Powered by UltraBoard 2000 Standard Edition,
Copyright © UltraScripts.com, Inc. 1999-2000.
Home | Gallery | Forums | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com 2000-2004