lan-based multi-gateway networking using udp mode and built-in network server

This guide explains how to use the UDP protocol to network multiple RAK LoRaWAN gateways within a Local Area Network (LAN). A Central Gateway runs the Built-in Network Server (Built-in NS) to manage end devices and handle data forwarding centrally.

Deployment Scenarios

The LAN-based UDP multi-gateway setup is ideal for scenarios where:

  • All gateways are deployed within the same local network, such as in a campus, factory, or enterprise environment.

  • External LoRaWAN Network Servers (e.g., ChirpStack, TTS) are not available or not preferred, and users want to rely solely on a local server.

  • Low latency, high reliability, and data privacy are critical, making local processing preferable over cloud-based forwarding.

Multi-Gateway Network Overview

Multi-Gateway Network
Figure 1: Multi-Gateway Network

Key Components

  • Central Gateway (Main Controller)

    • Hosts the built-in network server for centralized device and traffic management

    • Acts as a regular gateway to process LoRaWAN data

    • Receives UDP packets from Extender Gateways

    • Enhances coverage and reliability through multi-gateway networking

  • Extender Gateway (Forwarding Gateway)

    • Forwards LoRaWAN data to the Central Gateway via UDP

    • Avoid processing LoRaWAN packets directly to simplify the network setup

    • Extends network coverage for large buildings or campus deployments

How It Works

  1. All gateways are connected to the same LAN.

  2. The Central Gateway runs the built-in network server and listens for UDP packets from Extender Gateways.

  3. Extender Gateways forward uplink data to the Central Gateway using UDP.

  4. The Central Gateway handles data parsing, device registration, and downlink control.

Set Up the Multi-Gateway Network

Prerequisites

  • At least two RAK Gateways for LoRaWAN running WisGateOS 2

  • All gateways must be:

    • Connected to the same LAN

    • Configured to use the same frequency band (e.g., US915, EU868)

  • Static IP addresses are assigned to avoid DHCP-related IP changes.

Configure the Central Gateway

  1. Log in to the Central Gateway’s Web UI.

WisGate Web UI Login Page
Figure 2: WisGate Web UI Login Page
  1. Navigate to LoRa > Configuration.

  2. Set Work Mode to Built-in network server, then click Save changes.

Built-in network server Work Mode
Figure 3: Built-in network server Work Mode
  1. Install the RAK Open/Close Port extension to configure the UDP port used by Extender Gateways. For detailed instructions, refer to the RAK Extensions User Guide.

RAK Open/Close Port Extension
Figure 4: RAK Open/Close Port Extension
  1. Launch the extension from the Installed tab.

  2. On the Traffic rules page, click Add new rule.

Add New Rule
Figure 5: Add New Rule
  1. Fill in the following fields to create a new UDP rule:

    • Service name: A readable name for the rule (e.g., UDP1698).

    • Protocol: Select UDP.

    • Sources: Toggle Allow any host, or specify up to 3 allowed source IP addresses.

    • Destination Port: Enter the UDP port to be used for inter-gateway communication (e.g., 1698).

      • Make sure this port matches the one configured on all Extender Gateways.

Enter Rule Details
Figure 6: Enter Rule Details
  1. Click Add new rule to save and apply the configuration.

Register Extender Gateways in the Central Gateway

Ensure the central gateway is set to Built-in network server mode.

  1. Log in to the Central Gateway’s Web UI.

  2. Navigate to LoRa > Gateways in the left menu.

  3. Click Add extender gateway.

Add Extender Gateway
Figure 7: Add Extender Gateway
  1. Enter the extender gateway details:

Enter Extender Gateway Info
Figure 8: Enter Extender Gateway Info
  • Extender gateway EUI: Found on the device label (GWEUI) or in Dashboard > Overview of the extender gateway. 

  • Extender gateway name (optional): A friendly name to help identify the gateway.

  • Extender gateway description (optional): Notes or location details.

  1. Click Add to “Extender Gateway list”.

Click Add to “Extender Gateway list”
Figure 9: Click Add to “Extender Gateway list”
  1. Click Add extender gateway to save.

Click Add extender gateway
Figure 10: Click Add extender gateway

Configure the Extender Gateway

  1. Log in to the Extender Gateway’s Web UI.

  2. Navigate to LoRa > Configuration.

  3. Set Work mode to Packet forwarder.

Packet forwarder Work mode
Figure 11: Packet forwarder Work mode
🗒️
NOTE

Make sure the LoRa frequency band (e.g., US915, EU868) matches that of the central gateway.

  1. In the Protocol field, select Semtech UDP GWMP from the dropdown.
Semtech UDP GWMP Protocol
Figure 12: Semtech UDP GWMP Protocol
  • Server address: <Central Gateway static IP addresses>

  • Server port up/down: 1698. Ensure port 1698 is opened on the Central Gateway using the RAK Open/Close Port extension.

  1. Click Save changes.

Verify the Connection

  1. Return to the Central Gateway’s LoRa > Gateways page.

  2. The Extender Gateway should appear in the list with a recent “Last Seen” timestamp (e.g., “8s ago”), indicating an active connection.

🗒️
NOTE

The “Last Seen” value may not refresh automatically. Reload the page manually to view the latest status.

 

“Last Seen” timestamp
Figure 13: “Last Seen” timestamp

Troubleshooting

Issue Possible Cause Solution

Extender Gateway cannot connect to Central Gateway

Incorrect IP address

Incorrect port

Network unreachable

Verify that the Server Address matches the Central Gateway's LAN IP and the port is set to 1698. Ensure that the gateways are in the same LAN and can ping each other.

The Extender Gateway status is offline or not updating

IP address changed, or network interruption

Use static IP addresses for all gateways. Reboot the gateway or check the network cable/connection.

Cannot add Extender Gateway to Central Gateway

Incorrect EUI input

Double-check the EUI entered. 

FAQs

  1. Must the Central Gateway and Extender Gateways be on the same LAN subnet?
    Yes. They must be in the same network or reachable via Layer 2/3 within the LAN. Otherwise, UDP packets will not be delivered. 

  2. What happens if an Extender Gateway loses connection to the Central Gateway?
    By default, if the connection to the Central Gateway is lost, the Extender Gateway will continue to receive LoRaWAN packets but cannot forward them, and they will be dropped unless the connection is restored quickly.

    If Auto Data Recovery is enabled, the Extender Gateway will cache incoming uplink packets locally and automatically forward them once the connection to the Central Gateway is re-established.

Glossary

Term Definition Notes

Central Gateway

The primary gateway that manages LoRaWAN data and acts as an MQTT broker.

Can manage multiple extender gateways.

Extender Gateway

A gateway that forwards LoRaWAN packets to the Central Gateway via MQTT.

Must use the same frequency band as the Central Gateway.


Changelog
  • Version 1 - LAN-Based Multi-Gateway Networking Using UDP Mode and Built-in Network Server
    • Date Published: 09/11/2025


 

Updated