Posted: Wed Jul 11, 2018 19:41 Post subject: Two routers, different DHCP and gateway
My situation is as follow:
Router A
A modem-router combo, pretty old generic thing but necessary and unchangeable for the job. The WAN port is occupied by the incoming connection. It has its own DHCP server and so is a basic router. With a lot of sweat and blood I've been able to asign the LAN a static IP in the range of Router B, switch the DHCP server off and asign a DHCP directive server IP to Router B. Letting the LAN side of the modem+router acting like a client.
Router B
A DD-WRT flashed router. WAN + LAN + WLAN, everything you'll expect from a router. Router B (LAN or WAN port?) will be connected to Router A (LAN port) via an ethernet cable. It will have clients connected via RJ45 (LAN) and Wi-Fi (WLAN) who will need to use the interwebs.
I need Router B to act as 'The Router' of the network. Hand out IP's as the DHCP server, etc. But Router A holds the gateway connection to the outside world/internet, which cannot be changed.
I've tried switching Router/Gateway mode and switching WAN on/off on Router B (DD-WRT). And set the static IP of Router A as the gateway in Router B. But without success. At least not with a WAN connection to the internet.
You can daisy-chain routers WAN to LAN (of the upstream router) all day long, just so long as each router has its own unique, non-overlapping local IP network.
I am aware of this and I've allready been successfull in using this method. But this method is something I specifcly do not want for this specific setup. I want to create only 1 LAN with 1 (DHCP) server to keep things clear.
I got it working, thanks for the help! I basically only forgot the set the DNS server to the IP of the modem/gateway..
eibgrad wrote:
If you only want one LAN and one DHCP server, and want that DHCP server to run on the secondary router, then disable its WAN and patch it to the primary router, LAN to LAN. Finally, add the following to the Additional DNSMasq Options field on the Services page.
Code:
# default gateway
dhcp-option=br0,3,192.168.1.1
# dns server
dhcp-option=br0,6,192.168.1.1
Btw, for some reason it doesn't take the 'Additional DNSMasq' config when GUI: 'Setup > Router' is set to 0.0.0.0 for these two options. I like the GUI better anyway