Difference between revisions of "Template:Netoworking rut configuration example gre via cli"

From Teltonika Networks Wiki
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
{{Template:Networking_rutxxx_manual_fw_disclosure | fw_version= {{{fw_version}}} }}
 
  
 
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.
 
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, configured on two RUTxxx router devices.  
+
This article provides an extensive configuration example with details on how to create a tunnel connection between two GRE Tunnel instances, configured on two RUTxxx router devices.
 
 
To do this instruction is necessary to know how to use CLI or SSH connection, the instructions to remote access are in this link https://wiki.teltonika-networks.com/view/Command_line_interfaces
 
  
 
==Prerequisites==
 
==Prerequisites==
Line 18: Line 15:
 
==Configuration scheme==
 
==Configuration scheme==
  
[[File:{{{file_scheme}}}|border|class=tlt-border|1100px]]
+
[[File:Netoworking rut configuration example gre via cli 01.png|border|class=tlt-border]]
 +
 
 +
==RUT configuration==
 +
 
 +
Access to the RUTxxx via CLI or SHH.
 +
<li>'''Note:''' The instructions to access are in this link https://wiki.teltonika-networks.com/view/Command_line_interfaces</li>
  
==GRE instance 1 Configuration==
+
To set up the first instance,
To set up the first instance we have to check the subnet LAN interface and the GRE config file.
 
  
<ul>
+
[[File:Networking_rutxxx_configuration_example_gre_instance_v1.png|border|class=tlt-border]]
<li>Configuring the LAN interface.</li>
 
  
<div>With the '''cat''' command access to '''/etc/config/network''' and the subnet should be '''192.168.1.1'''</div> <br>
+
Then apply the configuration presented below.  
  
[[File:Netoworking rut configuration example gre via cli 02.png|border]] <br><br>
+
[[File:Networking_rutxxx_configuration_example_rut_settings_v1.png|border|class=tlt-border]]
  
<li>Configuring GRE Tunnel</li>
+
#'''Enable''' instance.
<div>GRE Tunnel configuration should be written in the same file. Use the '''vi''' command to access and edit.</div> <br>
+
#Select '''Tunnel source''' (select your WAN interface).
<div>Since you accessed to the SSH or CLI, write '''vi /etc/config/network''', then press on the '''i''' key and navigate to the end of the file with the arrow keys.</div><br>
+
#Enter '''Remote endpoint IP address''' (Cisco WAN IP).
[[File:Networking rutxxx configuration examples gre via cli 01.png|border]] <br><br>
+
#Set '''MTU''' to '''1440'''.
 +
#Write '''Local GRE interface IP address''' (create GRE tunnel IP address or just use the same as in the example).
 +
#Write '''Local GRE interface netmask''' (create GRE tunnel netmask or just use the same as in the example)
 +
#Leave everything else as default and click '''Save'''.
  
Add the GRE tunnel config according with the following picture. <br><br>
+
==Cisco configuration==
  
