How does Mac OSX prioritize network interfaces when routing?

Any routing table which has multiple default routes with equal metrics does load balancing. The case with a mac though is that it will select the first interface which is in the interface list. If you want to see and change the list, go to "open network preferences", here you will see a list of network interfaces like ethernet, airport, ppp through mobile or 3g, etc. Below the list, you will see an asterisk shaped option with a down arrow. Click this and set the "set service order". Here you can change preference of your particular interface.

http://www.sustworks.com/site/prod_ipnrx_help/html/AlternateRouteHelp.html


Most systems follows these rules when choosing which route to use:

  • Find the most specific ones (i.e. the ones with the longest matching prefix).
  • Choose the one with the highest priority.

On Linux (and, I think, on Windows) priority is determined by metric, but it is not the case on macOS as you correctly pointed out. Instead of assigning metrics to individual routes, macOS assigns priorities to interfaces. You can use networksetup -listnetworkserviceorder to view this order and networksetup -ordernetworkservices to change it.

Now, this route from your output makes me think that in your case specificity also plays its role:

Destination        Gateway            Flags        Refs      Use   Netif Expire
0/1                10.10.99.100       UGSc            0        0    ppp0

This route covers the bottom half of the address space and therefore I would expect to also find:

128.0/1            10.10.99.100       UGSc            0        0    ppp0

in your routing table. This is a standard trick VPN software uses to prioritise its routes over default: it adds two routes which together cover all IP addresses, but each of them is more specific than default, so they win.