Trouble configuring secondary DD-WRT router via lan to wan

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
zig123
DD-WRT Novice


Joined: 06 Dec 2021
Posts: 18

PostPosted: Wed Jun 22, 2022 0:16    Post subject: Trouble configuring secondary DD-WRT router via lan to wan Reply with quote
For router 1, I have xr500 dumaos set to 192.168.0.2 wan ip, subnet 255.255.255.0 and gateway as 192.168.0.1 with quad9 dns with lan ip 192.168.1.1

For router 2, I have xr500 dumaos set to 192.168.1.2 wan ip, 255.255.255.0 subnet, and 192.168.1.1 gateway with quad9 dns with lan ip 192.168.2.1

The reason I am using wan to lan instead of lan to lan is because I need nat and qos for the second router on. When I switch router 2 over from dumaos to dd-wrt and input the settings in basic setup, the same settings do not work, no internet etc.
Sponsor
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Wed Jun 22, 2022 1:51    Post subject: Reply with quote
Did you perhaps change the Operating Mode from Gateway (the default) to Router on the second router?
_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1899

PostPosted: Wed Jun 22, 2022 1:58    Post subject: Reply with quote
What are the LAN ip addresses of each router? Would help if you gave us a visual presentation (screenshots) of the Setup -> Basic Setup page and applicable DumaOS page in entirety. I have a feeling there is a conflict with IP address settings...
_________________
"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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12836
Location: Netherlands

PostPosted: Wed Jun 22, 2022 2:39    Post subject: Reply with quote
What build are you using?

Screenshots would help

_________________
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
zig123
DD-WRT Novice


Joined: 06 Dec 2021
Posts: 18

PostPosted: Wed Jun 22, 2022 4:42    Post subject: Secondary router working settings, how to convert them to DD Reply with quote
This is a screenshot of my router 2's working static wan ip settings, along with the configured lan ip of 192.168.2.1 that doesn't bother 192.168.1.1 aka router 1s lan ip. These settings work perfectly as a secondary router, but if I try to input the same settings in the ddwrt basic setup page I will get no connection. I flip between the latest firmwares and kong build 9/23/2018
zig123
DD-WRT Novice


Joined: 06 Dec 2021
Posts: 18

PostPosted: Wed Jun 22, 2022 4:53    Post subject: Reply with quote
eibgrad wrote:
Did you perhaps change the Operating Mode from Gateway (the default) to Router on the second router?
I may have tried that before but I don't remember restarting after switching it if that would of made a difference.
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Wed Jun 22, 2022 5:13    Post subject: Reply with quote
zig123 wrote:
eibgrad wrote:
Did you perhaps change the Operating Mode from Gateway (the default) to Router on the second router?
I may have tried that before but I don't remember restarting after switching it if that would of made a difference.


Router mode disables NAT. As such, it requires that the first router has a static route pointing to the WAN ip of the second router as the gateway to to the second router's LAN (apparently 192.168.2.0/24). Failure to do so is a common mistake.

Frankly, there's not much reason to change from Gateway to Router mode anyway. But some ppl insist on trying, and in that case the static route is mandatory.

_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
zig123
DD-WRT Novice


Joined: 06 Dec 2021
Posts: 18

PostPosted: Wed Jun 22, 2022 6:30    Post subject: Reply with quote
eibgrad wrote:
zig123 wrote:
eibgrad wrote:
Did you perhaps change the Operating Mode from Gateway (the default) to Router on the second router?
I may have tried that before but I don't remember restarting after switching it if that would of made a difference.


Router mode disables NAT. As such, it requires that the first router has a static route pointing to the WAN ip of the second router as the gateway to to the second router's LAN (apparently 192.168.2.0/24). Failure to do so is a common mistake.

Frankly, there's not much reason to change from Gateway to Router mode anyway. But some ppl insist on trying, and in that case the static route is mandatory.


I actually see somewhere to put static routes on my first router. I will have to fiddle with this setting. Weird that I didn't have to do this with dumaos but I will test this out.

