Link to home
Start Free TrialLog in
Avatar of ampmdadmin
ampmdadmin

asked on

Connecting 2 Cable Modems and\or routers

I have two cables modems, had to get two, need for static IP blocks and can only get 13 per modem, anyway, I need to connect them or the routers they are connect to, together.  I have one SonicWall SOHO 3 and a Netgear FVX 538.  The soho is the "main" router, 10.0.0.1, which is the gateway for my network.  The netgear is the second router.  I am trying to set up a Remote Desktop Connection via 2 diiferent IP addresses via the two cable modems.  Any help would be greatly apprecieated.  
Avatar of myin68
myin68
Flag of United States of America image

I'm assuming you mean you want to reach the same server/PC from 2 differnt public IP addresses (1 from each router).  First you need to enable RDP on the server/PC you're trying to connect to.  Then in each router you need to create a static NAT (Network Address Translation) from the public IP to the internal IP of the PC (consult your router manual to determine how it handles this).  Then you should be able to use either public IPs to RDP to the PC.

Avatar of ampmdadmin
ampmdadmin

ASKER

Yes, but, I thought you can only use 1 gateway, on the server network config, how will other public IP reach said server?  How can I connect both routers to my LAN?
Avatar of giltjr
you can have multiple "gateways" (a.k.a. routers), however you can only have 1 default.

What you could do is choose one as a default, then add specific routes for remote IP addresses that use the other router.
I'm not sure I understand, add the routes on the server or in the second router?  
For example, do you mean do a "Route add" command on the server?
On the server.

If you want to use 10.0.0.1 as your "default router" then set it as the default gateway.

Assuming you are running Windows you can issue the command:

route add -p x.x.x.x mask m.m.m.m a.a.a.a

Where:

     x.x.x.x is the IP network address
     m.m.m.m is the subnet mask for the ip network
     a.a.a.a is the IP address of the second router.

Say you wanted to setup a route to a specific host you would enter:

     route add -p 200.0.0.1 mask 255.255.255.255 10.0.0.2

The -p tells Windows to make this a permanet route.  This way it still exists after a re-boot of the PC.

So this means that if you go to access host 200.0.0.1 your computer will go through the router at 10.0.0.2.
That solution (adding the routes) will work well assuming that the users from the 200.0.0.0 network get to your network thru the same router on your network each time.  You should try it out, especially if you know from what networks you'll be trying to connect.
OK..so I tried adding the route as stated above, no luck, I can not even ping the the 172 network from the server.  BOTH routers the 10.x.x.x and the 172.x.x.x are on the same lan, I can change the IP of the 172 router if needed, I just want to be able to get to the same server via two public IPs.  
Could you draw a smal stick figure of your connetion?  Something like:


                             /--> Cable Modem #1
PC <-- SWITCH --
                             \--> Cable Modem #2


If your setup is similar to what I have, is the Switch a pure switch or is it a switch/router?  

Both routers may be on the same LAN, but they are in different IP subnets.  Which means you need another router to get to one of them, or change the IP address of one.

If the diagram is similar to what I have, your best bet, IMHO, would be to move the 172.x.x.x into the 10.x.x.x.

If your current router is 10.0.0.1, then make the second one 10.0.0.2.  
ok..I can make it 10.0.0.2 so it would look like this:
\-----> Cable Modem #1----Router 10.0.0.1
                                                                     ------->Switch---->LAN
\-----> Cable Modem #2----Router 10.0.0.2

Now, how to a get the public IP's from Modem #2 to route to the LAN???
--> Now, how to a get the public IP's from Modem #2 to route to the LAN???

Not 100% sure what you mean.

Do you mean respones to your outbound requests?  Say your PC's address is 10.0.0.50 and you add a route like:

    route add -p 207.46.193.254 mask 255.255.255.255 10.0.0.2

on your PC, then you go to http://www.microsoft.com (207.46.193.254 is at least one IP address for www.microsoft.com)?

If so you don't need to do anything.  With the route statement your PC will forward the request for 207.47.193.254 to router #2.  Router #2 will send it out via cable modem #2, which should NAT 10.0.0.50 to a public IP address that is assigned to cable modem #2.  When 207.46.193.254 responds, it will respond to the public IP address that cable modem #2 used on the NAT and the "Internet" will route the packet back to cable modem #2.  Which will then replace the public IP address with your computer's private IP address and get it back to your computer.
Look in router2's documentation to figure out how to setup a static NAT from the public IP to your server's internal IP, or how to setup a Service to be directed to your server (ie any requests coming to port 3389 -> RDP get directed to the server).
I don't think I am being clear, I apologize, let me try again...

