Configuration Example


Print version

2. Configuration Example

NAT topology diagram

Fig. 2.1: NAT topology diagram

The example shows an ideal situation where all RTU’s in network have the same IP address, but still operate with no issue. All remote RipEX units (all units except one Base station) share almost the same configuration with default Ethernet IP address. The only differences are the Radio IP addresses which are also used in NAT configuration.

NAT enables a defined communication to be transformed (changing IP addresses or ports) upon configured filter rules. In this example, we use this feature to:

  • Enable Modbus TCP application to run over TCP port 502

    • Destination NAT

  • Enable NTP time synchronization using the Radio IP addresses only (Ethernet IPs not required)

    • Source NAT

If you need full access via all possible ways, regular routing without NAT must be configured. NAT enables running of specific applications “only”.

Destination NAT example details:

Destination NAT example details

Fig. 2.2: Destination NAT example details

Destination NAT handles packets received on the Radio interface of remote RipEX units. Once the packet is received and a filter matches the destination TCP port to be 502 and the destination IP to be the radio IP of that particular RipEX (, NAT changes the destination IP address to be the RTU’s IP address (

The RTU replies and RipEX2 makes an opposite transition and changes the source IP address back to This rule does not need to be defined manually but is working upon a dynamic rule created internally because of the Destination NAT rule. This is general functionality of any NAT implementation.

If the traffic would be initiated from the RTU instead of initiating the TCP session from SCADA Center, the Source NAT must have been configured so the SRC IP of this packet is changed to instead of

Source NAT example details:

Source NAT example details

Fig. 2.3: Source NAT example details

Source NAT in this example is used for NTP time synchronization of RipEX units. RipEX can be synchronized via NTP and for its NTP requests, it automatically uses Ethernet IP addresses. If, for any reason, remote RipEX units share the same Ethernet IP address (used in this example), or the network is ready for only routing the Radio IP addresses, NAT can be used to change the source IP address ( to be the Radio IP address (10.10.10.x). Without NAT, the NTP server would reply to IP which is used in many remote RipEX units and there is no routing configured for network in the NTP server.

2.1. RipEX-Base Configuration

RipEX-Base Settings

Fig. 2.4: RipEX-Base Settings


Unit name


Operating mode




Radio protocol

Base driven

Station type


Radio IP/Mask


The network is configured using Base driven Radio protocol due to its easier configuration and TCP optimization. Set the Unit name, select the Router mode and configure correct IP addresses.

Open the Radio protocol menu and configure the protocol details.

RipEX-Base Radio protocol details

Fig. 2.5: RipEX-Base Radio protocol details

Configure any Mode, Modulation type and rate, but keep the Mode and type the same within the whole network.

The Modulation rates and other parameters can be different for remote units. Please see more details in the Autospeed application note.

Configure all 5 remote RipEX units and focus on the “Connection” and “Repeater Protocol addr.” columns.

  • Protocol address 1 – Direct connection

  • Protocol address 2 – Direct connection and configured as Repeater

  • Protocol address 3 – Direct connection

  • Protocol address 4 – Behind the Repeater #2

  • Protocol address 5 – Behind the Repeater #2

There is no need for any Routing rules. As stated earlier everything is controlled by the Base station by this Remotes’ table and BDP functionality. The Routing menu is empty.

Please see more details in the BDP application note.

RipEX-Base NTP configuration

Fig. 2.6: RipEX-Base NTP configuration

This central RipEX unit is synchronized via NTP protocol. The NTP server’s IP is, cellular router M!DGE is used within this example.

Please see more NTP configuration details in M!DGE Manual.

Check the RipEX NTP server state after applying the changes to see if it is already synced or not.

RipEX-Base is NOT configured with NAT functionality. NAT is set in all remote units for Modbus TCP port 502 and NTP (UDP port 123). RipEX-Base does not require NAT for NTP synchronization, it uses Source IP address for its request and the NTP server successfully replies to these requests (no routing required, L2 layer accessibility).

Apply all the changes and configure remote units.

2.2. Remote RipEX Configurations

All remote RipEX units have the same configuration except:

  • Unit name

  • Radio IP address

  • NAT rules (particular Radio IP is used)

RipEX2 Settings

Fig. 2.7: RipEX2 Settings

Common parameters for all remote units (blue):

Operating mode




Radio protocol

Base driven

Station type


Radio Mask (default)

ETH IP/Mask / (default)

Unique parameters for particular RipEX unit (red):

Unit name


Firewall & NAT


Radio IP

The network is configured using Base driven Radio protocol. Set the Unit name, select the Router mode and configure correct IP addresses.

Open the Radio protocol menu and configure the protocol details.

Remote RipEX Radio protocol details

Fig. 2.8: Remote RipEX Radio protocol details

All remote units share completely the same BDP configuration.


Radio protocol

Base driven

Station type


Protocol address mode:


The Protocol address is automatically set based on the last Radio IP digit.

Remote RipEX NTP configuration

Fig. 2.9: Remote RipEX NTP configuration

The NTP is configured in the same way as the Base unit. See the NAT configuration for differences.

RipEX2 NAT configuration

Fig. 2.10: RipEX2 NAT configuration

Turn on the NAT functionality and define one Source NAT and one Destination NAT rule.

Common Source NAT configuration for all remote units (blue):



Source IP (default Ethernet IP)

Source Mask

Source Port


Destination Port


Output interface


Unique Source NAT configuration for particular remote RipEX (red):

Rewrite source to (IP) (Radio IP)

The Source NAT changes the Source IP address for RipEX NTP requests – instead of Ethernet IP (, use the actual Radio IP (

Common Destination NAT configuration for all remote units (blue):



Destination Mask

Destination Port


Input interface


Rewrite destination to (IP) (connected RTU)

Unique Destination NAT configuration for particular remote RipEX (red):

Destination IP

The Destination NAT changes the Destination IP to, i.e. the RTU IP address (all RTU’s within the network have the same IP address!). The change is done for Modbus TCP application (TCP port 502).

Apply the changes in the Settings menu and configure other units as well.

Routing of Remote RipEX units

Fig. 2.11: Routing of Remote RipEX units

Each remote RipEX requires one routing rule. Either enable the Default route to Base Radio IP or define a static rule for Destination via gateway.

The configuration is now complete. Test the functionality.

2.3. Functionality Verification and Troubleshooting

Source NAT (NTP) Verification

Check if RipEX is synchronized or not in the Settings – Device – Time menu.

NTP Synchronization status

Fig. 2.12: NTP Synchronization status

No matter if it is synchronized or not, go to the Base RipEX’s Diagnostic – Monitoring menu and run the Monitoring of Radio and Ethernet interfaces as depicted in Figure 2.13. The Monitoring is started by pressing the “Start” button.

NTP traffic monitoring

Fig. 2.13: NTP traffic monitoring

The output example:

15:32:29.657937 [ETH] IP > NTPv4, Client, length 48
15:32:29.658891 [ETH] IP > NTPv4, Server, length 48
  • NTP synchronization of RipEX-Base, NAT is not used of course

15:32:48.993820 [RF:phy:Rx] IP > UDP, length 76, rss:48 dq:222
RLhead:  4880 02bb 0fab 3540 ((MC:B0) > DATA_RTS: T:2 LN:53 Rp:- nA:y Ofr:0)
15:32:48.994885 [ETH] IP > NTPv4, Client, length 48
15:32:48.995822 [ETH] IP > NTPv4, Server, length 48
15:32:49.072585 [RF:phy:Tx] IP > UDP, length 78
RLhead:  4860 02ba 542b 5460 35 ((MC:B0) > DATA: T:2 LN:84 Rp:- nA:y A:53)
  • NTP request received on the Radio channel from IP address (NAT worked)

  • Radio Link header displays that the Radio IP destination is the Radio IP of Base (correct)

  • Data go via Ethernet and then NTP reply is transmitted back to

If you see any NTP request from IP address, NAT is not configured correctly in remote units. Or if you see a request from, NAT is configured in Base too (disable NAT in Base).

You can check the Radio interface monitoring in remote RipEX units as well.

Destination NAT (Modbus TCP) Verification

Start the Monitoring again, but change the required filters (TCP port 502).

Modbus TCP monitoring

Fig. 2.14: Modbus TCP monitoring

Notice the “Include reverse” check box. This option enables monitoring of data having TCP port 502 used as Source or Destination.

The output example:

15:55:28.134734 [ETH] IP > Flags [P.], seq 1:13, ack 11, win 315, length 12
15:55:28.168191 [RF:phy:Tx] IP > TCP, length 54
RLhead:  4860 02ba 542b 1960 9d ((MC:B0) > DATA: T:2 LN:25 Rp:- nA:y A:157)
15:55:28.251811 [RF:phy:Rx] IP > TCP, length 53, rss:49 dq:206
RLhead:  4880 02bb 0fab 9e40 ((MC:B0) > DATA_RTS: T:2 LN:158 Rp:- nA:y Ofr:0)
15:55:28.252668 [ETH] IP > Flags [P.], seq 11:22, ack 13, win 252, length 11

Four packets are inspected. The first one is Modbus TCP request from the SCADA Center to remote RipEX and this packet is sent out via Radio channel. Other two packets are the Modbus TCP reply received on the Radio channel and sent out via Ethernet to SCADA Center.

We can only “believe”, NAT is working correctly. You can check it in your application, but the NAT functionality is more easily visible in the remote RipEX. Run the same Monitoring capture in remote RipEX unit.

The output example:

16:06:58.290274 [RF:phy:Rx] IP > TCP, length 54, rss:48 dq:206
RLhead:  4860 02ba 542b a960 79 ((MC:B0) > DATA: T:2 LN:169 Rp:- nA:y A:121)
16:06:58.291212 [ETH] IP > Flags [P.], seq 974974513:974974525, ack 2938572617, win 381, length 12
16:06:58.292021 [ETH] IP > Flags [P.], seq 1:12, ack 12, win 254, length 11
16:06:58.361105 [RF:phy:Tx] IP > TCP, length 53
RLhead:  4880 02bb 0fab 7a41 ((MC:B0) > DATA_RTS: T:2 LN:122 Rp:- nA:y Ofr:1)

In the above monitoring, RipEX received data on the Radio channel with destination IP addres (and TCP port 502). On the Ethernet, the destination IP is because of NAT translation. The port is the same. Modbus TCP reply is captured on two interfaces (ETH, Radio). Notice the NAT rule works for the opposite direction as well.

It is better to access remote RipEX locally (e.g. via USB/ETH adapter) or save the Monitoring into a file and read it afterwards in a text editor. Remote monitoring can overload the Radio channel.

Applying configuration changes in NAT menu causes a reboot of RipEX unit – keep this in mind.

©  2024 RACOM s.r.o. All Rights Reserved.