EoIP or Ether over IP tunnel is a tunnel protocol designed by Mikrotik development team which allows network administrators to easily connect private LANs located in different locations separated by cities or countries. As long as the Mikrotik routers can ping each other, we can create the EoIP tunnel among them.
This article shows you how to create EoIP tunnel between two Mikrotik routers. After you understand how the EoIP works, you can easily add more routers to create the tunnel.
To make it easier, we will follow the network diagram below.
There are two Mikrotik routers, MT1 and MT2 which have the following technical data:
Public IP: 184.108.40.206/28 (assigned to ether1)
Default Gateway: 220.127.116.11
LAN IP: 192.168.100.0/24
EoIP tunnel IP: 10.10.10.1/30 (assigned to eoip1)
Public IP: 18.104.22.168/27 (assigned to ether1)
Default Gateway: 22.214.171.124
LAN IP: 192.168.101.0/24
EoIP tunnel IP: 10.10.10.2/30 (assigned to eoip2)
I assume that you have configured the internal LAN so it can connect to internet (masquerade the private IPs to the public interface).
Below are the configuration on both MT1 and MT2:
/ip address add address=126.96.36.199/28 interface=ether1 /ip route add dst-address=0.0.0.0/0 gateway=188.8.131.52 /ip firewall nat add action=masquerade chain=srcnat out-interface=ether1 src-address=192.168.100.0/24 /interface eoip add name=eoip1 remote-address=184.108.40.206 tunnel-id=10 /ip address add address=10.10.10.1/30 interface=eoip1 /ip route add dst-address=192.168.101.0/24 gateway=10.10.10.2
/ip address add address=220.127.116.11/27 interface=ether1 /ip route add dst-address=0.0.0.0/0 gateway=18.104.22.168 /ip firewall nat add action=masquerade chain=srcnat out-interface=ether1 src-address=192.168.101.0/24 /interface eoip add name=eoip2 remote-address=22.214.171.124 tunnel-id=10 /ip address add address=10.10.10.2/30 interface=eoip1 /ip route add dst-address=192.168.100.0/24 gateway=10.10.10.1
After you finish setting the above configuration, you should be able to ping from Laptop1 / PC1 to Laptop2 / PC2 and the other way around.
See how easy it is to connect private LANs across internet via EoIP tunnel.