router 1 (main router) 10.0.0.1 NAT setup and functioning great, RDP working using public IP from this router, etc.

Router 2 10.0.0.2 ---have NAT, etc. setup, however when I try to connect, from outside,  using public IP from this router,  from outside it doesn't work.  

How do I get this to work?  
If I change the gateway IP on the server,  to use 10.0.0.2, I can connect using the public IP from router 2 using RDP, but then the public IP from router 1 does not work....so I know the NAT'ing from router too is set up correctly.  
You won't be able to RDP to the server via R1 and R2 from the same external IP subnet because the default gateway for the server is thru R1, so when you try to RDP thru R2 the server will respond thru R1 and that won't work.  And you can't just add a route to tell the server to use R2 when you're coming from the same network XXX because then you won't be able to RDP via R1.    You could setup redundancy by creating to default routes in the server and if R1 is down you'll still be able to connect RDP via R2.

The other alternative is to install a 2nd NIC (with a different internal IP) in your server and configure it with the R2 gateway.  Then R2 NATs the public IP to the new NIC internal IP.
Can you give me examples of these redundancy routes to create on the server?

Windows won't allow you to use two different gateways even on different nics.
You can get RDP to work.  With LIMITED success.

You canNOT do it if the remote computer is the SAME computer in both instances.  That is:

                                        /-----> Cable Modem #1----Router 10.0.0.1
  RCOMP <-- Internet  ---                                                                       ------->Switch---->LAN <-- YOUR COMP
                                         \-----> Cable Modem #2----Router 10.0.0.2

You can't do it.  Why?  Because YOUR COMP can only have one route back to RCOMP and ALL traffic must flow that way.  If RCOMP comes through MODEM#1, then YOUR COMP must respond back through MODEM#1.  Now if you were to have:

RCOMP1--\                        /-----> Cable Modem #1----Router 10.0.0.1
                  -- Internet  ---                                                                       ------->Switch---->LAN <-- YOUR COMP
RCOMP2--/                        \-----> Cable Modem #2----Router 10.0.0.2


Then you can do it.    On YOURCOMP you have the default route of 10.0.0.1 and setup a route to RCOMP2 via 10.0.0.2.

From RCOMP1 you RDP to the public IP address of CableModem#1 and from RCOMP2 you RDP to public IP address of CableModem#2.

Now when RCOMP1 RDP to PUB#1, YOURCOMP will use the default route to get back.
When RCOMP2 RDP's to PUB#2, YORUCOMP will use the routing entry to route the back to Cable#2.
Go back to the 172.x.x.x subnet on R2 and install the 2nd NIC in server with a matching internal subnet address and use R2 as gateway.
Can't use two gateways on a windows 2003 server....

How about if install Routing & Remote Access on the server?
I'd rather not, I like the firewall in between, helps me sleep better.  
I'm not suggesting you stop using R1 and R2.  I'm saying if you configure the server with RRAS you can define separete subnets on each NIC (assuming you install 2nd NIC) and have separete gateways, on pointing to R1 and the other to R2.  In addition you could setup each interface on the server to accept a VPN connection from your network and have the extra layer of security protecting your RDP connection.
You can define as many default gateways per box you want, but only the 1st one in the list (netstat -rn or route print) will get used.

MS make you beleive that you can define a gateway (or routes) on a per NIC basis.  However you can't.  The routing decisions are made by the IP stack at a "box" level.  Not a NIC level.

IP routing within Windows, and most other OS's and devices, work on a "first best fit match".

So you if you have two default routes, the 1st one will always get used.  Period.

You can define two default gateways, but only the 1st one will get used.
This is all good advice but I am still without a resolution.  I have tried all, there has to be a way, I can't be the only person to ever do this.  
No there does not have to be away.  Your one of many that have tried and with broadband connections there is not away if you want a single remote computer to access another computer via two different paths.   IP routing and NAT do not work that way.   My diagram with RCOMP and RCOMP1.

There is away, but I doubt if you can  afford it.

It requires getting two real dedicated internet connections, T1 or higher, then getting a full /24 subnet (there are certain requirments you must meet to get a full /24) from one of the ISP and a smaller range of IP addresses from the other ISP.  Then you get a AS number fron ARIN.  Then working with your ISP's to get BGP routing to advertise your /24 subnet over both ISP's networks.  Even with this you are still accessing the same IP address, just over two different network connections.

Couldn't afford it???  That's rather insulting seeing how you don't even know  me.

Anyhow, After doing  more research, I found out that  I could just use  the 538 since it is a dual wan router., which would allow me to "splice" both connections and set up RDP via both public IP's.    

ASKER CERTIFIED SOLUTION
Avatar of giltjr
giltjr
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial