Topic: Chaos calmer behind another router: dhcp ignored

Dear all,

I apologise if this issue is recurrent. There are a lot of postings about bridging, etc. I want the opposite.

I have 4 routers:

Router 1: provided by my ISP, connected to the optical fibre, with DHCP on segment 10.10.0.x
Router 2: Chaos calmer and DHCP on segment 10.10.1.x
Router 3: No DHCP, pure access point in bridged mode
Router 4: No DHCP, pure access point in bridged mode

The idea is to have R1 only serving R2, i.e. R1 LAN <--> R2 WAN.
R2 is my own router and will be responsible for everything: VLANs, parental control, DHCP for all consumers, etc.

R3 and R4 are connected to the LAN ports of R2:

(ISP) WAN-R1-LAN <---> WAN-R2-LAN <---> WAN-{R3,R4}-LAN <---> {consumers ...}

I assumed that R2 would get an IP address from R1 (10.10.0.x) all the others (R3, R4, consumers) would get an IP address from R2 (10.10.1.x), yet it is not the case: everybody, except for the WLAN clients connected directly to R2 has IP addresses in the range 10.10.0.x, as if the WAN and the LAN ports of R2 were bridged.

I used to have this router elsewhere and the ports were bridged, but after reconfiguration it should not be the case. Before I reset everything using failsafe mode and start from scratch, which I don't know if it will help, I thought I asked here if someone already sees what I am doing wrong.

I haven't disabled DHCP on the ISP's router because I have a couple of other things connected to the LAN ports and now I am not sure what will be the consequences. After all, R2 should intercept and serve all DHCP requests coming from the "internal" networks, i.e. from the consumers connected to the other routers. Or not?

Thank you very much in advance for your valuable comments.

Best regards,

2 (edited by golialive 2017-05-19 14:24:06)

Re: Chaos calmer behind another router: dhcp ignored

Hey there.

Could you please give us the switch config from R2, R3 and R4?  I guess at least your R2 switch doesn't expose the WAN sides VLAN (usually eth0.2, VLAN Id 2) but uses all 5 switch ports for LAN (usually eth0.1, VLAN Id 1).

This means you now have two different DHCP server on the same wire, the one from R1 and the one from R2. DHCP requests are answered by both DHCP servers and the client just takes the DHCP response that arrives first.

You can either post the content of /etc/config/network (stripping it down to all "config switch_vlan" sections could be enough, but posting it entirely gives a better picture) or scree shots of your switch configuration panel of the LuCI web interface.

That's what your setting should look like:

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '0t 1 2 3 4'
config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '2'
        option ports '0t 5'

That's what i suspect your setting looks like, which is OK for your dumb APs R3 and R4 but wrong for R2:

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '0t 1 2 3 4 5'
config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '2'
        option ports '0t'

In both situations, I assume "0" is your CPU port, "5" is your WAN port and the numbers 1 through 4 are the LAN ports 1 through 4.
Chances are the actual numbering is different in your case, that different for all router models.

Regards,
Stephan.

(1x) BananaPi M1 ; (3x) TP-Link WDR4900 ; (2x) TP-Link WR1043N ; (1x) TP-Link WDR4300 ; (1x) Netgear WNR3500L ; (1x) Virtual on ESX ; (1x) Virtual on Virtualbox on OS-X
6 VLANs and 3 SSIDs power my home

Re: Chaos calmer behind another router: dhcp ignored

Thanks a lot.

I will check as soon as I come home.
I thought R2 would intercept all DHCP requests without letting them through the WAN.
There is an option "this is the only DHCP server" or similar, but it does not seem to do anything.
I did not even start with the VLAN configuration yet. Had just put the routers in place and felt stupid after being unable to manage even that DHCP thing.

Bis später.

Re: Chaos calmer behind another router: dhcp ignored

There are a couple of settings for DHCP servers, like "dear DHCP server, please shut down as soon as you detect there's another DHCP server on the line" (don't know the exact setting for that) or "dear DHCP server, always answer to DHCP requests even if you know another DHCP server does the same". But doing such things and knowing two different DHCP servers fight for ownership of a single wire always feels pretty undetermined, so I'd suggest to just don't do that.

R1 is your ISP device. Leave that as is, provide 10.10.0.0/24.
R2 is your personal router. Make the port going to R1 the "WAN" port and DHCP client (so it gets a 10.10.0.0/24 from R1). And enable DHCP for R2s LAN interface to assigning 10.10.1.0/24
R3 and R4 are your dumb AP satellites, so connect their LAN interfaces to the LAN interface of R2. Make sure R3 and R4 have fixed IP addresses in the range of 10.10.1.0/24 and disabled DHCP servers.
And make sure R2, R3 and R4 are interconnected through LAN ports but R1 and R2 are connected through R1s LAN port and R2s WAN port.

R1 doesn't need to know anything about R2, R3 and R4, nor about 10.10.1.0/24.

And that's exactly what vlans are for: VLAN Id 1 (eth0.1) is LAN, VLAN Id 2 (eth0.2) is WAN. Although your router has only one eth interface, it can determine between at least a couple of your hardware outlets.

(1x) BananaPi M1 ; (3x) TP-Link WDR4900 ; (2x) TP-Link WR1043N ; (1x) TP-Link WDR4300 ; (1x) Netgear WNR3500L ; (1x) Virtual on ESX ; (1x) Virtual on Virtualbox on OS-X
6 VLANs and 3 SSIDs power my home

Re: Chaos calmer behind another router: dhcp ignored

Dear golialive, what you are describing is exactly what I intended to have and thought I had.
The satellite routers + clients aren't supposed to know anything about R1 and vice-versa.
R1 runs dhcp and provides 10.10.0.0/24. To R2.
R2 is physically connected to R1 on the WAN port: R2 WAN ---> LAN R1
Everyone else is connected to R2 on its LAN ports: R3 (LAN+WLAN), R4 (LAN+WLAN) --> LAN R2
According to your posts, I must have overseen some VLAN settings (I did not get even started with the VLAN) that bridge the LAN and WAN ports of the R2, although I took it off. There must be something I forgot in the /etc/config/network.
Will check at home. Thanks a lot.

Re: Chaos calmer behind another router: dhcp ignored

Fixed.
Thanks to golialive plus the documentation at the router's wiki page (section "every port a vlan")
and the Switch documentation (sorry, I am not allowed to post links) I got it working.

Thanks a lot.