How Does OSX Prioritize Network Connections?

Discussion in 'macOS' started by Makosuke, Jan 9, 2008.

  1. Makosuke macrumors 603

    Aug 15, 2001
    The Cool Part of CA, USA
    This is a technical question out of pure curiosity. I could probably dig through the documentation, but that would probably take longer than my curiosity would hold out, so I figured "why not ask?"

    I occasionally switch between wireless (g) and wired (gigabit) networking with my home laptop on occasions when I want the extra speed for accessing large files. I'd noted before that this was pretty transparent, but for the heck of it I did a test today:

    Connected to my home server (10.4's built-in AFP sharing, gigabit to a new Airport hub) using wireless, and started playing a medium-bandwidth (1.5Mbit/s) video file. With it playing, I connected the hardwired Ethernet, waited a bit for it to get an IP address, then tuned off the Airport card. I was honestly surprised that the video didn't even stop playing (and not due to caching), so obviously the transition was transparent enough to the app that it didn't stall out long enough to mess up the video. Switching back worked as well--in fact, I could tell it was changing, because via wireless there were slight glitches in playback, I'm assuming due to the way the player (mis-)handled preloading on a relatively slow connection.

    Which got me wondering: How exactly does OSX prioritize network traffic when there are two available paths? All to the faster one, some connections prioritized over others based on hardware, or does it spread traffic around?

    Also, given two alternate paths to the internet, what kind (if any) of load-sharing will the OS do by default? I'd always assumed that you'd need a special router to combine two separate internet connections (say, cable and DSL), but this got me wondering if OSX (given two network paths) would do some of this load-sharing by itself. I of course don't have two internet connections in the same place to try this with.

    Anybody with more serious network experience able to provide some more details?
  2. JohnnyDeLuxe macrumors newbie

    Oct 13, 2010
    a MacBook Air seems to prefer Ethernet automatically

    After searching the net and Apple's documentation and user forum's I did not find anything specific, other than the Apple TV always prefers a wired connection over a wireless, according to info in the Apple user forum (lost the link to the pages.Sorry).

    On my one year old MacBook Air a 13GB backup to my AirportCapsule made me turn on the iStat Pro widget, and the iStatPro shows very nicely what goes on with the communication from the MBA if both the Airport wireless and a Ethernet cable is connected to the computer: All traffic seems to go through the cable. If I disconnect the cable the traffic moves on to the wireless, and back again when plugged in. So it seems that the MBA works as the iTV - preferring the Ethernet if one is found.

    A word of precaution: The test might be best done if you have some larger files to copy between your computer and the TC or another device, other than on a TC backup, as switching in the middle of a backup in progress might causes some issues to arise.
  3. mmulin macrumors 6502

    Jun 22, 2006
    You can set the service order in the network preference panel. It will use that IMHO but never tested it out to the grind..
  4. iVoid macrumors 65816

    Jan 9, 2007
    I think Mac OS X does a pretty good job of using the ethernet connection if it's available to reach a particular device over the airport, but:

    You could use the IFCONFIG terminal command to assign a higher metric to the airport. Do a search for Mac OS X IFCONFIG METRIC to see the details on this command.

    The default metric is 0, so set the airport interface to something higher (i.e. 100) to make it less desirable for traffic.

    BTW the airport may show up as one of the ethernet interfaces in the IFCONFIG list.
  5. old-wiz macrumors G3

    Mar 26, 2008
    West Suburban Boston Ma
    this has nothing to do with the topic. The OP is asking how OSx network connections, not where anything is located

Share This Page