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.

I have two networks available in my location, and am using a MacBook Pro running OS X Lion.

BLUE NETWORK - DHCP assigns me 10.x.x.x address, and is for internal traffic only. It has no connection to the Internet, and is available either on Ethernet or Wifi.

RED NETWORK - DHCP assigns me a 192.168.x.x address, and is a direct connection to the Internet. It has no connection to any internal resources, and is available either on Ethernet or Wifi.

By default, it seems that OS X favours the connection with the greater bandwidth almost exclusively. That's to say, if I'm connected via Ethernet on the RED network, and by Wifi on the BLUE network, I can access the outside world just fine but RDP connections to internal servers fail and I can't connect to internal fileshares.

Conversely, if I'm connected via Ethernet on the BLUE network, and by Wifi on the RED network, FTP to external servers doesn't work (or Skype etc.) but internal fileshares can be accessed just fine.

I'd like a solution to this. Really, I only need 10.0.0.0/8 addresses to be routed on the BLUE network, and everything else on the RED. And for named servers, some rules like *.int.foo.com resolved on the BLUE network but everything else on the RED.

Is this something that can be achieved?

share|improve this question
    
We need to wiki these questions. . . –  surfasb Aug 12 '11 at 19:05
add comment

2 Answers 2

up vote 3 down vote accepted

Mac OS X gives the default route to the highest-ranked, active interface. It doesn't have anything to do with bandwidth. To change interface rankings, go to System Preferences > Network, click the cog drop-down menu under the list of devices and select Set Service Order. Then drag to rearrange your interface rankings. It sounds like you want RED ranked above BLUE.

If BLUE is a multi-hop network (i.e. not just the local subnet), then things may get tricky. You can also add specific routes using the route command. This would allow you to route 10.0.0.0/8 addresses over "BLUE".

share|improve this answer
    
This is your safest bet. I would also recommend statically addressing one or the other, and only having ONE link be using DHCP (preferably your outbound internet link). –  peelman Aug 12 '11 at 17:05
    
Thanks very much for the help - this looks like it'll be just what I'm looking for. –  Rob Wright Aug 16 '11 at 10:03
add comment

You can confirm the routing by looking at the routing table (if you know how to interpret that):

netstat -nr -f inet

or specifically querying the routing table:

route get 204.XXX.YYY.ZZZ

for some destination, 204.XXX.YYY.ZZZ.

share|improve this answer
add comment

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.