How to choose between two internet connections

Killerbob

macrumors 65816
Original poster
Jan 25, 2008
1,008
77
I have two internet connections in my home, one which is connected to my LAN and which my MP sees via the Ethernet adapter, and one which is on a separate Wi-Fi, which my MP sees via the Wi-Fi.

I can change the network order in System Preferences, and that works fine. My question is how can I have one application use one connection (Ethernet) and another application use the other (Wi-Fi)?

I use various applications, one of which is Unison, which I specifically would like to use the Wi-Fi connection with. I can't seem to find in the Unison settings a way to distinguish between networks, so it has to be somewhere in OSX...
 

campyguy

macrumors 68040
Mar 21, 2014
3,415
932
Network "Location" in System Preferences

Variants of this have been around since OS7. Read up on this feature. Each "Location" uses the network configuration you set up. I use one for my home office, one for the road while tethered to my iPad, and one for the hotel chain I stay at. It's as easy as setting up a Location, then selecting which Location I'm at. QED. :cool:
 

caribiner23

macrumors regular
Feb 15, 2005
106
0
Chicago
If you are asking if each interface can sit on its own network simultaneously and you choose which path each application takes, I believe the answer is "no."
 

Killerbob

macrumors 65816
Original poster
Jan 25, 2008
1,008
77
I am indeed asking if I can have Firefox etc. use the Ethernet connection, whilst Unison for instance, uses the Wi-Fi connection...

I can't belive the answer is that it is not possible... I can flip between these on the fly, and they are both active at the same time, so I just need a way, or an application, to select which one a specific application uses.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
29,361
8,967
California
I am indeed asking if I can have Firefox etc. use the Ethernet connection, whilst Unison for instance, uses the Wi-Fi connection...

I can't belive the answer is that it is not possible... I can flip between these on the fly, and they are both active at the same time, so I just need a way, or an application, to select which one a specific application uses.
Not possible in OS X.

All I have seen is you can use Terminal commands to alter network routing for a specific IP destination. For example, is you used a FTP app to connect to a fixed IP, you could set this so that all outbound traffic to that IP uses the ethernet connection.
 

meme1255

macrumors 6502a
Jul 15, 2012
701
521
Czech Republic
You can use route command or you might try to set-up proxy via SSH on second adaptor and set for example Firefox to use it :) – You have to set-up your Unison connection as primary and have proxy second one :)
 

Killerbob

macrumors 65816
Original poster
Jan 25, 2008
1,008
77
I have been researching the route solution, and come up with the following:

/sbin/route add -net 82.197.196.44 -interface en2

The IP address is the news server Unison is connecting to, and en2 is WiFi. It seems to add the entry in the routing table, and Unison is using the WiFi connection, but it stalls after a little bit. Any suggestions?