[RESOLVED] Static Routes

dannyboy27

dannyboy27

Lazy
#1
Are any of you guys handy with setting up static routes? Let me explain my situation.....

I have a slightly convoluted router setup at home, due to wanting to run my own Linksys cable router (which has custom firmware installed). Because I'm now on a DSL connection I have to use the crappy ISP-supplied D-link router, but I run it in bridged mode so it's only acting as a modem.

The D-Link then connects to the WAN port on my Linksys, which acts as my gateway/router.

My LAN IP range is 192.168.2.x/24, the D-Link's LAN IP is 192.168.2.1, and the Linksys IP (i.e. default gateway) is 192.168.2.254.

So, to my problem. Because the D-link is technically outside my LAN, I can't ping it from my local network, despite it having a 'LAN' IP address. This is a pain as, if I need to access its web GUI (e.g. to check my DSL sync speed), then I have to plug a cat5 cable directly into the D-link.

So my question is, can I set up a static route on the Linksys router so that it passes through any traffic for the 192.168.2.1 address?

To try and show it diagramatically:

{Internet} ----> Phone line ----> ¦ d-link ('LAN' IP 192.168.2.1) ¦ ---> Linksys (LAN IP 192.168.2.254)

Thanks :)
 
U

ua549

New Member
#2
From your description you only have a single subnet because 192.168.2/24 encompasses both routers. Did you describe the network wrong or is the subnet mask really 255.255.255.0? I suspect that your configuration is wrong. You shouldn't need a static route defined.

What is the IP, subnet mask, default gateway and DNS information for both sides of each router (WAN & LAN)?

What are the model numbers of the routers?

You don't show one, but is there any device between the phone line and the D-link?

Your setup is hindering network performance far more than simply eliminating the Linksys router.

BTW a ping is not limited to a local LAN.
 
dannyboy27

dannyboy27

Lazy
#3
Thanks for the reply.


Your setup is hindering network performance far more than simply eliminating the Linksys router.
There's no problem with the performance of the network - this setup works fine and I've used it like this for some time now. I use the Linksys router w/ custom firmware as it has features I need that the basic d-link can't offer. The only (trivial) issue is that I can't access the d-link router's GUI when I need to, unless I patch directly into it, because it's outside my LAN (i.e. because it's connected to the WAN port on the Linksys which acts as my default gateway).



The Linksys model is a 160NL. Its LAN details are IP 192.168.2.254, S/N 255.255.255.0. And its WAN IP is assigned dynamically by my ISP.

The D-link is a DSL-2640R. It's "LAN" IP is 192.168.2.1, S/N 255.255.255.0
It doesn't have a WAN IP as it's running in bridged mode and so is only acting as a DSL modem, not a router.

I say "LAN" IP, as obviously the D-link isn't actually on my LAN, being outside my gateway. So in some respects it doesn't actually matter what I set its LAN IP as - I just need to know how to tell the Linksys how & where to route any packets destined for this IP address.


You don't show one, but is there any device between the phone line and the D-link?
Only a DSL microfilter.


BTW a ping is not limited to a local LAN.
I realise that, but without some sort of static routing information configured, I don't see how my router is going to know to direct packets destined for 192.168.2.1 out via its WAN port, to the D-Link?
 
dannyboy27

dannyboy27

Lazy
#4
Hmm, just doing some more reading up on this. Looks like you're correct that a static route isn't the answer.

One workaround I thought of is to connect wirelessly to the D-link when I need to get onto its GUI. At least it saves having to walk over to it :)

It's not a big deal, just one of those 'would be nice' things. I know my setup is a bit convoluted but I need to keep my cable router as my gateway device, even though I'm on a DSL connection now (basically for its features, and because DSL routers that will take custom DDWRT firmware are kinda rare).
 
U

ua549

New Member
#5
Where you are going wrong is thinking that you have 2 networks on your LAN. That is not correct based on the subnet mask you provided. the 192.168.2.0/24 subnet encompasses the D-link and the Linksys devices because the first 24 bits of the IP's are identical.

You can split the LAN into 2 subnets by using a subnet mask such as 255.255.255.128. There are others you can use to vary the size of each network.

OR

You can change the default gateway to 192.168.2.1.

What you can do and how you set the default gateway depends on whether the D-link is connected to the Linksys through its WAN port or a LAN port.

FYI - Here is a table of applicable net masks.

Code:
Netmask              Netmask (binary)                 CIDR     Notes    
_____________________________________________________________________________
255.255.255.255  11111111.11111111.11111111.11111111  /32  Host (single addr)
255.255.255.254  11111111.11111111.11111111.11111110  /31  Unuseable
255.255.255.252  11111111.11111111.11111111.11111100  /30    2  useable
255.255.255.248  11111111.11111111.11111111.11111000  /29    6  useable
255.255.255.240  11111111.11111111.11111111.11110000  /28   14  useable
255.255.255.224  11111111.11111111.11111111.11100000  /27   30  useable
255.255.255.192  11111111.11111111.11111111.11000000  /26   62  useable
255.255.255.128  11111111.11111111.11111111.10000000  /25  126  useable
255.255.255.0    11111111.11111111.11111111.00000000  /24 "Class C" 254 useable
 
dannyboy27

dannyboy27

Lazy
#6
Thanks so much, makes perfect sense now. I've never really had to bother getting my head around subnetting properly, as all the networks I've looked after over the years have been single (/24) networks. :eek:

FWIW, the D-link is connected to the WAN port of the Linksys, so I guess changing the default gateway IP to 192.168.2.1 wouldn't work in this scenario? So it's probably best if I go for the 2 separate subnets options.

Thanks again for the help.
 

Associates