I need a static route on a node for local purposes. I have added it to /etc/config/network and it works fine. Except for one thing, changes in the node config can cause that file to be overwritten. My question is: Is there a way to assure the route is not impacted by local config changes? I can live with firmware updates, so it is just setup changes I want to protect against.
BTW, I have considered putting an ip route... command in rc.local. But, I was wondering if there was another option.
FYI, here are the settings from the network config file
BTW, I have considered putting an ip route... command in rc.local. But, I was wondering if there was another option.
FYI, here are the settings from the network config file
config 'route' 'default'
option 'interface' 'lan'
option 'target' '0.0.0.0'
option 'netmask' '0.0.0.0'
option 'gateway' '10.xxx.xxx.xxx'
Note, the routing is a little more complex than putting entries in the 'main' route table. AREDN uses policy route tables, which means there are many tables that are used, depending on where the traffic is coming from and going to. It's possible, the intended end result is not achieved for all traffic. If your 'local purpose' is limited to LAN devices of this node, then you might be OK.
Joe
The entry in /etc/config/network worked fine, but it seems to get lost between reboots. For now I'll try rc.local and see what happens.
And, yes, this is a route "out" via a host on the local LAN.
What you're doing is experimental and risks breaking the routing somewhere else. Best to keep your node as an end point no one else on the greater mesh would be routing though, which sounds like the situation. This limits shooting only yourself in the foot :) .
Joe AE6XE
????
Only when I specifically added a default route in rc.local did it show up in the ip route output as
But, as I noted above, including the default route in /etc/config/network did the trick, even if it didn't appear in the output of ip route
I'm not real clear on what problem is being solved or the end goal of "local purposes". if you are trying to get the devices on the LAN to have a different default route, to another IP address of a device on the same LAN, then affecting this setting is done through the node's dhcp setting when LAN devices acquire an IP address. No need to have a device route to the mesh node, then back to the same LAN, rather the device should have a default route direct. This is getting outside the core function of the nodes, and go-it-alone territory.
Joe AE6XE