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
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
All gateways are connected to the same LAN.
The Central Gateway runs the built-in network server and listens for UDP packets from Extender Gateways.
Extender Gateways forward uplink data to the Central Gateway using UDP.
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
Log in to the Central Gateway’s Web UI.
Navigate to LoRa > Configuration.
Set Work Mode to Built-in network server, then click Save changes.
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.
Launch the extension from the Installed tab.
On the Traffic rules page, click Add new rule.
-
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.
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.
Log in to the Central Gateway’s Web UI.
Navigate to LoRa > Gateways in the left menu.
Click Add extender gateway.
Enter the extender gateway details:
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.
Click Add to “Extender Gateway list”.
Click Add extender gateway to save.
Configure the Extender Gateway
Log in to the Extender Gateway’s Web UI.
Navigate to LoRa > Configuration.
Set Work mode to Packet forwarder.
Make sure the LoRa frequency band (e.g., US915, EU868) matches that of the central gateway.
- In the Protocol field, select Semtech UDP GWMP from the dropdown.
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.
Click Save changes.
Verify the Connection
Return to the Central Gateway’s LoRa > Gateways page.
The Extender Gateway should appear in the list with a recent “Last Seen” timestamp (e.g., “8s ago”), indicating an active connection.
The “Last Seen” value may not refresh automatically. Reload the page manually to view the latest status.
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
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.-
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