[[File:Networking rutxxx configuration examples gre via cli 02.png|border]] <br>
+
Connect to router's '''WebUI''', go to '''VPN > GRE Tunnel''' and apply the following configuration.
</ul><br>
+
 
Use the '''ESC''' key, write ''':wq''' and press '''Enter''' to save the changes.
+
[[File:Networking_rutxxx_configuration_example_cisco_settings_v1.png|border|class=tlt-border]]
Since you are in the root windows, write '''/etc/init.d/network restart''' and wait a seconds until the router.
+
 
==GRE instance 2 Configuration==
+
#Write '''GRE Tunnel Description''' (anything you want).
Access via CLI or SSH and write '''vi /etc/config/network''', then press on the '''i''' key and navigate to the end of the file with the arrow keys.</div><br>
+
#Select '''Source''' (select your WAN interface).
<li>Edit your LAN interface and select '''192.168.2.1'''</li><br>
+
#Enter '''Destination''' (RUT WAN IP).
[[File:Networking rutxxx configuration examples gre via cli 07.png|border]]
+
#Write '''IP Address Of GRE Tunnel''' (create GRE tunnel IP address or just use the same as in the example).
<br><br>
+
#Write '''Subnet Mask''' (create GRE tunnel netmask or just use the same as in the example).
Also Add the GRE tunnel config according with the following picture. <br><br>
+
#Set '''MTU''' to '''1440'''.
[[File:Networking rutxxx configuration examples gre via cli 03.png|border]]<br><br>
+
#Leave everything else as default and save settings.
Use the '''ESC''' key, write ''':wq''' and press '''Enter''' to save the changes.
 
Since you are in the root windows, write '''/etc/init.d/network restart''' and wait a seconds until the system restart.
 
  
 
==Testing configuration==
 
==Testing configuration==
  
If you've followed all the steps presented above, your configuration should be finished. But as with any other configuration, it is always wise to test the setup in order to make sure that it works properly.  
+
If you've followed all the steps presented above, your configuration should be finished. But as with any other configuration, it is always wise to test the setup in order to make sure that it works properly. In order to test the GRE Tunnel connection, login to RUT WebUI and go to '''Services → CLI'''. Login with user name: '''root''' and the router's admin password. From there you should then be able to '''ping''' the opposite instance's virtual IP address. To use a ping command, type '''ping <ip_address>''' and press the "Enter" key on your keyboard:
  
In order to test the GRE Tunnel connection, login to SHH or CLI and From there you should then be able to '''ping''' the opposite instance's virtual IP address. To use a ping command, type '''ping <ip_address>''' and press the "Enter" key on your keyboard:<br><br>
+
[[File:Networking_rutxxx_configuration_example_test_v1.png|border|class=tlt-border]]
 
 
[[File:Networking rutxxx configuration examples gre via cli 04.png|border]]<br><br>
 
  
 
If the ping requests are successful, congratulations, your setup works! If not, we suggest that you review all steps once more.
 
If the ping requests are successful, congratulations, your setup works! If not, we suggest that you review all steps once more.
 
[[Category:{{{name}}} Configuration Examples]]
 

Revision as of 21:20, 11 March 2020

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, configured on two RUTxxx router devices.

Prerequisites

You will need:

  • Two RUTxxx routers
  • A PC to configure the routers
  • Both routers must have a Public Static or Public Dynamic IP addresses

Configuration scheme

Netoworking rut configuration example gre via cli 01.png

RUT configuration

Access to the RUTxxx via CLI or SHH.

  • Note: The instructions to access are in this link https://wiki.teltonika-networks.com/view/Command_line_interfaces
  • To set up the first instance, Networking rutxxx configuration example gre instance v1.png Then apply the configuration presented below. Networking rutxxx configuration example rut settings v1.png

    1. Enable instance.
    2. Select Tunnel source (select your WAN interface).
    3. Enter Remote endpoint IP address (Cisco WAN IP).
    4. Set MTU to 1440.
    5. Write Local GRE interface IP address (create GRE tunnel IP address or just use the same as in the example).
    6. Write Local GRE interface netmask (create GRE tunnel netmask or just use the same as in the example)
    7. Leave everything else as default and click Save.

    Cisco configuration

    Connect to router's WebUI, go to VPN > GRE Tunnel and apply the following configuration.

    Networking rutxxx configuration example cisco settings v1.png

    1. Write GRE Tunnel Description (anything you want).
    2. Select Source (select your WAN interface).
    3. Enter Destination (RUT WAN IP).
    4. Write IP Address Of GRE Tunnel (create GRE tunnel IP address or just use the same as in the example).
    5. Write Subnet Mask (create GRE tunnel netmask or just use the same as in the example).
    6. Set MTU to 1440.
    7. Leave everything else as default and save settings.

    Testing configuration

    If you've followed all the steps presented above, your configuration should be finished. But as with any other configuration, it is always wise to test the setup in order to make sure that it works properly. In order to test the GRE Tunnel connection, login to RUT WebUI and go to Services → CLI. Login with user name: root and the router's admin password. From there you should then be able to ping the opposite instance's virtual IP address. To use a ping command, type ping <ip_address> and press the "Enter" key on your keyboard:

    Networking rutxxx configuration example test v1.png

    If the ping requests are successful, congratulations, your setup works! If not, we suggest that you review all steps once more.