Question about Two Router Setup

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
glopgloop
DD-WRT Novice


Joined: 30 Aug 2022
Posts: 3

PostPosted: Tue Aug 30, 2022 0:41    Post subject: Question about Two Router Setup Reply with quote
Sorry for the non descriptive title, I have no idea anything about routers so I do not even know how to call what I am trying to do.

Basically, I am wondering if there is a way in dd-wrt to set the router up so I can connect to it but not over the router's WiFi, but over a different router's WiFi, which it would then be connected to.

I put dd-wrt on this old router I got (WRT54GS) but not for the purpose of actually using it as a router, but being able to play around with compiling MIPS assembly code and running it on real hardware.

Everything works, but it is just somewhat annoying. Here are my two options I have at the moment for uploading code to this router:

1. I can connect to the router over WiFi and then Telnet into it at 192.168.1.1. This works but the router's WiFi is not particularly good and so it sometimes get slow or even drops connection. More than this, I do not want to use this MIPS router as my actual router, I have a much fancier and newer ARM based router which I actually want to use as my day-to-day router, so it is annoying having to disconnect from the ARM router and connect to the MIPS router just to upload code to it and test it, and then when I'm done I have to disconnect from the MIPS router and connect to the ARM router.

2. I can connect over serial, which would be a good solution, except for the fact that this MIPS router has too little flash storage to hold programs, and the dd-wrt software does not seem to be bundled with anything to to transfer files over serial, and so even if I connect over WiFi to send a program like gkermit to the router and then disconnect, this will work, but it will stop working when I reboot and lose gkermit from the router and have to repeat the process, which is annoying.

What would be ideal is if I could somehow setup this router to act like any other computer on my network. It just connects to my ARM router either over WiFi or ethernet cable, my ARM router assigns it a local IP address, then I could connect to the MIPS router through my ARM router through that local IP address.

For example, if I plug my MIPS router into my ARM router through ethernet, I can see the MIPS router show up under "wired devices" in the ARM router's settings, and I can even see that my ARM router assigns my MIPS router a local IP address.

However, if I try to Telnet to that local IP address of the MIPS router while connected over WiFi to the ARM router, it doesn't work. I can't ping the MIPS router even though it is connected to my ARM router and I can see the IP address assigned to it by the ARM router. I would like to make it work but have no idea what settings I'm supposed to change to make it work or if it's even possible.

I am hoping there is just some settings in the web interface of dd-wrt I could configure to do this. Or if it's just not possible with this router, I would also like to know that, so I stop wasting my time trying to figure it out.

Thanks
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Tue Aug 30, 2022 6:03    Post subject: Reply with quote
Moved your thread to the Advanced Networking forum

See the forum guidelines with helpful pointers about how to research your router, where and what firmware to download, where and how to post and many other helpful tips:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087

There are several ways to deal with this the easiest is to setup the router as normal Gateway router and connect the WAN port (which you can do by hitting the reset button) make sure the routers Local Ip address on setup page is different in the third octet (so if main router is 192.168.1.1 use 192.168.2.1)

Then allow Remote Administration on Administration page and then you can connect to the router at its WAN address (for the GUI on port 8080, telnet on port 23 and if you enable SSH you can also connect via SSH), you can set a static lease on your main router to hand out a fixed IP address.

Alternatively setup as a Wireless Access Point (WAP)
A secondary router connected wired LAN<>LAN on the same subnet as the primary router:
• WAN disabled
• DHCP server Disabled (=off and NOT set as Forwarder!)
• Local IP address in subnet of primary router but outside DHCP scope, make sure the used IP address is unique on your network you cannot have duplicates.
• Gateway and Local DNS pointing to primary router
• DNSMasq enabled
• Router kept in the default Gateway mode (the wiki says Router mode but do not do that, either it does not matter (this case) or break things)
• Connect LAN <> LAN (do not use the WAN port unless you really need that extra port, for most routers traffic still must use the CPU so performance is lacklustre )
• I do not change the Firewall settings although you do not want a firewall, the Firewall is automatically disabled as there is no WAN, but it does not hurt to follow the wiki and Disable the Firewall anyway.

