Configuring Static Routes - Router to Router.

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
Gamzarme
DD-WRT Novice


Joined: 20 Jul 2006
Posts: 22

PostPosted: Sun May 06, 2007 2:55    Post subject: Configuring Static Routes - Router to Router. Reply with quote
Hello. I'm having a slight problem getting the configuration settings just right with my two routers to have them connect together.

I have searched the forum threads and found many other users with this question, as well. They all seem to be able to find an answer and get things to work correctly. But I can not seem to do this. Apparently I do not understand which router references which router with static routes..or do they reference and advertise themselves?

My scenario is this: I have one router (192.168.1.1) (my gateway, DHCP) connected to the Internet via the WAN port, as per usual. I have another router (192.168.2.1) that I would like to set up as an independent router (DHCP) elsewhere with a Ethernet cable running from a LAN port on the gateway router (192.168.1.1) to the WAN port on the elsewhere router (192.168.2.1).

I have decided to use static routes, as they are the most reliable for connections. However, I am not sure what settings to use and after attempting to configure the settings in most every way possible I still cannot get them just right. There is always a "Request Timed Out" or a "Destination Unreachable" error thrown when pinging from either of the two networks to the other.

If you need any more information or clarity as to my setup or what I have so far, please ask. Also, I am not clear as to where would be the correct place to configure the router or static routing. On the Setup page or the Advanced Routing page of the web interface?

Can someone please help guide me to setting up a correct static route configuration? That would be greatly appreciated. Thanks! =)
-Patrick
Sponsor
Gamzarme
DD-WRT Novice


Joined: 20 Jul 2006
Posts: 22

PostPosted: Tue May 08, 2007 12:16    Post subject: Question..? Reply with quote
Might anyone be able to answer this question?
OpsCenter
DD-WRT User


Joined: 14 Jun 2006
Posts: 218

PostPosted: Tue May 08, 2007 21:11    Post subject: Reply with quote
I have never needed to do/learn this. But it would seem that the answer lies in the Advanced Routing page of the Settings Tab.

Please post any solutions you find.
canis
DD-WRT User


Joined: 08 Jun 2006
Posts: 264
Location: Germany

PostPosted: Tue May 08, 2007 22:15    Post subject: Reply with quote
Simply define static routes vice versa.
For router 192.168.1.1:
Destination LAN IP: 192.168.2.0
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.xxx (the ip the other one is connecting to)
Interface: LAN+WLAN
For router 192.168.2.1:
Destination LAN IP: 192.168.1.0
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1 (the internet gateway)
Interface: LAN+WLAN
Should work.
Gamzarme
DD-WRT Novice


Joined: 20 Jul 2006
Posts: 22

PostPosted: Sun May 13, 2007 18:36    Post subject: Reply with quote
A few more questions:

1. Should not the cable type be a crossover style?

2. Do I need to enable any kind of setting on the second router (192.168.2.1) other than the setting "Router"?

3. Should anything be set besides the IP Address and Subnet Address on the Setup page?

4. When connecting the other end of the Ethernet wire to the second router (192.168.2.1) to the WAN port, on which routing table entry should I select WAN port instead of LAN+WLAN?

5. Do I need to enable any other settings that might affect the static routing, such as some form of RIP or RIP2, and if so, where?

Thank you for your continued help. This problem has been plaguing me for quite some time and I have not had the free time to sit down and work through it. But today I am able to due to the weekend being free.

-Patrick
speedy3k
DD-WRT User


Joined: 19 Apr 2007
Posts: 180

PostPosted: Sun May 13, 2007 19:46    Post subject: Reply with quote
If what Canis said doesn't work, try this.


static route for router1( 192.168.1.1 )
dest=192.168.2.0
subnet 255.255.255.0
gateway 192.168.1.XX (whatever the wan ip address is for router 2, which was assigned by the dhcp of router 1)
interface-lan/wlan

on router 2, you could simply enable rip2, with dynamic routing on the wan and be good to go..
or you can enter in the static routes.


This should work, but if not, post back and we can try something else.
Gamzarme
DD-WRT Novice


Joined: 20 Jul 2006
Posts: 22

PostPosted: Sun May 13, 2007 20:47    Post subject: Reply with quote
How is the DHCP address assigned to the second router? I do not see how the second router knows to go to the first router asking for an address. What I have so far:

    - A reset router - factory defaults.
    - A crossover cable going from a LAN port (1) on my first router to the WAN port on my second router.

What should I configure first? A gateway? Actually, I have changed the Local IP Address from 192.1681.1 (default setting) to 192.168.2.1.

What should I do?
speedy3k
DD-WRT User


Joined: 19 Apr 2007
Posts: 180

PostPosted: Sun May 13, 2007 21:54    Post subject: Reply with quote
the wan ip of router 2 needs to be in the same network as router 1.

