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.

Is there any way to set up an automatic failover for internet connections within Mac OSX? Basically the main connection would be ethernet or wifi and if the main connection goes does, it would switch to a 3G mobile phone or another Wifi connection.

share|improve this question
    
You can do this with a router. Research pfSense . It can be a challenge. –  Joe May 19 '11 at 4:08

2 Answers 2

If one interface goes down physically (cable unplugged, no wifi signal) or has no DHCP information, Mac OS X will automatically fail over to the next active interface in the list in the Network preferences. You can change the priority using the “Set Service Order…” option in the action menu.

However, this does not care about failures which are lack of packets getting through. If that it your problem, maybe you could find or create a tool to automatically shut down the interface that is failing for a moment (such as by ifconfig en0 down); when it is brought up again it would fail to acquire a DHCP lease and so remain inactive until it is working again.

share|improve this answer

Wonder if there is a way to chose which internet connection to utilise from the command line?

That way you could re-check previously broken connections without just 'down' the interface rendering it uncheckable.

E.g. Then you could use a script like this but instead of echoing success or fail you'd choose which connection the mac should use/share to other computers etc:

#!/bin/sh
# Ping a standard website with output suppressed, if ping completes then display success else failure

echo "Checking internet connectivity..."
ping -c 5 www.google.com>>/dev/null

if [ $? -eq  0 ]
then
echo "Able to reach internet, yay!"
else
echo " Not able to check internet connectivity!"
fi
share|improve this answer

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.