In this tutorial, we will discuss how to configure GRE tunnel in Mikoritk Router. The GRE is a one kind of tunneling protocol. This protocol was developed by Cisco System. We can also call it communication protocol. This protocol is used to transfer data privately through public networks. This protocol creates a tunnel with two or more networking devices. Later, data will be sent using that tunnel. This tunnel can be point to point or point to multi point. At the end of this tutorial, we will learn how to establish a GRE tunnel between two Mikrotik routers. And how to transfer data using that tunnel. So let's get started:
We assume we have two site offices. Their names are Site-Office 1 and Site-Office 2. The two site offices have internal LAN network and both the offices are connected to the Internet. We further assume that the private network address of Site Office 1 is 10.10.10.0/24 and the public IP address is 1.1.1.1. Similarly, the private network address of Site Office 2 is 192.17.1.0/24 and the public IP address is 2.2.2.2. Now we will build a connection between these two networks using the GRE tunnel.
First we will create a tunnel using the public addresses of the two offices. We are starting the work of making tunnel from site office 1.
We will create a tunnel in the “GRE Tunnel” tab from the Interface menu.
We will click on the Add (+) button to create a new tunnel. Then the following interface will come in front of us.
In this interface we will provide the configuration of our tunnel. Here a name can be given for the tunnel interface in the “Name” field. In the “Local Address” field will be the public IP address of Site Office 1 i.e. 1.1.1.1. And in the “Remote Address” field will be the public IP address of Site Office 2 i.e. 2.2.2.2. I will apply and go out.
Tunnel configuration is over in our site office 1. Now we will create a tunnel in Site Office 2. The process of creating the tunnel here will be the same as the complete site office 1. Only the “Local Address” and “Remote Address” fields will change slightly. Here in the “Local Address” field will be the public IP address of Site Office 2 and in the “Remote Address” field will be the public IP address of Site Office 1.
After applying at the end of all configuration, our tunnel will go into running mode or will be activated. We can see the status of the tunnel at the bottom of this interface.
If the tunnel is not active then the text "running" will be blurred. If the tunnel is disabled, then "disabled" will be written. We have finished building the tunnel. Now we need to enable data transfer between the two offices using this tunnel. To enable this data transfer, we need to configure "IP route" between the two offices. And to configure “IP route” we have to assign IP address in the tunnel interface. We will give the IP address as 192.18.68.1/24 in the tunnel interface of Site Office 1 and 192.18.68.2/24 as the IP address in the tunnel interface of Site Office 2.
So, now let's configure the IP address. First I will give the IP address in the tunnel of site office 1. To configure the IP address, our location is: IP -> Address
Now in this interface I will give the IP address in the “Address” field and select our tunnel interface in the “Interface” field. The name of our tunnel interface in Site Office 1 is "Site Office 1".
In the same way we will configure the IP address in Site Office 2. Our IP address at Site Office 2 will be 192.18.8.2/24.
Assigning IP address to our tunnel interface is done. Now we will configure the IP route between the two office routers. We will configure the route in the router of site office 1 for the local network of site office 2 i.e. for 192.18.1.0/24 network. And the gateway address for this will be the tunnel IP address of Site Office 2 i.e. 192.18.68.2. In the same way, we will configure the route to Site Office 2 for the local network of Site Office 1 i.e. 10.10.10.0/24 and its gateway address will be the tunnel IP address of Site Office 1 i.e. 192.18.68.1.
First let's start with the site office 1 router. Now, we will add a new route to the "Route List".
Now we will add route to site office 2.
All our work is over. From now on, the users of Site Office 1 will be able to access the network resource of Site Office 2 and at the same time the users of Site Office 2 will also be able to access the network resource of Site Office 1.
No comments:
Post a Comment