12

I have one DD-WRT router (herein: 1st) connected to the Internet, working perfectly, with client PCs assigned static IP addresses.

Now I want to add another static client (herein: 2nd), but this time it's another DD-WRT router, not a PC.

That 2nd DD-WRT is intended to be a DHCP server, "fanning out" whatever is connected to it, such that the other (1st) router sees those client as coming from that single port/IP (say 192.168.14.31).

So far so good, but for some reason the clients that are connected through the 2nd router can't see the Internet.

If I connect a PC to that port assigning to it that static 192.168.14.31 address, it can access the Internet without any problem, so I know that the problem isn't in the first router. The problem is misconfiguration of the 2nd (client) DD-WRT router, as it simply doesn't know how to forward clients from its subnet (192.168.1.X) to the 1st router (192.168.14.1).

Using tracert I have been able to verify that this is indeed the problem. But I don't know what (and how), out of the zillion settings in DD-WRT, to change.

I tried changing the Operating Mode in Advanced Routing from Gateway to Router but while this seems in the right direction, it didn't solve the problem.

Any idea what I should be doing in that 2nd router to tell it to start forwarding packets from 192.168.1.x to 192.168.14.1?

UPDATE 1: I managed to telnet into the router and print the routing table:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 br0
192.168.14.0    *               255.255.255.0   U     0      0        0 vlan1
169.254.0.0     *               255.255.0.0     U     0      0        0 br0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.14.1    0.0.0.0         UG    0      0        0 vlan1

It's clear that the routing table is incorrect, but how do I change it on DD-WRT?

Also, I know what the WAN and LAN ports are, but what are br0 and vlan1? How do I correlate them to the WAN and LAN ports? (I think br0 is one of the LAN ports and vlan1 is the WAN port but I am not sure)

UPDATE 2: I found an option to print the routing table from within DD-WRT's web interface:

192.168.1.0   255.255.255.0   0.0.0.0        LAN & WLAN 
192.168.14.0  255.255.255.0   0.0.0.0        WAN 
169.254.0.0   255.255.0.0     0.0.0.0        LAN & WLAN 
0.0.0.0       0.0.0.0         192.168.14.1   WAN 

Which tells me that, according to DD-WRT:

  • br0 == LAN & WLAN
  • vlan1 == WAN (just as I thought)

Good to know. Now I need to solve this problem (I still have no clue): Make packets from the 192.168.1.x network reach the 192.168.14.1 gateway.

UPDATE 3: Insight. I think that the problem lies with the fact that the netmask for the 192.168.14.0 entry is not 255.255.0.0. The problem is, there is no way to change it... I tried adding an explicit entry in the Advanced Routing tab:

Select set number: WTF
Route Name: WTF
Metric: 0
Destination LAN NET: 192.168.14.0
Subnet Mask: 255.255.0.0
Gateway: 192.168.14.1
Interface: vlan0

But the routing table remains the same even after applying, saving and rebooting!!!

I am beginning to suspect that there is a bug in this DD-WRT v24-sp1 (07/27/08) std release.

4
  • 1
    I there some specific reason you need more than one DHCP server on your network? Oct 31, 2011 at 17:20
  • @typoknig Good question because it allows me to clarify that I am not interested in more than one DHCP server on my network. Only the 2nd router is DHCP. The 1st one (the one connected directly to the Internet through a cable modem) is 100% static. Oct 31, 2011 at 17:55
  • In that case why not just let the 1st router be the DHCP server? Oct 31, 2011 at 17:58
  • 2
    @typoknig Good question but this isn't the problem I am trying to solve. That 1st router has been working for years as it is today and I have no desire to change that. If DD-WRT cannot support something as simple as bridging two subnets, then I will simply revert back to the stock firmware, which worked perfectly in this mode until I decided to "upgrade" to DD-WRT yesterday. Oct 31, 2011 at 18:13

4 Answers 4

3

I was ready to give up and go back to stock firmware when I discovered a well hidden tip in the dd-wrt.com forums about Rosewill RNX-GX4 - Advertised as DD-WRT Compatible that instructs:

You could simply enter DD-WRT firmware and : go to "vlan option", uncheck the “W”column, then "save" and “apply”, then check “W” again then "save" and "apply" <====this could solve the WAN isn't work.

I tried exactly that and it solved all my problems.

1

Is the 2nd router's WAN port set to something in 192.168.14.0/24? I believe it's in Setup and then under where it says "Router IP" The 2nd router's WAN port, or the "Router IP" must be in the same subnet as the LAN ports in the 1st router.

6
  • 1
    Yes, it is, but so far no luck in making this work. There is one tiny detail or trick that's missing but I don't know what it is. The routing table also looks fine but when I tracert 192.168.14.1 (1st router), I get the first hop 192.168.1.1 fine, but the next hop 192.168.14.31 Destination host unreachable. This drives me crazy because I don't understand what's going on and why this is happening. Oct 31, 2011 at 4:02
  • Did you do anything weird with the LAN/WAN port assignments? I believe there is a setting which junctions the WAN port into the same bridge as the LAN ports, and you do NOT want to do this on either router. Also, Router 2's WAN port needs to be connected to a LAN port of Router 1, is this the case?
    – LawrenceC
    Oct 31, 2011 at 13:08
  • 1
    No, I didn't do anything weird with LAN/WAN port assignments, simply because I don't like to change anything I don't understand. Yes, router 2's WAN is connected to the LAN port of router 1. I just posted an update that describes the existing routing table, so this may shed some more light. Oct 31, 2011 at 13:40
  • P.S. I would have voted you up but don't have enough points yet. Oct 31, 2011 at 14:03
  • In the Setup page, where you can assign the Router IP, is the netmask 255.255.255.0 (this is /24)? If not, try changing it to that.
    – LawrenceC
    Oct 31, 2011 at 17:56
1

The problem you're seeing is called Double NAT.

What I would do here is make the 1st router the DHCP server. Really. Just make sure it's handing out IPs that don't conflict with any of your existing static devices. Then, run a cable from a LAN port on the 1st router to a LAN (not WAN) port on the 2nd router, and disable the DHCP service on the 2nd router. This should do almost everything that you want, except that now all devices will likely be in the same subnet. If you're trying to create a kind of guest network, and your router supports it, you can still do this by using a different subnet mask for the dhcp server.

1
  • 1
    Thank you. Yes, triple-NAT for the purpose of a guest network is exactly what I am trying to do, except that I don't want the devices from the 2nd router to have the same subnet as the 1st and I want to keep the 1st static. I want to keep the 1st 192.168.14.x and the 2nd 192.168.1.x. The funny thing is that it worked perfectly with the router's stock firmware before flashing it to DD-WRT on the WAN port, so apparently that stock firmware automatically did what I manually need to do in DD-WRT. I am sure DD-WRT can do this, but I don't know that "secret" setting. Oct 31, 2011 at 14:02
0

Had similar problem. Check MAC addresses for WAN,LAN and WLAN. I changed WAN MAC and problem was solved. (Setup>>MAC address clone...) (In my case WAN an WLAN was the same MACs)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .