Adding Static Routes

I'm trying to create a lab environment for testing some server situations... basically, a mini Internet. What I have right now is a Linksys WRT610N router and two D-Link routers. I've got the two D-Link routers serving my two virtual LANs, connected together by the Linksys router (the "Internet"). For whatever reason, when I go to add the static routes to my LANs, I get invalid route. Am I making a silly mistake or am I going in the completely wrong direction?

Here's a diagram:

Linksys (LAN Port 1) (LAN Port 2) 172.30.20.0/24
                |                                  |
     D-Link (WAN)             D-Link (WAN)
     172.30.21.0/24           172.30.22.0/24
we3kingsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SysExpertCommented:
Not sure why you need 2 more routers after your Internet router, unless the linksys is supplying fixed Ips.

If NAT is already on the linksys, why do you need the other 2 routers.
What are you trying to achieve in general ?

Why do you need static routes ?


0
we3kingsAuthor Commented:
I'm trying to create a network that simulates two geographically separated LANs. Both networks can talk to the 20.0/24 network, but they cannot talk to each other. I assumed that I needed static routes in the 20.0/24 router to tell it about the 21.0/24 and 22.0/24 networks.
0
decoleurCommented:
make sure you have static ip addresses on your d-links and then put the routes to them.

for d-link 21.0 make its ip address 172.30.20.21/24 with its default gateway the linksys inside address.
for d-link 22.0 make its ip address 172.30.20.22/24 with its default gateway the linksys inside address.

on the linksys you will need to add the static routes

network 172.30.21.0/24 use gateway 172.30.20.21
network 172.30.22.0/24 use gateway 172.30.20.22

is this similar to what you have tried?

test to see what works and what doesn't. from the linksys network try to ping the outside address of the d-links and then something inside each. from behind the d-links try to ping the linksys and something on the same network as the linksys.

things that could be messing you up a NAT and firewalls. make sure they are not getting in your way.

hope this helps,

-t
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

we3kingsAuthor Commented:
@decoleur

I think that's how I have it setup, but I'll write what I have so far.

20 Network (Linksys)
IP Address: 172.30.20.1
Subnet Mask: 255.255.255.0

No static routes can be entered. It keeps saying "Invalid static route!" regardless of what I enter. I tried entering:
Destination LAN IP: 172.30.21.0
Subnet Mask: 255.255.255.0
Gateway: 172.30.21.1
Interface: LAN & Wireless

21 Network (D-Link)
IP Address: 172.30.20.21
Subnet Mask: 255.255.255.0
Gateway: 172.30.20.1

22 Network (D-Link)
IP Address: 172.30.20.22
Subnet Mask: 255.255.255.0
Gateway: 172.30.20.1

What does work: From each network (21 & 22), I can ping both it's gateway and the 20 gateway, but I cannot ping the other network (obviously because there are no routes). I think my problem lies in the static routes on the Linksys router, but I can't, for the life of me, figure out why it won't accept the route. Thanks for your help.
0
decoleurCommented:
the gateway on the linksys to the remote networks isn't right.

to create a static route you need to identify the interface on the local network that will take you to the remote network. look at your d-links and see if their WAN interfaces are static or dhcp and use that value as the gateway  for the static route.

instead of:
Destination LAN IP: 172.30.21.0
Subnet Mask: 255.255.255.0
Gateway: 172.30.21.1
Interface: LAN & Wireless

you need the gateway to be on the LAN & Wireless network of the linksys 172.30.20.x

hope this helps,

-t
0
we3kingsAuthor Commented:
I THINK that is what I have. Let me rewrite out my network diagram:

The D-Link Router A WAN port is connected to the Linksys Router LAN Port 1. D-Link Router A has a WAN IP address of 172.30.20.21, subnet mask 255.255.255.0, and gateway 172.30.20.1. It's LAN IP is 172.30.21.1 with subnet mask 255.255.255.0.

The D-Link Router B WAN port is connected to the Linksys Router LAN Port 2. D-Link Router B has a WAN IP address of 172.30.20.22, subnet mask 255.255.255.0, and gateway 172.30.20.1. It's LAN IP is 172.30.22.1 with subnet mask 255.255.255.0.

The Linksys Router LAN IP is 172.30.20.1 with subnet mask 255.255.255.0.

From your last comment, you're saying that the static route for D-Link Router A needs to be:
Destination LAN IP: 172.30.21.0
Subnet Mask: 255.255.255.0
Gateway: (Gateway from D-Link Router A which is 172.30.20.1)
Interface: LAN & Wireless

I tried this but receive the same error message. Thanks again.
0
decoleurCommented:
almost for D-Link Router A try to add this onto the Linksys:

Destination LAN IP: 172.30.21.0
Subnet Mask: 255.255.255.0
Gateway: WAN IP from D-Link Router A which is 172.30.20.21
Interface: LAN & Wireless

you are saying that to get to the network 172.30.21.0/24 go through 172.30.20.21
0
we3kingsAuthor Commented:
Well, it took that static route, which is awesome, so thank you... however, I still cannot communicate from LAN to LAN. Here's what my routing table looks like:

Destination LAN IP / Subnet Mask   / Gateway       / Interface
172.30.21.0           / 255.255.255.0 / 172.30.20.21 / LAN & Wireless
172.30.20.0           / 255.255.255.0 / 0.0.0.0           / LAN & Wireless
172.30.22.0           / 255.255.255.0 / 172.30.20.22 / LAN & Wireless

This all looks right, so I'm perplexed. Perhaps there's a problem with the subnet mask or the router itself? Thank you so much for your help.
0
decoleurCommented:
i think you are going to have issues with routing from lan to lan unless you put static routes on the d-links.

from a to b on a add
172.30.22.0/255.255.255.0 / 172.30.20.22

from b to a on b add
172.30.21.0/255.255.255.0 / 172.30.20.21
0
we3kingsAuthor Commented:
Yeah, I thought that might be the case. Unfortunately, D-Link has saw fit to remote advanced routing from their low-end routers. Thanks for you help anyway. At least I'm heading the right direction now.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.