Relayd

From Teltonika Networks Wiki
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