Alternatively set up as Gateway from the first example and disable the firewall and set a static route on the main router

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1953

PostPosted: Tue Aug 30, 2022 13:47    Post subject: Reply with quote
If your WRT54 is connected to the ARM router via it's WAN, set up remote SSH management and then setup an SSH tunnel to the webUI:

Web Interface - DD-WRT Wiki

Enable Web Interface Over SSH? - DD-WRT Forum

You can also flash firmware to your WRT54 via SSH command line (NOTE: you must use http):

Code:
cd /tmp
wget http://url.to.firmware.file
write filename linux &
reboot

Alternatively, you can do a
Code:
wget -O firmware.bin http://url.to.firmware.file

and it will automatically flash the firmware file for you. This is provided you are running DD-WRT on this WRT54.

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
glopgloop
DD-WRT Novice


Joined: 30 Aug 2022
Posts: 3

PostPosted: Thu Sep 01, 2022 9:22    Post subject: Reply with quote
dale_gribble39 wrote:
If your WRT54 is connected to the ARM router via it's WAN, set up remote SSH management and then setup an SSH tunnel to the webUI:

Web Interface - DD-WRT Wiki

Enable Web Interface Over SSH? - DD-WRT Forum

You can also flash firmware to your WRT54 via SSH command line (NOTE: you must use http):

Code:
cd /tmp
wget http://url.to.firmware.file
write filename linux &
reboot

Alternatively, you can do a
Code:
wget -O firmware.bin http://url.to.firmware.file

and it will automatically flash the firmware file for you. This is provided you are running DD-WRT on this WRT54.


