Automatic add route

pls help me
i have an dhcp ip from provider
how i can add automatically route after reboot that is using dhcp ip from provider? for example
dhcp ip is
and i need to auto add route for example
ip route add via dev eth0
help me pls

I don't think it is necessary as the gateway is providing the route 0/0
What does your routing table say?
ip -4 ro or route -n

1 Like
. /lib/functions/
network_find_wan NET_IF
network_get_gateway NET_GW "${NET_IF}"
uci -q delete
uci set"route"
uci set"${NET_IF}"
uci set""
uci set"${NET_GW}"
uci commit network
/etc/init.d/network restart

It can be useful to override VPN-gateway to access ISP-network services.

1 Like

I guess that would be a logical explanation, cause the example above doesn't make sense. @artsiom82 if that is the case, be more specific as we cannot guess your setup.
Other than the uci method that vgaetera mentioned, you can do it in Luci: Network - Static routes.