MikroTik to MikroTik GRE Tunnel Configuration

অভ্র শ্যাম
2 min readSep 2, 2023

--

Creating a GRE (Generic Routing Encapsulation) tunnel between two MikroTik routers is a useful way to establish a direct, point-to-point connection between the routers, allowing them to communicate as if they were on the same network. Here are the steps to set up a GRE tunnel between two MikroTik routers:

Fig01: Topology for MikrotTik to MikroTik GRE Tunnel

To Create IPIP tunnel between 2 MikroTik router, we have to configure the following things:

Create IPIP Tunnel Interface.

2. Assign IP address to the tunnel Interface.

3. Add static Route so that only intended host can access the tunnel.

Let’s configure these 3 settings for both routers.

At Router 1 (HQ-Router)

1. Create GRE tunnel interface:

Fig02: Create GRE tunnel Interface in HQ-Router

2. Assign IP address to the tunnel interface:

Fig03: Assign an IP address to the created GRE tunnel interface.

2. Add static Route so that only intended host can access the tunnel

Fig04: Add static route

Repeat those 3 steps again for the Branch-Router.

1. Create GRE Tunnel Interface

Fig05: Creating GRE tunnel interface for the Branch-router.

2. Assign IP address to the tunnel Interface

Fig06: Assigna anIP address to the tunnel interface

3. Add static Route so that only intended host can access the tunnel

Fig07: Add a static route to the routing table

Validate the GRE tunnel by ping Branch PC from HQ-PC.

Fig08: Validating the GRE tunnel.

From the above screenshot we found that the HQ-PC can ping Br-Pc and vice-versa. So the GRE tunnel is working as we expected. We can se the path using the “trace” command also.

--

--