How to create tunnel interface on Mikrotik

In this article I want to show you how to create tunnel interface on Mikrotik. There are two types of tunneling supported by Mikrotik, IP-IP (IP over IP) tunnel and EoIP (Ethernet over IP) tunnel.

This article will show you how to create both tunneling. In this article we have to achieve the condition below.

Conditions:
Mikrotik Router A IP Address: 111.222.123.34/28
Mikrotik Router B IP Address: 100.200.101.130/27
Point to Point IP Address: 192.168.201.0/30

1. IP-IP (IP over IP) Tunnel

Router A:

interface ipip add name=ipip1 local-address=111.222.123.34 remote-address=100.200.101.130 disabled=no
ip address add address=192.168.201.1/30 interface=ipip1 disabled=no

Router B:

interface ipip add name=ipip1 local-address=100.200.101.130 remote-address=111.222.123.34 disabled=no
ip address add address=192.168.201.2/30 interface=ipip1 disabled=no

2. Ethernet over IP (EoIP) Tunnel

Router A:

interface eoip add name=eoip-tunnel1 remote-address=100.200.101.130 tunnel-id=1 arp=enabled
ip address add address=192.168.201.1/30 interface= eoip-tunnel1  disabled=no

Router B:

interface eoip add name=eoip-tunnel1 remote-address=111.222.123.34 tunnel-id=1 arp=enabled
ip address add address=192.168.201.2/30 interface= eoip-tunnel1  disabled=no

After the tunnel interface has been configured, you have to add route the network address that you want to allocate. For example if you want to add a network address of 100.200.102.0/24 that point to Router B, you have to add a route in the Router A as follow:

ip route add dst-address=100.200.102.0/24 gateway=192.168.201.2