0

I have two routers. Currently, the second router has dhcp disabled, and is acting as a managed switch. I would instead like to use the second router as a router and set up a private network.

I've reconfigured my network like so:

enter image description here

Both routers have dhcp enabled. I plug a lan port on the first router to the wan port on the second router. The second router is configured to grab it's wan IP via dhcp. This works and I can see that the second router has grabbed a valid ip (192.168.1.68). I've set it's own gateway ip statically (192.168.2.1). The computer on my second router grabs an ip (192.168.2.2) just fine.

The issue is that now, the computer on my second router cannot access the internet. What is wrong and what is the solution?

4
  • Can your second router ping anything?
    – Ramhound
    Commented Jun 19, 2019 at 4:44
  • @Ramhound not sure how to ping from a router, but the computer attached to it cannot ping anything outside the network of the second router. Commented Jun 19, 2019 at 5:56
  • Why did you plug router1->2 as LAN-to-WAN instead of LAN-to-LAN, so everything would be on the same network segment? This would need disabling DHCP on router 2.
    – harrymc
    Commented Jun 19, 2019 at 8:55
  • @harrymc I've currently got it setup exactly like you describe, like I said at the beginning. Currently have lan->lan as managed switch and they are all on same network segment. Now, I would like for the second router to be a distinct network from the router 1 and disallow communication between the two networks. But I would like them both to have internet. Commented Jun 19, 2019 at 21:05

1 Answer 1

0

The issue is that router1 dows.not know to route the IP range 192.168.2.9/24 to router2. You need.to add this to its route table (ie simething like 192.168.2.0 netmask 255.255.255.0 gateway 192.168.1.68

(the reverse.is probably not neccessary because default gateqays will route traffic out)

Alternatively (depending in your goals) replace router2 with a dumb switch, or turn it into one by disabling DHCP and igniring the WAN port.

2
  • This would allow devices on the first router to communicate with devices on the second router right? That is precisely what I'm trying to prevent. I would like router 1 and router 2 to be functionally distinct networks, but both still have internet. Commented Jun 19, 2019 at 17:36
  • Yes. What you have described above is most correctly handled with firewall rules on the second router, but more often hacked by using NAT. The issue you are likely having is NAT is not kicking in on router 2 either because its turned off or because it "knows" that addresses starting 192.168 are internal to your network and shoukd be excluded from NAT. (ie the packets router 1 see have not been rewritten to come from 192.168.1.68, and the router does not know how to find 192.168.2.x
    – davidgo
    Commented Jun 19, 2019 at 20:35

You must log in to answer this question.

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