Routing – How to Link Two Routers LAN to WAN

nat;routerroutingsubnet

My former modem was replaced by a all-in-one modem/router (10.1.9.1/24) after a speed upgrade.
I still have my DD-WRT router (10.1.10.1/24), which I want to be my main router, i. e. as DHCP server, VPN server, static arp cache entries etc.

I figured since I want two different subnets, I should connect the modem/router to the dd-wrt router LAN to WAN.

But the clients connected to the dd-wrt router don't have access to the internet. The router itself gets assigned an IP address on its WAN interface, either a static one or via DHCP.

I think the first problem is a subset of the 2nd.


What I tried so far: I've set up two subnet, as you can see above.
The 1st is 10.1.9.1/255.255.255.0, the second 10.1.10.1/255.255.255.0 (also tried 255.255.240.0). IP of first is gateway of 2nd router.


QUESTION
What do I have to configure on the dd-wrt router to have its clients reach the internet? And what do I have to do, if I want to reach the outer subnet from the inner one, i. e. reach the webinterface of the new all-in-one device.


Additional info
The first device has a very simplistic interface. It's an Ubee EVW3226.

Best Answer

You need to make sure the NAT and routing is working for both routers. You have them connected correctly, with dd-wrt WAN port connected to modem LAN port.

  1. Disable NAT on dd-wrt
  2. Give the dd-wrt WAN port a static IP in 10.1.9.x (lets say 10.1.9.2)
  3. On the modem/router add a static route saying 10.1.10.0/24 should be routed to 10.1.9.2 (dd-wrt)
  4. On the dd-wrt have a default route pointing to 10.1.9.1

Step 1 disables NAT, which you will need to do if you plan to use any port forwarding from the internet, such as for your VPN

Step 2 has to be static in order for step 3 to work

Step 3 makes the modem router aware of the internal network.

Related Question