To clarify, I see a place for host ip, netmask, gateway, metric, and interface. For host ip, I would put the wan ip of the 2nd router 192.168.1.2, the netmask is 255.255.255.0 same as the static wan ips set previously or is it 255.255.255.255? Gateway is 192.168.2.1 or 192.168.2.0? Won't allow me to add 192.168.0.1/24. And as for metric is it 1 or 2? And finally, interface lan, wan?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12836
Location: Netherlands

PostPosted: Wed Jun 22, 2022 6:49    Post subject: Reply with quote
It is very simple, DDWRT should work right out of the box.

Upgrade to the latest build (as of now 49268)

*After* update reset to defaults, put username and password back.

Connect WAN to LAN

The only thing which can cause DDWRT not to work is if the Routers Local IP address has the same subnet as the main router.

If the main router is 192.168.1.1 / 24 then the secondary DDWRT router should be on 192.168.2.1 / 24

Note it has to be different in the third octet.

Do not change anything else

After you have verified it is working proceed with setting up

Upgrade instructions, R7800 and XR500 install guide:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614

General important information 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

_________________
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
zig123
DD-WRT Novice


Joined: 06 Dec 2021
Posts: 18

PostPosted: Wed Jun 22, 2022 7:17    Post subject: Reply with quote
Will try that out as well, thanks egc.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6856
Location: Romerike, Norway

PostPosted: Wed Jun 22, 2022 7:42    Post subject: Reply with quote
In this scenario, there is no reason to run NAT on the second router.

Enter this line in the Firewall script on router 1 to NAT all LAN segments out to Internet.

iptables -t nat -A POSTROUTING -o `get_wanface` -j MASQUERADE
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Wed Jun 22, 2022 11:12    Post subject: Reply with quote
Per Yngve Berg wrote:
In this scenario, there is no reason to run NAT on the second router.

Enter this line in the Firewall script on router 1 to NAT all LAN segments out to Internet.

iptables -t nat -A POSTROUTING -o `get_wanface` -j MASQUERADE


Good point here. If you decide to use Router mode on the second router, then you will have an issue w/ router #1 since dd-wrt, by default, only NAT's its own local network over the WAN. Any additional networks (like that of router #2) will NOT be NAT'd unless you explicitly do it yourself (or as PYB suggests, just NAT everything).

That's why I try to sway users away from using Router mode. Yes, technically NAT shouldn't be necessary, but the reality is, less experienced users end up getting into trouble because they fail to properly configure daisy-chained routers using Router mode. Gateway mode (the default) just simplifies matters.

We ran into so many problems like this over on the Tomato forums, the developers decided to eliminate Router mode entirely! It's no longer an option. It's always Gateway mode.

_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1899

PostPosted: Wed Jun 22, 2022 11:21    Post subject: Reply with quote
The problem is that Router 1 is still running DumaOS, not DD-WRT (re-read the OP carefully); however, that is a very good point, otherwise. The *other* problem here is the XR500 is Atheros, not Broadcom so the mods should move this topic...
_________________
"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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12836
Location: Netherlands

PostPosted: Wed Jun 22, 2022 13:40    Post subject: Reply with quote
Moved to Atheros
_________________
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
RobrPatty
DD-WRT User


Joined: 06 Jun 2016
Posts: 174

PostPosted: Wed Jun 22, 2022 20:24    Post subject: Reply with quote
egc wrote:
It is very simple, DDWRT should work right out of the box.

Upgrade to the latest build (as of now 49268)

*After* update reset to defaults, put username and password back.

Connect WAN to LAN

The only thing which can cause DDWRT not to work is if the Routers Local IP address has the same subnet as the main router.

If the main router is 192.168.1.1 / 24 then the secondary DDWRT router should be on 192.168.2.1 / 24

Note it has to be different in the third octet.

Do not change anything else

After you have verified it is working proceed with setting up

Upgrade instructions, R7800 and XR500 install guide:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614

General important information 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


Thanks for this little explanation. I now have converted my second Netgear router(8500) to ddwrt. 1st router R9000...2nd R8500 both working smoothly on latest ddwrt firmware.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC 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 cannot attach files in this forum
You cannot download files in this forum