This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
howto:general:routing:static_routing [2015/05/19 11:53] admin [UCI Config System] |
howto:general:routing:static_routing [2018/05/24 09:05] (current) |
||
|---|---|---|---|
| Line 10: | Line 10: | ||
| ==== Use-case ==== | ==== Use-case ==== | ||
| - | All requests to dd-wrt.com should be routed throug a given gateway. | + | 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 ^^ | ^ Static-Route properties ^^ | ||
| | interface | wan | | | interface | wan | | ||
| - | | target | 83.141.4.21 | | + | | target | 83.141.4.210 (dd-wrt.com)| |
| | netmask | 255.255.255.255 | | | netmask | 255.255.255.255 | | ||
| | gateway | 172.27.0.1 | | | gateway | 172.27.0.1 | | ||
| Line 32: | Line 35: | ||
| ==== UCI Config System ==== | ==== UCI Config System ==== | ||
| - | * **Add something** | + | * **Add static route section** |
| <code> | <code> | ||
| uci add network route | uci add network route | ||
| Line 70: | Line 73: | ||
| ===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
| - | Not available, yet | + | You can check if the route has been applied successful by looking at the routing table with the **route** command |
| + | <code> | ||
| + | # 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 | ||
| + | </code> | ||
| + | The field 'Destination' should match the target from the UCI configuration, | ||
| + | Gateway matches Gateway, and the Iface should match the actual interface name. | ||