How to set the default route?

On my OpenWrt 21.02.1 installation I have multiple VLANs and more than one of them has internet access. The system selected a default route automatically. I want to explicitely set this route, to make sure it stays the same across reboots and to make it easier to understand things.

Currently the route output looks like this:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.10.1    0.0.0.0         UG    0      0        0 eth0.10
// rest left out

How can I set this route explicitely using the uci tool? Thanks!

How is each interface configured? Only the interface with the gateway you want to use, should have one configured.

1 Like