General discussion

Locked

Static Routes Between Two Routers

By brandis ·
I have several SOHO routers on my network;Linksys and D-Link. I get 5 static WAN IPs from my DSL provider and I have segregated my network into five different segments so that the PCs behind each router would use their own gateway to the internet. Linksys recommended this and it has certainly improved my overall network performance I must say. However my network looks like five different networks and not one big network.

Now I would like to connect this five routers for the purpose of backing up each system to a tape backup drive and occassionally map a drive from one system to another.

Basically my network looks like this:

Router 1 = IP address 192.168.1.1
Router 2 = IP address 192.168.2.1
Router 3 = IP address 192.168.3.1
Router 4 = IP address 192.168.4.1
Router 5 = IP address 192.168.5.1

All on subnet mask 255.255.255.0. Everything on my network is static IPs, no DHCP. What I want to do is be able to link these routers via static routes. The routers are capable of this. Each router can have up to 20 routes each. (Visio Diagram here (external link to dslreports.com):
http://www.dslreports.com/r0/download/426552~bb2d9951de967c 164e6e4cb20309e63c/desired_network_configuration.jpg

I have asked this question on other websites and people have been most helpful. Unfortunately most of the answers are to scrap my existing setup and all these routers and go with a multi-nat router instead. If I had it all to do over again I would certainly go with this option, however I would like to use my existing setup and use my current hardware to accomplish this.

Seems like a simple enough task.

If I use the following as an example and can get a solution then I'm sure I can figure out the rest.

Example: Router A uses IP address 192.168.1.5 and router B uses IP address 192.168.10.1.

Question: On router A what would be the correct static route information to make a route to router B?
1) Destination IP address?
2) Subnet Mask?
3) Default Gateway?

This conversation is currently closed to new comments.

12 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by joshg In reply to Static Routes Between Two ...

Each router has to have a route to the other routers, which you are figuring out. However, the usal router like CISCO etc. yuse routing protocols to determine the next hope or best route to an IP. You will need a static route to each router, as I cannot get to your diagram I will make one up that will work.

Router A IP: 192.168.1.5
Subnet Mask: 255.255.255.0
Default gate should stay whatever the ISP gave your.
I don't know the command for your routers so I will try it like NT: route add 192.168.10.0 255.255.255.0 192.168.10.1 1
The 0.0.0.0 0.0.0.0 "Internet IP Gateway" will get all unknown net traffic to be dumped to the External interface. You will have to add the statics so that when a PC whose gate is 192.168.1.5 sends a packet destined for 192.168.10.X it will have a route and won't send it to the Inet interface.

Even after you add these routes to the routers, you will still have to add static routes to the machines to see the domains/workgroups unless you have NT/200X. Use the LMHOSTS and HOSTS on each box so the net neighborhood will populate

Can't help to much

Collapse -

by brandis In reply to

Poster rated this answer.
Thank you for your suggestion, however, it did not solve the issue.

Collapse -

by Alpha-Male In reply to Static Routes Between Two ...

For the Linksys routers, it works this way (others should be similar):

Select a Static Route Entry from the drop down list. The device supports up to 20 static route entries.
Enter the following data for the static route:
Destination LAN IP : Enter the network address of the remote LAN segment. For a standard Class C IP domain, the network address is the first 3 fields of the Destination LAN IP, while the last field should be 0.

So in your example, 192.168.10.0

Network Mask : Enter the Subnet Mask used on the destination LAN IP domain. For Class C IP domain, the Subnet Mask is 255.255.255.0.

In your example 255.255.255.0

Gateway IP : If the Linksys router is the main IP router to connect your network to the Internet, then your Gateway IP is the same IP Address as the Linksys router. If you have another router handling your network's Internet connection, enter the IP Address of your main Internet router here instead.

Set this as appropriate.

Click the Apply button to save your changes.

Good luck...hope this helps!

Collapse -

by brandis In reply to

Poster rated this answer.
Thank you for your suggestion, however, it did not solve the issue.

Collapse -

by Deadly Ernest In reply to Static Routes Between Two ...

If I understand you correctly you have 5 subnets which are segregated via 5 routers, each router is the first IP address for each subnet and the sebnets segregate with the 3 byte. The routers are all physically interconnected and you want to be able to route traffic between the subnets.

If you want to be able to route all traffic then you should just need entries like below, this is what i would expect to see on 192.168.5.1

Destination Source Gateway
192.168.1.x 192.168.5.x 192.168.1.1
192.168.2.x 192.168.5.x 192.168.2.1
192.168.3.x 192.168.5.x 192.168.3.1
192.168.4.x 192.168.5.x 192.168.4.1
192.168.5.x 192.168.x.x 192.168.5.1

This will allow the routers to redirect any traffic for the subnets, but only if it comes from within the subnet it controls. NB Adjust the 3rd byte as required, eg here is what it would look like on the 192.168.1.1 router

Destination Source Gateway
192.168.5.x 192.168.1.x 192.168.5.1
192.168.2.x 192.168.1.x 192.168.2.1
192.168.3.x 192.168.1.x 192.168.3.1
192.168.4.x 192.168.1.x 192.168.4.1
192.168.1.x 192.168.x.x 192.168.1.1


If you wanted to have restricted access for a few machines, say you are backing up servers that use x.x.x.12 on each subnet to each other, then you do something like

Destination Source Gateway
192.168.1.12 192.168.5.12 192.168.1.1
192.168.2.12 192.168.5.12 192.168.2.1
192.168.3.12 192.168.5.12 192.168.3.1
192.168.4.12 192.168.5.12 192.168.4.1
192.168.5.12 192.168.x.12 192.168.5.1

The exact set out will vary from router model to router model, many will require a specific return entry for each machine in the last example as they will not accept a wildcard followed by a specific.

Collapse -

by brandis In reply to

Poster rated this answer.
Thank you for your suggestion, however, it did not solve the issue.

Collapse -

by -Q-240248 In reply to Static Routes Between Two ...

Cannot get to the visio document. Somewhere along the line, all of these routers must connect to the Internet router on a common subnet. Either that or you have 5 DSL lines coming into your SOHO! That is where you will create the routes to each of those subnets, the GW address being the connecting router. Are all of these routers connected on a common subnet and isn't there a hub router? Contact me with more info.

Collapse -

by brandis In reply to

Poster rated this answer.

I apologize for the URL issue. Here is detailed pictorial of my question. http://www.lannetworking.com/p3_network_configuration.htm

Collapse -

by -Q-240248 In reply to Static Routes Between Two ...

Now I can see your drawing. There are two interfaces on the routers, yet you've listed only one, so I'm going to assume that the 192.168.x.x subnets are the server/clinet side of your routers. So in this case, here's how I would route, with a few assumptions:

In this instance, all routers connect to a hub on the other side, and they all exist on one subnet, 10.1.1.0/24. Using your example IPs from above, here would be the routing table to get from Router A to router B, Router A is 10.1.1.1 and router B is 10.1.1.2:

On router A:
IP route 192.168.10.0 255.255.255.0 10.1.1.2

On router B:
ip route 192.168.1.0 255.255.255.0 10.1.1.1

Collapse -

by binu_zacharia In reply to Static Routes Between Two ...

I am trying to do the exact same thing as you without much success. Did you get this resolved?

Back to Networks Forum
12 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums