Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

To give a concrete example, how does OSX choose which of these default entries from netstat -nr to route to?

Destination        Gateway            Flags        Refs      Use   Netif Expire
0/1             UGSc            0        0    ppp0
default          UGSc            5        0     en0
default          UGScI           1        0     en1
default            UGScI         157        2    ppp0 

From what I have been able to tell OSX uses metrics on its interfaces rather than on its routing table entries. But by default all of those interface metrics are 0 so how does it choose? Last created interface?

I've seen some folks suggest its the order in the Network preferences, but in my case the ppp0 interface (from SonicWall NetExtender) isn't listed there.

There is some discussion in this thread, but no answer that I see.

share|improve this question
Have you find out how to set route metric? – endryha Dec 1 '15 at 19:37

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.

share|improve this answer
Is there any source you can reference that confirms this? If you can reference a site that'll make your answer more worthwhile and people will vote it up. – slm Dec 29 '12 at 13:20
"Set service order" can be confirmed here: OS X Mountain Lion: Change the priority of your network connections – David Moles Aug 15 '13 at 2:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .