C
C
Cyril2020-02-20 20:02:21
Mikrotik
Cyril, 2020-02-20 20:02:21

How to merge two identical subnets via IPIP on Mikrotik?

There are two offices remote from each other. Both have subnet 10.10.3.0/24 .
Both Mikrotiks WAN'ovsky IP is white.

You can't put IPIP in a bridge like EoIP. I tried to register a subnet on Mikrotik 1 purely for forwarding, let's say 10.100.10.0/30, and on Mikrotik 2 subnet 10.200.10.0/30.

And then just on Mikrotik #1 drive traffic from subnet 10.100.10.0/30 to subnet 10.10.3.0/24 in Office 1, and on Mikrotik #2 drive traffic from subnet 10.200.10.0/30 to subnet 10.10.3.0/24 in Office 2.

Networks 10.100.10.0/30 and 10.200.10.0/30 are purely for forwarding. They are on the LAN interface. On the same LAN interface, the addresses for Mikrotik No. 1 are 10.10.3.1, and for Mikrotik No. 2 - 10.10.3.250.

Tell me, am I on the right track? How to easily combine two identical subnets using IPIP. In other words, to "stretch" the subgrid 10.10.3.0/24 between two offices.

Do not offer EoIP! :-) Can you suggest something else

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Alexandrov, 2020-02-20
@jamakasi666

Please, you can suffer =) :
Router1:
like poke on the "virtual subnet"
/ip route add distance=1 dst-address=10.10.20.0/24 gateway=your-vpn-ip-router2
incoming traffic "virtual subnet type" deploy in real subnet
/ip firewall nat add action=netmap chain=dstnat dst-address=10.10.10.0/24 to-addresses=10.10.3.0/24 we
mask outgoing traffic into the "left virtual subnet" type
/ip firewall nat add action=netmap chain =srcnat src-address=10.10.3.0/24 out-interface=your-vpn-ip-router2 to-addresses=10.10.10.0/24
Router2:
/ip route add distance=1 dst-address=10.10.10.0/24 gateway =your-vpn-ip-router1
/ip firewall nat add action=netmap chain=dstnat dst-address=10.10.20.0/24 to-addresses=10.10.3.0/24
/ip firewall nat add action=netmap chain=srcnat src-address=10.10.3.0/24 out -interface=your-vpn-ip-router1 to-addresses=10.10.20.0/24
It will work, each router will consider that it is communicating with a completely different subnet. In practice, this is a collective farm and it is easier to tear off your hands for those who do not want to put their subnets in order by beating them into separate and wisely.

W
Wexter, 2020-02-20
@Wexter

MPLS/L2VPN to the rescue

N
nApoBo3, 2020-02-20
@nApoBo3

You have some kind of porridge. If you want to connect them with an l2 tunnel (bridge tunnel), then you do not have two subnets, but one geographically distributed one.
If you really have two identical subnets, then your idea is correct. In each subnet, you mask (substitute) a network for a friend, changing addresses in it, substituting a virtual network instead, route this network to another router and do the reverse transformation there. This must be done at both ends of the tunnel, because otherwise you will not get answers.

G
Gregory, 2020-02-21
@Maxlinus

I myself am for 1:1 mapping, as suggested above, but for a long time I came across this article
https://habr.com/ru/post/282858/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question