Difference between revisions of "Relayd"

From Teltonika Networks Wiki
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
  
'''Relayd''' is a daemon (computer program that runs as a background process) used to relay and dynamically redirect incoming connections to a target host. Its main purpose in RUTxxx routers is to extend the wireless network. For example, when RUTxxx is in STA Wireless Station mode, it can be used to bridge WAN and LAN interfaces to create a larger Wireless network.
+
'''Relayd''' is a daemon to relay and dynamically redirect incoming connections to a target host. Its main purpose in RUT routers is extending the wireless network. For example, when RUT is in STA (Wireless Station) mode, it can be used to bridge WAN and LAN interfaces to create a larger Wireless network.
  
This article provides an extensive configuration example of a basic Relayd usage scenario with two RUTxxx devices.
+
This article will provide an extensive configuration example of a basic Relayd usage scenario with RUT devices.
  
 
==Configuration overview and prerequisites==
 
==Configuration overview and prerequisites==
Line 10: Line 10:
  
 
'''Prerequisites''':
 
'''Prerequisites''':
* Two RUTxxx routers (one of them with an active data connection)
+
* Two RUT routers (one of them with active data connection)
* An end device (PC, Laptop, Tablet, Smartphone)
+
* An end device(s) (PC, Laptop, Tablet, Smartphone)
  
 
----
 
----
 
'''Configuration scheme''':
 
'''Configuration scheme''':
  
[[File:Configuration examples relayd scheme v5.png| 1152px ]]  
+
[[File:Configuration examples relayd scheme v3.png]]
  
The scheme depicts two RUTxxx routers - RUT1 and RUT2. RUT1 has access to the Internet through an undefined type of WAN (it can be any). RUT2 acts as a WiFi Station (STA) and gains access to the Internet via RUT1's WiFi Access Point (AP) (SSID: RUT_WiFi). RUT2's DHCP Server is disabled. This is done so that the end devices connected to RUT2 get IP addresses from RUT1's DHCP Server with the help of Relayd.
+
The scheme depicts two RUT routers - RUT1 and RUT2. RUT1 has access to the Internet through an undefined type of WAN (it can be any). RUT2 acts as a Wi-Fi Station (STA) and gains access to the Internet via RUT1's Wi-Fi Access Point (AP) (SSID: RUT_WiFi). RUT2's DHCP Server is disabled. This is done so that the end devices connected to RUT2 get IP addresses from RUT1's DHCP Server with the help of Relayd.
  
So in short, this type of configuration connects devices from different networks into a single network, making it possible for the devices to communicate with each other while also providing the devices with an Internet connection.
+
So in short, this type of configuration connects devices from different networks into a single network, making it possible for the devices to communicate with each other and providing the devices with an Internet connection.
  
'''NOTE''': the parameters displayed in the scheme above will be used in further examples of this guide. Parameters like LAN IP addresses and WiFi SSID should be chosen in accordance with your own needs.
+
'''NOTE''': the parameters displayed in the scheme above will be used in further examples of this guide. Parameters like LAN IP addresses and Wi-Fi SSID should be chosen in accordance with your own needs.  
  
 
==Router configuration==
 
