Support for route Metrics.

Got a problem with Viscosity or need help? Ask here!

majestik

Posts: 2
Joined: Wed Sep 16, 2009 11:28 am

Post by majestik » Wed Sep 16, 2009 1:28 pm
I have been trying to use route metrics to allow for multiple paths to a network, and have found that Viscosity does not seem to support this. It works just fine with OpenVPN on Windows.

The serveri side of the short path:
push "route 192.168.25.0 255.255.255.0"

The server side of the less longer path:
push "route 192.168.25.0 255.255.255.0 vpn_gateway 50"

When connecting to the second gateway, it does not update the routing table with the lesser cost routes, and obviously it does not failover when the first one connects as it does on Windows.

James

User avatar
Posts: 2313
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Fri Sep 25, 2009 3:33 am
Hi majestik,

OpenVPN itself handles route addition, rather than Viscosity. It sounds like you may want to bring this up on the official OpenVPN mailing list to see if they have a solution for you.

That said, Mac OS X handles "metrics" slightly differently to Windows. Windows treats metrics as hard route priorities, however Mac OS X uses RTTs (Round Transmission Times) instead. While both essentially achieve the same thing (which is the best route to use when there are multiple paths), RTTs are measured in milliseconds, which you might need to take into account when setting the figure.

Essentially when you are setting a route with a metric, OpenVPN is calling the following command:
sudo route add -rtt 50 192.168.25.0 vpngatewayaddr 255.255.255.0

You may like to have a play from the Terminal using the above syntax to see if you can get a routing setup that works as desired. Finally, as far as I am aware Mac OS X doesn't allow identical routes where the RTT is the only difference. In your case this could result in the second route failing to be add. Try telling Viscosity to connect, and then add the routes yourself from the Terminal and see if you get any errors.

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
2 posts Page 1 of 1