Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two separate Internet connections connected to a Mac and I'd like one of them (via Ethernet en0 gateway) to serve for just backing up to an remote online storage, and the other one (via Airport en1 gateway) for all other Internet traffic.

I tried using "route" from the terminal as follows:

sudo route add -host -interface en0

(just for testing against the site whose IP is, to see through which gateway the traffic is routed)

I can see using netstat that the route is added.

However, the traffic in this case does NOT get routed properly through Ethernet, as if the routing definition I made is ignored.

Any ideas?


share|improve this question
up vote 6 down vote accepted

The man page for route(8) on Snow Leopard (10.6.2) says -interface is only for when "the destination is directly reachable via an interface requiring no intermediary system to act as a gateway".

When I tried your command, I didn't get to at all. When I modified it to be more correct, like this:

sudo route add -host $MyGatewayOutEn0

...where "$MyGatewayOutEn0" was the IP address of the default gateway on the subnet that en0 was connected to, it successfully routed the way I think you were expecting.

(FYI, my en1 was attached to a completely different network, different subnet, than what my en0 was attached to at the time. I think that's what you were saying was the case for you, but I thought I'd be clear.)

share|improve this answer
Thanks for the response and it worked for me when I tested it with Airport and iPhone tethering side by side. But this won't work on my Airport-Ethernet setup: both of my interfaces are connected through a gateway which is, so the gateway IP would be ambiguous. However, on en0 the machine has an IP whereas on en1 it has Is there any way to route traffic by device? – GJ. Mar 28 '10 at 20:35
If both interfaces are connecting to the same network, why don't you just rank Ethernet over AirPort (in System Preferences > Network> "Gear" icon menu > Set Service Order...) so all traffic goes over Ethernet whenever Ethernet is up? Were you hoping to maximize overall throughput by sending some traffic over Ethernet and other traffic over AirPort? – Spiff Mar 28 '10 at 21:09
It's not the same network at all. It's just that both routers use as their self-IP. The routers each use different infrastructure and different ISPs... – GJ. Mar 29 '10 at 13:17
Two separate locally-attached networks using the same IP subnet? That's bound to cause problems right there. Fix that first. – Spiff Mar 29 '10 at 14:47
Thanks. Will do! – GJ. Apr 4 '10 at 19:03

Your Answer


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.