Routing

Prev Next

By default the Gateway setting in the network configuration adds in default routes for all interfaces.

Step 1) Edit network config file

The system can add additional routing by editing the file

/opt/fmadio/etc/network.lua

Step 2) Locate the route section

In the section named

NOTE: if the section does not exists, it can be added

["route"] =
{
},

Step 3) Add routes

Additional routing can be added by setting additional routes. For example adding a route for 192.168.100.0/24 to go via gateway 192.168.50.1. Looks like the below configuration

["route"] =
{
       "-net 192.168.100.0/24 gw 192.168.50.1",
},

Multiple routes can be added as shown below

["route"] =
{
    "-net 192.168.100.0/24 gw 192.168.50.1",
    "-net 192.168.200.0/24 gw 192.168.50.1",
},

Step 4) Validate config file

Once editing has finished, run a syntax check to confirm the config file is good

fmadiolua /opt/fmadio/etc/network.lua

The expected output is shown below

fmadio@fmadio200v4-636:~$ fmadiolua /opt/fmadio/etc/network.lua
fmad fmadlua Nov 12 2025 (fmadiolua /opt/fmadio/etc/network.lua )
done 0.000062Sec 0.000001Min
fmadio@fmadio200v4-636:~$

Step 5) Reboot

After the setting is made, a system reboot is required for it to take effect.