Community discussions

MikroTik App
 
tschiex
just joined
Topic Author
Posts: 6
Joined: Fri Apr 16, 2021 10:35 am

Connecting a Mikrotik router to a non cooperative ADSL router

Sat Apr 24, 2021 4:03 pm

Dear Mikrotikers,

I'm a beginner in network management and I find myself in a non-trivial situation. I have a Mikrotik router (A) with Wifi and LTE that I want to connect to an ADSL box (B) in router mode. The box B (a powerful Freebox Delta: it can host Virtual Machines), lacks the ability to set up routes (weird for a router, I know).

I would like to access B's LAN from A and conversely.

The topology:

A is 192.168.8.128, connected to the internet by lte1, to ethernet LAN by a bridge with wlan1, wlan2, and all eth ports except eth1.
B is 192.168.0.1 and is connected to the internet by ADSL + LTE (poor reception) and offers an ethernet LAN with a switch.
A is connected to B by its eth1 port, directly connected to the switch of B.
On A, I have associated a static address 192.168.0.254 to eth1 (not in the pool of B's DHCP server) and I have created a static IP route that maps dst 192.168.0.0/24 to 192.168.0.254%ether1
On B, having no capacity to set up even static routes, I have created a Virtual Machine 'C' (192.168.0.8) with a route to 192.168.8.0/24 via 192.168.0.254 on B's LAN + I have enabled forwarding (sysctl -w net.ipv4.ip_forward=1, useless for now I think, but it's there).

I now have the ability to connect to 192.168.0.8 (C) from any computer on the LAN of A but I cannot connect to any other machine on LAN B. I understand the answer from other machines is sent to B and lost. I also have the ability to connect to any machine of A from C but not from other machines of B (same reason).

I'm considering disabling the DHCP server on B and creating one on C that will identify itself as the "gateway" for B's LAN and keep B as its own default gw but I am also wondering if something simpler could not be set up? Would Proxy ARP be useful in such a setting?

BTW. I'd rather use 2 separate subnets. I previously used a single subnet but I see not 100% reliable connections to the internet (I assume that this may come from answers coming from the wrong gateway?).
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11627
Joined: Thu Mar 03, 2016 10:23 pm

Re: Connecting a Mikrotik router to a non cooperative ADSL router

Sat Apr 24, 2021 4:34 pm

You can use C as default gateway for LAN of B (no need to run DHCP server on C if you can configure DHCP server on B with C's IP address as gateway address).
Or you can skip the C and configure A as default gateway for LAN B, but you'll have to play with policy based routing (so that B will be used as internet gateway for LAN B host and LTE will be used as internet gateway for LAN A hosts) and disable connection tracking for connections from 192.168.0.0/24 which are routed via B (because return traffic will bypass A making its connection tracking machinery very unhappy).

Partial LAN2LAN connectivity is possible if you configure SRC-NAT on A (for traffic towards 192.168.0.0/24), this way hosts from LAN A will be able to reach all hosts on LAN B ... but not the other way around.

Proxy ARP is useless when it comes to separate L3 (IP) subnets.
 
tschiex
just joined
Topic Author
Posts: 6
Joined: Fri Apr 16, 2021 10:35 am

Re: Connecting a Mikrotik router to a non cooperative ADSL router

Sun Apr 25, 2021 4:16 pm

Thanks Mkx,

The Freebox is a great ADSL Box but not a great router. It does not allow one to specify the gateway that the DHCP server advertised. It is automatically set to itself. But it can be turned off, and this explains the idea of an independent VM-based DHCP server. :-(

But I guess I could run a DHCP server on eth1, on the Mikrotik router, with either C as a gateway or your solution with A as a gateway and PBR (which I never tried and would push me to learn more) or using SRC-NAT. Disabling connection tracking... well, I still have a bit to learn I see :-)

Thanks for the help (no Proxy ARP then :-( ) and the suggestions. I will try to move on and come back if I get blocked.

Who is online

Users browsing this forum: Bing [Bot] and 95 guests