so in the setup of router 2, under wan connection type, you can select Auto Config (which will get its ip from the dhcp of router 1, or set up a static ip. whatever you set this ip up as, that will be the one you add to your routing table on router 1.


for example.

router 1 is set up as 192.168.1.1

the wan side of router 2 will need a 192.168.1.xx address. so what I would do would go into router 2 set up. WAN connection, static IP, and enter 192.168.1.2, subnet 255.255.255.0, gateway 192.168.1.1

Then under router ip, change it to something like 192,168.2.1, giving you your 2nd independent network ip range

now, on router 1, set up your static route like this
destination 192.168.2.0
subnet 255.255.255.0
gateway 192.168.1.2
interface= lan/wlan

after that,
go back into router 2 setup and under advance routing, select rip2, enable dynamic routing, interface wan

thats it. i just woke up from a nap, so I'm still a little fuzzy...so if it doesn't make much sense, let me know!
Gamzarme
DD-WRT Novice


Joined: 20 Jul 2006
Posts: 22

PostPosted: Mon May 14, 2007 0:18    Post subject: Reply with quote
Thanks for this. It's becoming immensely helpful for me. However I still have a few questions, as it is is not working properly, through my routing tables have changes (as they were not beforehand).

On the second router, does there need to be a Gateway IP address set under Network Setup? (the place where the subnet 192.168.2.1 is setup). I have tired a few different potential IP addresses there (192.168.1.1, 192.168.1.2, 192.168.2.1), but none of them work.

Here is my routing table on the first router (192.168.1.1):
Code:
192.168.2.0   255.255.255.0   192.168.1.2   LAN & WLAN
192.168.1.0   255.255.255.0   0.0.0.0   LAN & WLAN
xx.xx.xxx.x   255.255.252.0   0.0.0.0   WAN (..Internet address..)
169.254.0.0   255.255.0.0   0.0.0.0   LAN & WLAN
0.0.0.0   0.0.0.0   67.54.236.1   WAN


And here is my routing table on the second router (192.168.2.1):
Code:
192.168.2.0   255.255.255.0   0.0.0.0   LAN & WLAN
192.168.1.0   255.255.255.0   0.0.0.0   WAN
0.0.0.0   0.0.0.0   192.168.1.1   WAN
0.0.0.0   0.0.0.0   192.168.2.1   LAN & WLAN


Do these routing tables look consistent and operable to you?

I guess I had better tell you my operating parameters. I have a Linksys WRT54G and a Belkin v.2000 (the one with the messed up WAN/WLAN/LAN configurations; if you are familiar with it, my is configured to have the WAN and WLAN operating versus just LAN).
On the Linksys I have the latest build of v.24 beta : (05/10/07) and on the Belkin I have SP1 latest build (05/16/06).

On the Linksys, I should not have any trouble, as it is all equipped for any type of up-to-date use and features. However, on the Belkin, I am only able to choose from between "Gateway" and "Router" in Advanced Routing with "LAN & WLAN", "WAN", "Both", or "Disable" in the Dynamic Routing options.

All of the things you have told me so far have been in the Belkin router, except for RIP2..which I assumed was what was meant by "Dynamic Routing". Also, what differs from between the two router setups I have is that in Advanced Routing, under Operating Mode, I only have "Gateway" and "Router" on the Belkin but I have "Gateway", "BGP, "RIP2 Router", "OSPF Router", "OLSL Router", and "Router" selectable on the Linksys (though it stays on "Gateway", as is default).

Are you familiar with the differences or limitations my setup would encounter based on the options I have available on each router due to different versions?

Thank you again,
Patrick
speedy3k
DD-WRT User


Joined: 19 Apr 2007
Posts: 180

PostPosted: Mon May 14, 2007 1:29    Post subject: Reply with quote
your routing tables look fine.

as far your first question about entreing a gateway on the 2nd router under network settings.
no..you can leave that blank

ok...one router1, it should be set to gatway, which it looks like you have set

on router2, enable "router" and dynamic routing enable WAN..


with that said, you should be good to go. what kinds of problems are you having?? what test have you done to check you set up?
Gamzarme
DD-WRT Novice


Joined: 20 Jul 2006
Posts: 22

PostPosted: Mon May 14, 2007 1:42    Post subject: Reply with quote
I have been using the ping command both from a host connected to each router and telnet'ing into each router and issuing a ping command from there as well.
All pings are met with either "Reply from 192.168.x.1: Destination host unreachable" or "Request timed out" (whereas x=1 or 2, depending on the gateway router).

However, I can say that I have been receiving more "Destination host unreachable" messages than I have of the other.

Well, the problems of the Belkin router is such that there is an issue with the Robochip switch that doesn't interface well with DD-WRT. In the end, after much work on the router, the community has deduced that it is possible to only have functioning the LAN ports or the WLAN and WAN interfaces for normal routing connectivity.

My plan was to have the WLAN and WAN interfaces working properly on the second router and then use the four-port LAN interfaces on that same router as a switch that would feed into the line coming into the WAN port (thus giving them a 192.168.1.x address, due to them being forwarded to the 192.168.1.1 gateway through the switching interface, not routing.

This would allow normal WLAN activity and the WAN port would handle the traffic coming in that interface. However, if this doesn't work, I will forgo the WLAN interface and just enable the LAN interface (four-port, of course) and add the WAN port as a fifth with telnet commands and go for a LAN-to-LAN network, which is not optimal for me.

While I am on that subject, how differently would it be to configure a LAN-to-LAN network with two different subnets? (one at each router).
-Patrick
speedy3k
DD-WRT User


Joined: 19 Apr 2007
Posts: 180

PostPosted: Mon May 14, 2007 1:56    Post subject: Reply with quote
disable the firewall on router2. its not needed because router1 is handling all your firewall needs, so dont worry about being unsecure.

don't worry about pinging router to router for now. try to ping a computer thats connected to router1 from a computer thats connected on router2.

can a computer thats connected to router 2 access the net?


Last edited by speedy3k on Mon May 14, 2007 1:59; edited 1 time in total
ray_freeze
DD-WRT User


Joined: 10 May 2007
Posts: 60

PostPosted: Mon May 14, 2007 1:58    Post subject: Reply with quote
Gamzarme wrote:
Thanks for this. It's becoming immensely helpful for me. However I still have a few questions, as it is is not working properly, through my routing tables have changes (as they were not beforehand).

On the second router, does there need to be a Gateway IP address set under Network Setup? (the place where the subnet 192.168.2.1 is setup). I have tired a few different potential IP addresses there (192.168.1.1, 192.168.1.2, 192.168.2.1), but none of them work.

Ok first, can you please draw out what you want your network to do. Something like this picture on this link, it will help everyone understand better: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=15156

Also, if you haven't done so already, setup a static DHCP on router1 to always give a specific IP address to router2. Is router1 able to ping router2 and vise versa? If not, then router1 is not giving an ip address to router2.
zardiw
DD-WRT User


Joined: 23 Apr 2007
Posts: 52
Location: Palm Springs, Ca

PostPosted: Mon May 14, 2007 3:50    Post subject: Re: Configuring Static Routes - Router to Router. Reply with quote
Gamzarme wrote:
Hello. I'm having a slight problem getting the configuration settings just right with my two routers to have them connect together.

I have searched the forum threads and found many other users with this question, as well. They all seem to be able to find an answer and get things to work correctly. But I can not seem to do this. Apparently I do not understand which router references which router with static routes..or do they reference and advertise themselves?

My scenario is this: I have one router (192.168.1.1) (my gateway, DHCP) connected to the Internet via the WAN port, as per usual. I have another router (192.168.2.1) that I would like to set up as an independent router (DHCP) elsewhere with a Ethernet cable running from a LAN port on the gateway router (192.168.1.1) to the WAN port on the elsewhere router (192.168.2.1).

I have decided to use static routes, as they are the most reliable for connections. However, I am not sure what settings to use and after attempting to configure the settings in most every way possible I still cannot get them just right. There is always a "Request Timed Out" or a "Destination Unreachable" error thrown when pinging from either of the two networks to the other.

If you need any more information or clarity as to my setup or what I have so far, please ask. Also, I am not clear as to where would be the correct place to configure the router or static routing. On the Setup page or the Advanced Routing page of the web interface?

Can someone please help guide me to setting up a correct static route configuration? That would be greatly appreciated. Thanks! =)
-Patrick


I was doing the exact same thing!

Forget about direct routing.

You were right in that your cable should go from the LAN port of the first router to the WAN port of the second router.

Hit reset on your second router (Default settings).

Make it's IP address (Network Setup/Router IP/Local IP Address) 192.168.2.1. That's the ONLY thing you need to change..........

Save settings.

Reboot.........Maybe reboot or power cycle the first router also.

You may not even have to reboot them..........

Let them talk it out amongst themselves via DHCP, and they will become friends.....

Now you can change the other things, like router name, wireless security, whatever.....

If you want to continue to mess with it after it's working...(like I am...lol), stay tuned to this thread: http://dd-wrt.com/phpBB2/viewtopic.php?t=15296 .............z

_________________
Faster horses, yw, ow, mm.....................z
speedy3k
DD-WRT User


Joined: 19 Apr 2007
Posts: 180

PostPosted: Mon May 14, 2007 21:54    Post subject: Reply with quote
i just noticed that you are using a crossover cable, try using a straight through network/cat5 cable.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum