Difference between revisions of "GRE Tunnel configuration examples"

From Teltonika Networks Wiki
Line 28: Line 28:
 
[[File:How to add new gre tunnel instance v2.png]]
 
[[File:How to add new gre tunnel instance v2.png]]
 
----
 
----
* Click the "Edit" button located to the right of the newly created GRE Tunnel instance to enter the settings window. Bellow is capture of configurations for both GRE Tunnel instances:
+
* Click the "Edit" button located to the right of the newly created GRE Tunnel instance:
 +
 
 +
[[File:How to edit gre tunnel.png]]
 +
----
 +
* You will be redirected to the settings window where you can start configuring the GRE Tunnel instance. Bellow is capture of configurations for both GRE Tunnel instances:
  
 
[[File:Gre tunnel configuration example.png]]
 
[[File:Gre tunnel configuration example.png]]
  
 +
* Below are explanations of the parameters highlighted in the figure above. Other parameters (not highlighted) are defaults. You can find descriptions for these parameters in the '''[[VPN#GRE Tunnel|VPN manual page, GRE Tunnel section]]'''
 +
** '''Enable''' - enables the IPsec instance
 +
** '''Local IP address/Subnet mask''' - LAN IP address/Subnet mask of the router on which the IPsec instance is configured
 +
** '''Pre shared key''' - a shared password used for authentication between the peers. The value of this field must match on both instances
 +
** '''Remote VPN endpoint''' - the Public IP address of the opposite router
 +
** '''Remote IP address/Subnet mask''' - LAN IP address/Subnet mask of the opposite router
 +
** '''Enable keepalive''' - enables the tunnel's keep alive function. When enabled, the instance sends ICMP packets to the specified host at the specified frequency. If no response is received, the instance attempts to restart the connection
 +
*** '''Host''' - hostname or IP address to which ICMP packets will be sent to. Best to use a hostname/IP address belonging to the opposite instance's LAN. For this example we just use the other router's LAN IP address
 +
*** '''Ping period (sec)''' - the period (in seconds) at which ICMP packets will be sent to the specified host
 +
** '''Allow WebUI access''' - when checked, allows WebUI access for hosts from the opposite instance
 +
'''NOTE''': remember to replace certain parameter values (like IP addresses) with your own relevant data.
 
==See also==
 
==See also==
  

Revision as of 16:14, 15 June 2018

Introduction

Generic Routing Encapsulation (GRE) is a tunneling protocol that can encapsulate a wide variety of network layer protocols inside virtual point-to-point links over an Internet Protocol network.

This article provides an extensive configuration example with details on how to create a tunnel connection between two GRE Tunnel instances, both of which configured on RUTxxx routers.

Configuration overview and prerequisites

Before we begin, let's overview the configuration that we are attempting to achieve and the prerequisites that make it possible.

Prerequisites:

  • Two RUTxxx routers of any type (excluding RUT850)
  • Both routers must have a Public Static or Public Dynamic IP addresses
  • At least one end device (PC, Laptop, Tablet, Smartphone) to configure the routers

Configuration scheme:

Configuration examples gre tunnel scheme.png

As indicated by the figure above, the configuration we are trying to achieve here is very basic: it concerns two RUTxxx routers - RUT1 and RUT2. They are connected into a virtual network via a GRE Tunnel.

Router configuration

If you have familiarized yourself with the configuration scheme and have all of the devices in order, we can start configuring the routers using instructions provided in this section:

  • Login to the router's WebUI and go to Services → VPN → GRE Tunnel. Enter a name for the new instance and click the "Add" button. Do this on both routers:

How to add new gre tunnel instance v2.png


  • Click the "Edit" button located to the right of the newly created GRE Tunnel instance:

How to edit gre tunnel.png


  • You will be redirected to the settings window where you can start configuring the GRE Tunnel instance. Bellow is capture of configurations for both GRE Tunnel instances:

Gre tunnel configuration example.png

  • Below are explanations of the parameters highlighted in the figure above. Other parameters (not highlighted) are defaults. You can find descriptions for these parameters in the VPN manual page, GRE Tunnel section
    • Enable - enables the IPsec instance
    • Local IP address/Subnet mask - LAN IP address/Subnet mask of the router on which the IPsec instance is configured
    • Pre shared key - a shared password used for authentication between the peers. The value of this field must match on both instances
    • Remote VPN endpoint - the Public IP address of the opposite router
    • Remote IP address/Subnet mask - LAN IP address/Subnet mask of the opposite router
    • Enable keepalive - enables the tunnel's keep alive function. When enabled, the instance sends ICMP packets to the specified host at the specified frequency. If no response is received, the instance attempts to restart the connection
      • Host - hostname or IP address to which ICMP packets will be sent to. Best to use a hostname/IP address belonging to the opposite instance's LAN. For this example we just use the other router's LAN IP address
      • Ping period (sec) - the period (in seconds) at which ICMP packets will be sent to the specified host
    • Allow WebUI access - when checked, allows WebUI access for hosts from the opposite instance

NOTE: remember to replace certain parameter values (like IP addresses) with your own relevant data.

See also