Force the computer to use a specific route to the Internet

Network

Here's my setup: both me and my roommate have an Ethernet plug in our rooms to which is assigned a distinct public IP address. Also, my roommate bought a shiny wireless router for his/our various Internet-enabled devices, to which my Mac is connected (because his computer is connected on it, and it's sometimes useful to be on the same subnet).

However, our connections are metered separately and I would find it unfair to make all of my computer's trafic go through the wireless network, and thus, his connection instead of mine. I recall that when I was living at my parent's place, AirPort used to take priority over Ethernet when I was connected to the same router with both. Now it doesn't seem to be the case, but I'm still not sure how my computer decides which network interface it'll use to reach the Internet if they're all connected to it.

Is there a way to force my computer to use my Ethernet connection for everything Internet, only if an Ethernet cable is plugged in?

Best Answer

You may use the "service order" functionality of Network pref pane.

Go to System Preferences > Network > Click on the gear bellow the network list > Set Service Order...

There you may choose the order of which the networks will be used.