Automatic add route

Hello.
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
ip 10.3.2.5
mask 255.255.255.0
gateway 10.3.2.1
and i need to auto add route for example
ip route add 172.16.5.0/24 via 10.3.2.1 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
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.

2 Likes