Static routes provides additional routing information to your router.
Easy
Static routes can be used to route connections to a specific host or address trough a specific interface, which may be a VPN-Connection.
All requests to dd-wrt.com should be routed through a given gateway.
Static-Route properties | |
---|---|
interface | wan |
target | 83.141.4.210 (dd-wrt.com) |
netmask | 255.255.255.255 |
gateway | 172.27.0.1 |
Not available, yet
uci add network route uci set network.@route[-1].interface=wan uci set network.@route[-1].target=84.141.4.210 uci set network.@route[-1].netmask=255.255.255.255 uci set network.@route[-1].gateway=172.27.0.1
uci commit network
/etc/init.d/network reload
Routes are defined in /etc/config/network
config 'route' option interface 'wan' option target '83.141.4.210' option netmask '255.255.255.255' option gateway '172.27.0.1'
/etc/init.d/network reload
You can check if the route has been applied successful by looking at the routing table with the route command
# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 172.27.0.1 0.0.0.0 UG 0 0 0 eth1 84.141.4.210 172.27.0.1 255.255.255.255 UGH 0 0 0 eth1 172.27.0.0 * 255.255.255.0 U 0 0 0 eth1 192.168.1.0 * 255.255.255.0 U 0 0 0 br-lan
The field 'Destination' should match the target from the UCI configuration, Gateway matches Gateway, and the Iface should match the actual interface name.