This is a WRT54GSv5, and I put dd-wrt based on this tutorial but this does not have SSH. It has Telnet but no SSH (I'm guessing because it is the "micro" version which that was stripped from?). It is also v23 which seems to have the option in the web interface settings to enable remote access to the web interface but not option there for Telnet.

Is there a different firmware I should be placing on here? The web interface says it is "DD-WRT v23 SP1 Final (05/16/06) micro" which I installed from "dd-wrt.v23_micro_generic.bin". The image on the Web Interface page you linked shows v24, so based on this and what you and the other person said, I tried installing v24 micro.

With v24 micro, I now have an option to enable remote Telnet, but the serial console stopped working! I am no longer getting any output from serial at all, which used to work perfectly and I could control the router from the modded serial port. Serial port seems to give no output at all now.

Also in v24 the CLI has way less features, doesn't even have the "ls" command anymore for example. For now I switched back to v23.

Edit: I found a thread discussing a version for this router of dd-wrt with more features but I cannot figure out how to get it installed.

First, I'm told I need micro-plus, but the bin file doesn't exist anymore. Second, I'm told I need a CFE compressor, but in the list of CFE compressors, my exact router version doesn't exist, but later in the thread, someone says that "WRT54GS_v5.0_init_sdram_128_cfe.bin" will work. I managed to find a copy of this but based on the file size, this does not seem to be a "compressor" but the raw cfe.bin already compressed, and I have no idea what to do with this. The Wiki says to use "mtd" commands which don't exist. Even if I did buy something for jtag and uploaded it, I still would be missing the micro-plus bin, so it would be a waste of time.



.
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1953

PostPosted: Thu Sep 01, 2022 16:59    Post subject: Reply with quote
So you've found db90h/Tornado/Jeremy Collake's page that is referenced elsewhere:

https://wikidevi.wi-cat.ru/Linksys_WRT54GS_v5.0

https://forum.dd-wrt.com/wiki/index.php/Linksys_WRT54GS_v5.0_%26_5.1_%26_6.0

https://forum.dd-wrt.com/wiki/index.php/Flash_your_WRT54G_or_WRT54GS_v5_series_%28v5%2C_v5.1%2C_v6%29

https://forum.dd-wrt.com/wiki/index.php/Enable_16MB_RAM_on_WRT54GS_v5

The compressed CFE file is usually flashed via command line, I would have to do some further looking for specifics, but I thought it was covered somewhere already amongst the plethora of how-tos and wikis. The file that "does not exist" is probably this one:

https://ftp.dd-wrt.com/dd-wrtv2/downloads/others/eko/WRT54G2V1%20Flashing/dd-wrt.v24-10709_NEWD_micro-plus.bin

Even with all of the development since 2006, I do not believe ssh or ssl is included in micro builds. The current release is here:

https://ftp.dd-wrt.com/dd-wrtv2/downloads/betas/2022/08-31-2022-r50012/broadcom/dd-wrt.v24_micro_generic.bin

I think the ideal solution is to configure this WRT54GS v5.x as a Wired Access Point with a fixed IP address, no WAN, DHCP, etc. on the same subnet as the upstream router so you can connect to the webUI from anywhere on the network. See "Linking Routers Wiki" / "Wireless Access Point Wiki" / egc's previous post in this thread.

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
glopgloop
DD-WRT Novice


Joined: 30 Aug 2022
Posts: 3

PostPosted: Thu Sep 01, 2022 23:39    Post subject: Reply with quote
dale_gribble39 wrote:
So you've found db90h/Tornado/Jeremy Collake's page that is referenced elsewhere:

https://wikidevi.wi-cat.ru/Linksys_WRT54GS_v5.0

https://forum.dd-wrt.com/wiki/index.php/Linksys_WRT54GS_v5.0_%26_5.1_%26_6.0

https://forum.dd-wrt.com/wiki/index.php/Flash_your_WRT54G_or_WRT54GS_v5_series_%28v5%2C_v5.1%2C_v6%29

https://forum.dd-wrt.com/wiki/index.php/Enable_16MB_RAM_on_WRT54GS_v5

The compressed CFE file is usually flashed via command line, I would have to do some further looking for specifics, but I thought it was covered somewhere already amongst the plethora of how-tos and wikis. The file that "does not exist" is probably this one:

https://ftp.dd-wrt.com/dd-wrtv2/downloads/others/eko/WRT54G2V1%20Flashing/dd-wrt.v24-10709_NEWD_micro-plus.bin

Even with all of the development since 2006, I do not believe ssh or ssl is included in micro builds. The current release is here:

https://ftp.dd-wrt.com/dd-wrtv2/downloads/betas/2022/08-31-2022-r50012/broadcom/dd-wrt.v24_micro_generic.bin

I think the ideal solution is to configure this WRT54GS v5.x as a Wired Access Point with a fixed IP address, no WAN, DHCP, etc. on the same subnet as the upstream router so you can connect to the webUI from anywhere on the network. See "Linking Routers Wiki" / "Wireless Access Point Wiki" / egc's previous post in this thread.


You're right, I spent more time working on what ecg suggested and I got it working.

I also appreciate you finding that file, so if in the future I want to experiment more with this router I can look into that too.

I really don't know much about router stuff so this is all new to me, so sorry if I'm a bit slow. But I will leave this here in case others are confused, to "disable WAN" set Setup => Basic Setup => Internet Connection Type to "Disabled", and it would not work for more as well until I set the static IP not to just any IP but specifically to the one already assigned to the router (going into the settings of ARM router and looking at what IP it already assigned to the MIPS router and setting the MIPS router static IP to that, you can do this over serial with "nvram set lan_ipaddr=").

So thanks to both of you for your help! This will be a lot more convenient to use now. I also managed to figured out how to get the Firmware Modification Kit to work and managed to squeeze Kermit into the firmware image.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking 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 cannot attach files in this forum
You cannot download files in this forum