What's new

Setup static route to ip address on router

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

JoyceBabu

Occasional Visitor
I have an Asus RT N18 router with TomatoUSB installed. The router subnet is 192.168.0.0/24. I have a docker daemon running on a linux client (192.168.0.10). There is a docker network configured on the above client with subnet 10.10.0.0/24. WAN port is connected to a Cable modem in DHCP mode.

I want to allow every client on the 192.168.0.0/24 subnet access to the docker network. So, I have configured the following static route

Destination - 10.10.0.0
Gateway - 192.168.0.10
Subnet - 255.255.255.0
Metric - 0
Interface - LAN

Most of the times this works as expected, and I get the following traceroute output.

Code:
$ traceroute 10.10.0.100
traceroute to 10.10.0.100 (10.10.0.100), 64 hops max, 52 byte packets
 1  192.168.0.1 (192.168.0.1)  1.956 ms  0.961 ms  3.210 ms
 2  192.168.0.10 (192.168.0.10)  2.907 ms  1.754 ms  1.641 ms
 3  10.10.0.100 (10.10.0.100)  4.351 ms  3.363 ms  1.938 ms

But many times, the packets are sent to the WAN port instead of the static route.

Code:
$ traceroute 10.10.0.100
traceroute to 10.10.0.100 (10.10.0.100), 64 hops max, 52 byte packets
 1  192.168.0.1 (192.168.0.1)  7.191 ms  1.557 ms *
 2  192.168.1.251 (192.168.1.251)  4.378 ms  5.266 ms  2.247 ms
 3  117.247.203.1 (117.247.203.1)  2.831 ms  10.618 ms  3.323 ms
 4  117.242.216.1 (117.242.216.1)  3.526 ms  2.777 ms  2.068 ms
 5  static.ill.218.248.58.134/24.bsnl.in (218.248.58.134)  63.865 ms  123.344 ms  162.384 ms
 6  * * *
 7  * 10.10.0.100 (10.10.0.100)  1.970 ms  2.725 ms

Is there anything else that I should do, in addition to creating the static route, for this to always work correctly?
 
It should be enough to place a static route for 10.10.100 to 192.168.0.10 on 192.168.0.1 . It seems strange that the router doesn't keep the network in it's route table and tries that subnet over the WAN, but depending on the settings that could be the case.
 
I was using DSL broadband until last month, and everything was working fine then. After that I replaced Tomato Shibby with Advance Tomato, and the issue started :(
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Top