0

Explaining my dream scheme:

I have main Router_0, it has some own Network_0.

To Router_0 connected Router_1 and Router_2, with their own another diff networks Network_1 and Network_2, and PCs... PC_1 connected to Router_1, and PC_2 connected to Router_2.

So... is it possible and how to setup, that PC_1 can access to all files on PC_2 and the same way reverse? Maybe I should setup netmask on Router_1 and Router_2, like not 255.255.255.0, but use something like 255.255.0.0... Or...

Variants with TeamViewer, ftp servers, vpn, opening a lot of ports and binding them — are unacceptable.

And some problem... My main router is Mikrotik, and I have 2 ISPs, one of them gives for me IP 192.168.1.2 (with Gateway ip 192.168.1.1)...

Img like example.

  • 1
    This is possible, but is likely an XY problem (ie you are asking us how to do X which is how you think you cam achieve Y - when really the solution is to solve Y without the assumptions X implies). Why 3 routers? Are you trying to balance 2 connections or is it important to route some PCs througj 1 and others through another? When you talk about file sharing, is that Windows file sharing or something else - and if the former do the devices need to be automatically discoverable? do thr ISPs give you 192.168.1 addressea (which seems unlikely) or is that the routers?... – davidgo Jul 23 '23 at 22:59
  • What kind of connections do you have and are you willing to change router hardware? – davidgo Jul 23 '23 at 23:00
  • Also - the trickiest bit may be IP address allocation - How do you decide what devices need which connection iis likely the key to solving the problem and will dictate the compromises. If you can statically assign addresses that should go through one of the connections that is likely to be the easiest. – davidgo Jul 23 '23 at 23:14
  • This is exactly what routers are for: connecting different subnets to each other. However, what consumers call routers are often more than simple routers, they're NAT (specifically NAPT) gateways, and doing NAT instead of simple routing can break connectivity from the public/WAN/upstream side of the NAT to the private/LAN/downstream side of the NAT. – Spiff Jul 24 '23 at 01:03

1 Answers1

1

Let's put some numbers:

  • network_0 : 192.168.100.0/24
  • network_1 : 192.168.101.0/24
  • network_2 : 192.168.102.0/24
  • Router_0: LAN address 192.168.100.1, WAN addresses provided by ISPs
  • Router_1: "WAN" address to R_0: 192.168.100.2, gateway 192.168.100.1, LAN address 192.168.101.1
  • Router_2: "WAN" address to R_0: 192.168.100.3, gateway 192.168.100.1, LAN address 192.168.102.1

all you have to do is add a route to the _2 network on _1 router and vice versa.

  • /ip route add dst-address=192.168.102.0/24 gateway=192.168.100.3 on Router_1
  • /ip route add dst-address=192.168.101.0/24 gateway=192.168.100.2 on Router_2
  • /ip route add gateway=192.168.100.1 on each for internet access.
  • NO NAT

If you plug a PC in network_2 and if it has router_2 as gateway, it will be able to reach any PC on network_1, and vice versa.

As for the internet access balanced between 2 ISPs, it is another topic that deserves another question/FAQ reading.