==Router configuration==
Line 33: Line 33:
  
 
* An active data connection (WAN type doesn't matter; use what is available to you or what best suits your needs)
 
* An active data connection (WAN type doesn't matter; use what is available to you or what best suits your needs)
* An active WiFi Access Point (AP)
+
* An active Wi-Fi Access Point (AP)
 
* An active DHCP Server
 
* An active DHCP Server
  
A WiFi Access Point (AP) and DHCP Server are enabled by default on RUTxxx routers, but if you wish to make changes, you can find the configuration pages for these services by logging in to the router's WebUI and visiting the '''Network → Wireless''' section for WiFi and '''Network → LAN''' for DHCP.
+
A Wi-Fi Access Point (AP) and DHCP Server are enabled by default on RUT routers, but if you wish to make changes, you can find the configuration pages of these services by logging in to the router's WebUI and visiting the '''Network → Wireless''' section for Wi-Fi and '''Network → LAN''' for DHCP. For additional information on these pages, visit their respective Manual chapters:
 +
 
 +
* '''[[Wireless#Wireless_Access_Point|Wireless Access Point]]'''
 +
* '''[[LAN#DHCP_Server|DHCP Server]]'''
  
 
===RUT2===
 
===RUT2===
Line 42: Line 45:
 
The key things you need to configure in RUT2 are:
 
The key things you need to configure in RUT2 are:
  
* Enable WiFi WAN and connect to RUT1's WiFi Access Point
+
* Enable Wi-Fi WAN and connect to RUT1's Wi-Fi Access Point
* Enable Relayd and disable DHCP Server
+
* Disable the DHCP Server and enable Relayd
 
 
'''NOTE''': in this case, the steps should be taken in the order they are presented in, because if you disable RUT2's DHCP Server first, you may lose access to your router. So let's begin by setting up WiFi WAN.
 
 
 
====WiFi WAN====
 
----
 
* To set up WiFi WAN, login to the router's WebUI and navigate to the WAN section found under the Network tab ('''Network → WAN'''):
 
  
[[File:Relayd configuration example how to set up wifi wan part 1 v2.png]]
+
These steps should be taken in the order they are presented in, because if you disable RUT2's DHCP Server first, you may lose access to your router. So let's begin by setting up Wi-Fi WAN.
----
 
* Choose WiFi as your Main WAN option and click the "Save" button. After this, a "Scan" button should appear next to the WiFi WAN option. Click it:
 
  
[[File:Relayd configuration example how to set up wifi wan part 2 v2.png]]
+
====Wi-Fi WAN====
 
----
 
----
* You will be redirected to window warning you that during the scan the WiFi service will temporarily shut down. If you are okay with this, click "Start scan":
+
To set up Wi-Fi WAN, log in to the router's WebUI and navigate to the WAN section found under the Network tab. Choose WiFi as your Main WAN option and click the '''Save''' button. After this, a '''Scan''' button should appear. Click it and it will initiate a scan for nearby Wi-Fi Access Points. Choose RUT1's Access Point and click '''Join network''':
  
[[File:Relayd configuration example how to set up wifi wan part 3 v2.png]]
+
[[File:Relayd configuration example how to set up wifi wan.png]]
----
 
* Once the scan is complete, you will be presented with a list of nearby WiFi Access Points. Locate and choose RUT1's Access Point and click "Join network":
 
  
[[File:Relayd configuration example how to set up wifi wan part 4 v3.png]]
+
You can visit the '''[[Wireless#Wireless_Station|Wireless Station]]''' chapter for additional information on Wi-Fi WAN.
 
 
You can visit the '''Wireless Station''' chapter of the user manual for additional information on WiFi WAN.
 
 
 
====Relayd and DHCP Server====
 
----
 
* Configuration for both DHCP and Relayd takes place in the LAN section of the router's WebUI. Login and navigate to the LAN section which is located under the Network tab ('''Network → LAN'''):
 
 
 
[[File:How to disable dhcp enable relayd part 1 v2.png]]
 
----
 
* In the LAN page set DHCP to "Disable":
 
 
 
[[File:How to disable dhcp enable relayd part 2 v2.png]]
 
----
 
* Place a check mark next to the "Enable relayd" field and click the "Save" button:
 
 
 
[[File:How to disable dhcp enable relayd part 3 v2.png]]
 
  
 
==Testing the set up==
 
==Testing the set up==
  
If you've taken all of the steps described above, the configuration is done. But as with any other configuration, it is always wise to test the set up in order to make sure that it works properly. To test this particular set up, login to any of the routers go to '''Services → CLI'''. Login with user name: '''root''' and the router's admin password. You should then be able to '''ping''' the other router or any of the end devices that you have connected to either of the two router's. To execute a ping command, type '''ping <devices_ip>''' into the console and press the Enter key:
+
==External links==
 
 
[[File:Testing relayd.png]]
 
 
 
Replace <devices_ip> with an actual IP address of a device that is in your network and if the ping requests are successful it means the configuration is working. You can check the IP addresses of the devices connected to your network in RUT1's '''Status → Network → LAN''' section.
 
 
 
==Additional notes==
 
 
 
An important issue to bring up is that the two routers will not be able to communicate with each other via their LAN IPs if they have LAN IP addresses in different subnets. If that is the case, there are still a few options you can take without changing either of the routers IP addresses:
 
 
 
* When communicating between routers, use RUT2's WAN IP instead of its LAN IP. This will work because RUT1 will lease the WAN IP address to RUT2 from its LAN network. If that is the case you chose, then don't forget to check RUT2's WAN IP after completing the '''[[Relayd#WiFi_WAN|3.2.1]]''' step of this guide
 
* Add Static Routes to each router in the '''Network → Routing → Static Routes''' section. This must be done from both ends, i.e., you must configure a route both in RUT1 and in RUT2
 
 
 
The communication between RUT1 and the end devices in either network will work regardless of what RUT2's LAN IP address is.
 
 
 
[[Category:-Network Control]] [[Category:RUT955 Config Examples]] [[Category:RUT950 Config Examples]] [[Category:RUT900 Config Examples]] [[Category:RUT240 Config Examples]] [[Category:RUT230 Config Examples]]
 

Revision as of 15:42, 17 April 2018

Network > -Network Control > Relayd

Introduction

Relayd is a daemon to relay and dynamically redirect incoming connections to a target host. Its main purpose in RUT routers is extending the wireless network. For example, when RUT is in STA (Wireless Station) mode, it can be used to bridge WAN and LAN interfaces to create a larger Wireless network.

This article will provide an extensive configuration example of a basic Relayd usage scenario with RUT devices.

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 RUT routers (one of them with active data connection)
  • An end device(s) (PC, Laptop, Tablet, Smartphone)

Configuration scheme:

Configuration examples relayd scheme v3.png

The scheme depicts two RUT routers - RUT1 and RUT2. RUT1 has access to the Internet through an undefined type of WAN (it can be any). RUT2 acts as a Wi-Fi Station (STA) and gains access to the Internet via RUT1's Wi-Fi Access Point (AP) (SSID: RUT_WiFi). RUT2's DHCP Server is disabled. This is done so that the end devices connected to RUT2 get IP addresses from RUT1's DHCP Server with the help of Relayd.

So in short, this type of configuration connects devices from different networks into a single network, making it possible for the devices to communicate with each other and providing the devices with an Internet connection.

NOTE: the parameters displayed in the scheme above will be used in further examples of this guide. Parameters like LAN IP addresses and Wi-Fi SSID should be chosen in accordance with your own needs.

Router configuration

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

RUT1


The configuration for RUT1 is fairly simple. You only need to make sure that the router has:

  • An active data connection (WAN type doesn't matter; use what is available to you or what best suits your needs)
  • An active Wi-Fi Access Point (AP)
  • An active DHCP Server

A Wi-Fi Access Point (AP) and DHCP Server are enabled by default on RUT routers, but if you wish to make changes, you can find the configuration pages of these services by logging in to the router's WebUI and visiting the Network → Wireless section for Wi-Fi and Network → LAN for DHCP. For additional information on these pages, visit their respective Manual chapters:

RUT2


The key things you need to configure in RUT2 are:

  • Enable Wi-Fi WAN and connect to RUT1's Wi-Fi Access Point
  • Disable the DHCP Server and enable Relayd

These steps should be taken in the order they are presented in, because if you disable RUT2's DHCP Server first, you may lose access to your router. So let's begin by setting up Wi-Fi WAN.

Wi-Fi WAN


To set up Wi-Fi WAN, log in to the router's WebUI and navigate to the WAN section found under the Network tab. Choose WiFi as your Main WAN option and click the Save button. After this, a Scan button should appear. Click it and it will initiate a scan for nearby Wi-Fi Access Points. Choose RUT1's Access Point and click Join network:

Relayd configuration example how to set up wifi wan.png

You can visit the Wireless Station chapter for additional information on Wi-Fi WAN.

Testing the set up

External links