Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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                10.10.99.100       UGSc            0        0    ppp0
default            192.168.1.1        UGSc            5        0     en0
default            192.168.1.1        UGScI           1        0     en1
default            192.0.2.1          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

1 Answer 1

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

share|improve this answer
1  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.