# Using two Internet connections from Mac OS X



## holtsch (Oct 18, 2012)

I'm not perfectly sure that this should be in the Mac forum because it's a network related question ... but as it's about Mac OS X, I believe this is the right place.

I have two Internet connections (two different ISPs) and two routers with two subnets, one being 192.168.0.*, the other being 192.168.1.*. My Mac Pro is connected to both via its two Ethernet ports, so I have Ethernet 1, with IP address 192.168.1.100 using the router on 192.168.1.1 as gateway, and Ethernet 2, with IP address 192.168.0.100 using the router on 192.168.0.1 as gateway.

What I'd like to have is an easy and transparent way for my Mac to automatically use the best gateway ... or at least, if one of the connection drops, automatically use the other one.

At the moment, it only uses Ethernet 1 ... and if that fails, I can't connect - even though Ethernet 2 would be available.

Is there an easy way to do this? At the moment, the only way to get connections via Ethernet 2 is by disabling Ethernet 1.


----------



## sinclair_tm (Mar 11, 2005)

I don't think what you want to do is possible, or rather, I've never heard of anyone doing such a thing. I think the 2nd port on those Macs was for server type use, or internet sharing, not to allow you to connect to two different networks.

The way the OS X handles network connections is thus, in the network preference pane, the left lists all network connections the Mac sees. It will connect in the order of that list, top down. So if you have two ethernet connections, or like most Macs an AirPort and ethernet, if both are connected, it'll use the one that it toward the top of the list. The only way it moves down that list is if it doesn't get an IP address for the port. So, as long as the router on the bad connection is still giving a valid IP address, the Mac will still try to use it, since it has no idea that there is no connection pass the router. I have several menu bar extras on my Mac, and I believe one of them allows me to select which network connection to use (but it also may be only which one it displays the info of in the menu bar). You can look to see if there is one for 10.7 you can use. You can also look into writing an AppleScript or Automater process to change the network connections when you run them so you don't have to go to the preferences every time.


----------



## holtsch (Oct 18, 2012)

Thank you - at least I'm one step further ;-) ... so, what I'm using for now is locations: I have one location set up that has Ethernet 1 as the first "service", and another location that has Ethernet 2 as the first "service". That way, I can conveniently switch between the two via the Apple / Locations menu (this only appears in the Apple menu once you have more than one location).

Maybe there's still a better way - but it doesn't happen too often that one ISP dies on me, so I just need to remember to use the Apple menu to resolve it quickly (instead of going into System Preferences) ;-)


----------

