A
A
Alik Send2022-03-20 00:17:57
Mikrotik
Alik Send, 2022-03-20 00:17:57

How to connect a mikrotik router to a provider that issues the same IPs as in the internal network?

Let me describe the situation in a simplified way.

There is a mikrotik home router on which a lot of things are configured for the home network. He, among other things, distributes addresses 192.168.0/24 while having the address 192.168.0.1.
The Internet was gone and I wanted to connect to the neighbor's wifi until it was fixed. At the same time, the neighboring router also distributes addresses 192.168.0.0/24 and its router has the address 192.168.0.1.

As far as I understand, the problem is that in IP / Routes I cannot specify which interface the traffic should go through, I can only specify IP. Accordingly, when connecting to a neighbor's WiFi, the default route is specified for 0.0.0.0/0 through 192.168.0.1, but this address is available through the main bridge (since this is also the address of the mikrotik router itself) and, accordingly, nothing works. If I do `ping 192.168.0.1` through winbox then I get the expected 0ms, if I do `ping 192.168.0.1 interface=wlan2.4` then I get more time, that is, pings still go through wifi to the neighbor's router. But how to make all traffic from the router go through the wifi interface?

In other words, how do I set up my router with an internal network if my ISP gives me an address that falls within the range of that network?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Drno, 2022-03-20
@aliksend

No way. Networks must not overlap.
Change addressing or wan or local

A
Alexander Karabanov, 2022-03-20
@karabanov

I can’t specify which interface the traffic should go through, I can only specify the IP

You can also specify the interface through "%":
/ip route
add comment=Test gateway=192.168.0.1%wlan2.4

PS
No need to rename interfaces. During the update, special effects will occur if the interface names do not match the expected ones. Use comments to sign interfaces.
Also, you do not need to edit the default policies for IPsec, profiles for PPP, keys for Wi-Fi, and so on, you need to copy them and change them to suit your needs or create new ones from scratch, for the reasons described above.

A
AUser0, 2022-03-20
@AUser0

And why not change to IP 192.168.0.2 for the time of problems?
Of course, by correcting the default gatewat in the DHCP server settings of this Mikrotik.

N
Nikita Iushin, 2022-03-28
@Gatarios

Very simple. You can change your local addresses to unique ones on Mikrotik. For example, my addresses are 42.0.0.0/24 and 42.0.1.0/24.
This is done in IP -> DHCP Server (in the Networks tab) and in IP -> Addresses.
Accordingly, if static was configured on the connected devices, then it is also desirable to change to unique
6241b99d0a0b1098576821.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question